From 34ef1043ee1783f8ab20e74a8f883a235a96d629 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 14 Feb 2024 22:21:57 +0100 Subject: [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. --- .github/workflows/build_release.yml | 54 ++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 15 deletions(-) (limited to '.github/workflows/build_release.yml') 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 -- cgit v1.2.3