Only export extension init symbol on Linux #229
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
- wwise_v2023.1 | |
- wwise_v2024.1 | |
env: | |
BASE_BRANCH: ci | |
WWISE_VERSION: "2024.1.1" | |
GODOT_ENGINE_VERSION: "4.3.0" | |
GODOT_ENGINE_STAGE: "stable" | |
INTEGRATION_VERSION: "3.0.0" | |
jobs: | |
build-all: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Windows | |
os: "windows-2022" | |
sdk-platform: windows | |
scons-platform: windows | |
artifact-name: windows | |
- name: macOS | |
os: "macos-14" | |
sdk-platform: mac | |
scons-platform: macos | |
artifact-name: macos | |
- name: Linux | |
os: "ubuntu-22.04" | |
sdk-platform: linux | |
scons-platform: linux | |
artifact-name: linux | |
- name: iOS | |
os: "macos-14" | |
sdk-platform: ios | |
scons-platform: ios | |
debug-flags: arch=arm64 ios_min_version=12.0 | |
release-flags: arch=arm64 ios_min_version=12.0 | |
artifact-name: ios | |
- name: Android | |
os: "ubuntu-22.04" | |
sdk-platform: android | |
scons-platform: android | |
debug-flags-arm64: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64 | |
release-flags-arm64: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64 | |
debug-flags-arm32: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm32 | |
release-flags-arm32: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm32 | |
artifact-name: android-lib | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
if: matrix.sdk-platform == 'android' | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Android dependencies | |
if: matrix.sdk-platform == 'android' | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r23c | |
link-to-sdk: true | |
- name: Wwise SDK cache | |
id: cache-wwise-sdk | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-wwise-sdk | |
with: | |
path: addons/Wwise/native/wwise_sdk | |
key: ${{ matrix.sdk-platform }}-build-${{ env.cache-name }}-${{ env.WWISE_VERSION }} | |
# - name: Load .scons_cache directory | |
# id: cache-godot-extension | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{github.workspace}}/.scons_cache/ | |
# key: ${{matrix.sdk-platform}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}} | |
# restore-keys: | | |
# ${{matrix.sdk-platform}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}} | |
# ${{matrix.sdk-platform}}-${{env.BASE_BRANCH}}-${{github.ref}} | |
# ${{matrix.sdk-platform}}-${{env.BASE_BRANCH}} | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
architecture: "x64" | |
- name: Set up dependencies (Python, SCons) | |
run: python -m pip install scons==4.7.0 | |
- name: Set up Windows dependencies | |
if: runner.os == 'Windows' | |
run: | | |
choco install 7zip -y | |
- name: Set up Linux dependencies | |
if: runner.os == 'Linux' && matrix.sdk-platform == 'linux' | |
run: | | |
sudo apt-get install build-essential pkg-config libx11-dev \ | |
yasm zip unzip p7zip-full p7zip-rar gcc-11 g++-11 libtbb-dev | |
- name: Download Wwise SDK (Base) | |
uses: suisei-cn/[email protected] | |
if: steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
with: | |
url: "https://www.dropbox.com/scl/fi/kznwaj4wy2tq94kjwlsq4/wwise_sdk_2024.1.1_base.zip?rlkey=8fc5e3b53vu5lat9pr8h2xx4m&st=3za74o4o&dl=1" | |
target: ./addons/Wwise/native/wwise_sdk/ | |
- name: Download Wwise SDK (Windows) | |
uses: suisei-cn/[email protected] | |
if: runner.os == 'Windows' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
with: | |
url: "https://www.dropbox.com/scl/fi/hhhbnk30qc9hodp83glu8/wwise_sdk_2024.1.1_win.zip?rlkey=ifv7tv6rb0f3kdntajj4r7wtr&st=0bczhpsy&dl=1" | |
target: ./addons/Wwise/native/wwise_sdk/ | |
- name: Download Wwise SDK (macOS) | |
uses: suisei-cn/[email protected] | |
if: runner.os == 'MacOS' && matrix.sdk-platform == 'mac' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
with: | |
url: "https://www.dropbox.com/scl/fi/awp3bpgeqidhx0zmpwc9v/wwise_sdk_2024.1.1_mac.zip?rlkey=prwuvnmu5yi7s7kcion6qbi1s&st=2gysw3ch&dl=1" | |
target: ./addons/Wwise/native/wwise_sdk/ | |
- name: Download Wwise SDK (Linux) | |
uses: suisei-cn/[email protected] | |
if: runner.os == 'Linux' && matrix.sdk-platform == 'linux' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
with: | |
url: "https://www.dropbox.com/scl/fi/xtufm17hn8dtbwi7bjplr/wwise_sdk_2024.1.1_linux.zip?rlkey=3h1x80y6ys2e6sdu22h2jhll1&st=sjm4r58d&dl=1" | |
target: ./addons/Wwise/native/wwise_sdk/ | |
- name: Download Wwise SDK (iOS) | |
uses: suisei-cn/[email protected] | |
if: runner.os == 'MacOS' && matrix.sdk-platform == 'ios' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
with: | |
url: "https://www.dropbox.com/scl/fi/0hbmk5tcj76gpty03x01a/wwise_sdk_2024.1.1_ios.zip?rlkey=ij0i9kw54pas88tjv0rwwniui&st=4mvk0jlg&dl=1" | |
target: ./addons/Wwise/native/wwise_sdk/ | |
- name: Download Wwise SDK (Android) | |
uses: suisei-cn/[email protected] | |
if: runner.os == 'Linux' && matrix.sdk-platform == 'android' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
with: | |
url: "https://www.dropbox.com/scl/fi/zs4rx7xewt0fobsw7t551/wwise_sdk_2024.1.1_android.zip?rlkey=s9q0q3326286cxdybo1ty9qic&st=wm5i6b6k&dl=1" | |
target: ./addons/Wwise/native/wwise_sdk/ | |
- name: Unzip SDK (Windows) | |
if: runner.os == 'Windows' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
run: | | |
cd ./addons/Wwise/native/wwise_sdk | |
7z x wwise_sdk_2024.1.1_base.zip | |
7z x wwise_sdk_2024.1.1_win.zip | |
cd ../../../../ | |
- name: Unzip SDK (macOS) | |
if: runner.os == 'MacOS' && matrix.sdk-platform == 'mac' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
run: | | |
cd ./addons/Wwise/native/wwise_sdk | |
7z x wwise_sdk_2024.1.1_base.zip | |
7z x wwise_sdk_2024.1.1_mac.zip | |
cd ../../../../ | |
- name: Unzip SDK (Linux) | |
if: runner.os == 'Linux' && matrix.sdk-platform == 'linux' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
run: | | |
cd ./addons/Wwise/native/wwise_sdk | |
7z x wwise_sdk_2024.1.1_base.zip | |
7z x wwise_sdk_2024.1.1_linux.zip | |
cd ../../../../ | |
- name: Unzip SDK (iOS) | |
if: runner.os == 'MacOS' && matrix.sdk-platform == 'ios' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
run: | | |
cd ./addons/Wwise/native/wwise_sdk | |
7z x wwise_sdk_2024.1.1_base.zip | |
7z x wwise_sdk_2024.1.1_ios.zip | |
cd ../../../../ | |
- name: Unzip SDK (Android) | |
if: runner.os == 'Linux' && matrix.sdk-platform == 'android' && steps.cache-wwise-sdk.outputs.cache-hit != 'true' | |
run: | | |
cd ./addons/Wwise/native/wwise_sdk | |
7z x wwise_sdk_2024.1.1_base.zip | |
7z x wwise_sdk_2024.1.1_android.zip | |
cd ../../../../ | |
- name: Compile editor library | |
if: matrix.sdk-platform != 'android' && matrix.sdk-platform != 'ios' | |
shell: bash | |
env: | |
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ | |
SCONS_CACHE_LIMIT: 7168 | |
run: | | |
cd addons/Wwise/native | |
mkdir -p godot-cpp/bin | |
scons platform=${{ matrix.scons-platform }} target=editor wwise_config=profile use_static_cpp=yes wwise_sdk=wwise_sdk | |
cd ../../../ | |
- name: Compile template_debug library | |
if: matrix.sdk-platform != 'android' | |
shell: bash | |
env: | |
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ | |
SCONS_CACHE_LIMIT: 7168 | |
run: | | |
cd addons/Wwise/native | |
scons platform=${{ matrix.scons-platform }} target=template_debug wwise_config=profile use_static_cpp=yes wwise_sdk=wwise_sdk ${{ matrix.debug-flags }} | |
cd ../../../ | |
- name: Compile template_release library | |
if: matrix.sdk-platform != 'android' | |
shell: bash | |
env: | |
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ | |
SCONS_CACHE_LIMIT: 7168 | |
run: | | |
cd addons/Wwise/native | |
scons platform=${{ matrix.scons-platform }} target=template_release wwise_config=release use_static_cpp=yes wwise_sdk=wwise_sdk ${{ matrix.release-flags }} | |
cd ../../../ | |
- name: Compile Android libraries | |
if: matrix.sdk-platform == 'android' | |
shell: bash | |
run: | | |
cd addons/Wwise/native/wwise_sdk | |
WWISESDK=$(pwd) | |
cd ../godot-cpp | |
mkdir -p bin | |
scons platform=android target=template_debug dev_build=yes -j6 ${{ matrix.debug-flags-arm64 }} | |
scons platform=android target=template_debug dev_build=yes -j6 ${{ matrix.debug-flags-arm32 }} | |
scons platform=android target=template_release -j6 ${{ matrix.release-flags-arm64 }} | |
scons platform=android target=template_release -j6 ${{ matrix.release-flags-arm32 }} | |
cd ../android | |
chmod +x ./gradlew | |
./gradlew assemble -PWWISE_SDK="$WWISESDK" | |
- name: Upload libs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact-name }} | |
path: addons/Wwise/native/lib | |
upload-addon: | |
runs-on: "ubuntu-20.04" | |
needs: [build-all] | |
name: Addon | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download all libs | |
uses: actions/download-artifact@v4 | |
- name: Assemble all artifacts | |
run: | | |
ls | |
shopt -s dotglob | |
if [ ! -d "addons/Wwise/native/lib" ]; then | |
mkdir -p addons/Wwise/native/lib | |
fi | |
if [ -d windows ]; then | |
mv windows/* addons/Wwise/native/lib/ | |
rm -r windows | |
fi | |
if [ -d macos ]; then | |
mv macos/* addons/Wwise/native/lib/ | |
rm -r macos | |
fi | |
if [ -d linux ]; then | |
mv linux/* addons/Wwise/native/lib/ | |
rm -r linux | |
fi | |
if [ -d android-lib ]; then | |
mv android-lib/* addons/Wwise/native/lib/ | |
rm -r android-lib | |
fi | |
if [ -d ios ]; then | |
mv ios/* addons/Wwise/native/lib/ | |
rm -r ios | |
fi | |
- name: Clean up addon | |
run: | | |
rm -r ./addons/Wwise/native/godot-cpp | |
rm -r ./addons/Wwise/native/src | |
rm -r ./addons/Wwise/native/vs2022 | |
rm -r ./addons/Wwise/native/android | |
rm -r ./addons/Wwise/native/linux | |
rm -r ./addons/Wwise/native/doc_classes | |
rm ./addons/Wwise/native/SConstruct | |
rm ./LICENSE | |
rm ./README.md | |
rm .gitattributes | |
rm .gitmodules | |
rm -r ./.git | |
rm -r ./.github | |
rm -r ./tests | |
- name: Upload final artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wwise-${{ env.WWISE_VERSION }}-for-godot-${{ env.GODOT_ENGINE_VERSION }}-${{ env.GODOT_ENGINE_STAGE }}-${{ env.INTEGRATION_VERSION }} | |
path: ./ |