diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2024-02-14 22:21:57 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2024-02-15 22:57:03 +0100 |
commit | 34ef1043ee1783f8ab20e74a8f883a235a96d629 (patch) | |
tree | 1bc5e49105e01d8961a9d1e5c65b887070f63616 /.github | |
parent | 7141bc487ec76c336fe1775d58771cecdb507957 (diff) | |
download | fork-godot-webrtc-native-34ef1043ee1783f8ab20e74a8f883a235a96d629.tar.gz fork-godot-webrtc-native-34ef1043ee1783f8ab20e74a8f883a235a96d629.tar.bz2 fork-godot-webrtc-native-34ef1043ee1783f8ab20e74a8f883a235a96d629.zip |
[Linux] Add arm32/arm64 linux builds support
Fix arch detection in GDNative builds (3.x) and add a small patch to
avoid warnings spam on ARM.
Make CMake march flags explicit for Linux arm32/arm64.
Add new platforms to CI.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build_release.yml | 54 |
1 files changed, 39 insertions, 15 deletions
diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 43538b1..01589aa 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -76,18 +76,32 @@ jobs: # Linux - platform: linux arch: 'x86_32' - buildroot: 'i686' + buildroot: 'i686-godot-linux-gnu_sdk-buildroot' gdnative_flags: 'bits=32' sconsflags: '' os: 'ubuntu-20.04' cache-name: linux-x86_32 - platform: linux arch: 'x86_64' - buildroot: 'x86_64' + buildroot: 'x86_64-godot-linux-gnu_sdk-buildroot' gdnative_flags: 'bits=64' sconsflags: '' os: 'ubuntu-20.04' cache-name: linux-x86_64 + - platform: linux + arch: 'arm32' + buildroot: 'arm-godot-linux-gnueabihf_sdk-buildroot' + gdnative_flags: 'bits=32' + sconsflags: '' + os: 'ubuntu-20.04' + cache-name: linux-arm32 + - platform: linux + arch: 'arm64' + buildroot: 'aarch64-godot-linux-gnu_sdk-buildroot' + gdnative_flags: 'bits=64' + sconsflags: '' + os: 'ubuntu-20.04' + cache-name: linux-arm64 # macOS - platform: macos @@ -144,26 +158,20 @@ jobs: dpkg -l | grep ii | grep mingw update-alternatives --get-selections | grep mingw + - name: Install Linux build dependencies + if: ${{ matrix.platform == 'linux' }} + run: | + sudo apt-get update + sudo apt-get install build-essential gcc-multilib g++-multilib wget + - name: Setup Linux buildroot toolchain cache if: ${{ matrix.platform == 'linux' }} uses: actions/cache@v4 with: path: | - ${{ matrix.buildroot }}-godot-linux-gnu_sdk-buildroot.tar.bz2 + ${{ matrix.buildroot }}.tar.bz2 key: linux-${{ matrix.buildroot }}-buildroot - - name: Install Linux build dependencies - if: ${{ matrix.platform == 'linux' }} - run: | - sudo apt-get update - sudo apt-get install build-essential gcc-multilib g++-multilib wget - if [ ! -f ${{ matrix.buildroot }}-godot-linux-gnu_sdk-buildroot.tar.bz2 ]; then - wget https://downloads.tuxfamily.org/godotengine/toolchains/linux/${{ matrix.buildroot }}-godot-linux-gnu_sdk-buildroot.tar.bz2 - fi - tar -xjf ${{ matrix.buildroot }}-godot-linux-gnu_sdk-buildroot.tar.bz2 - echo "$GITHUB_WORKSPACE/${{ matrix.buildroot }}-godot-linux-gnu_sdk-buildroot/bin" >> $GITHUB_PATH - patch -p1 < misc/patches/scons_path.diff - - name: Set up Python 3.x uses: actions/setup-python@v5 with: @@ -174,6 +182,22 @@ jobs: run: | python -c "import sys; print(sys.version)" python -m pip install scons + + - name: Setup Linux toolchains + if: ${{ matrix.platform == 'linux' }} + run: | + if [ ! -f ${{ matrix.buildroot }}.tar.bz2 ]; then + wget https://downloads.tuxfamily.org/godotengine/toolchains/linux/${{ matrix.buildroot }}.tar.bz2 + fi + tar -xjf ${{ matrix.buildroot }}.tar.bz2 + ${{ matrix.buildroot }}/relocate-sdk.sh + echo "$GITHUB_WORKSPACE/${{ matrix.buildroot }}/bin" >> $GITHUB_PATH + echo "PKG_CONFIG=$GITHUB_WORKSPACE/${{ matrix.buildroot }}/share/pkgconfig/" >> $GITHUB_ENV + patch -p1 < misc/patches/scons_path.diff + patch -p1 < misc/patches/gdnantive_arm_warnings.diff + + - name: Print tools versions + run: | python --version scons --version cmake --version |