From 3cce7aa0a60e0f8772ec5e88ad281600a1292d3d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Jul 2024 14:16:01 +0200 Subject: [PATCH 1/7] GHA: Add arm64 Linux builds --- .github/workflows/linux.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 252269a..67bfc34 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -45,6 +45,8 @@ jobs: fail-fast: false matrix: opts: + # * Standard x86_64 + - name: Editor (x86_64, release) target: editor arch: x86_64 @@ -63,6 +65,8 @@ jobs: dotnet: false should-build: ${{ !inputs.test-build }} + # * Standard x86_32 + # - name: Editor (x86_32, release) # target: editor # arch: x86_32 @@ -81,6 +85,28 @@ jobs: dotnet: false should-build: ${{ !inputs.test-build }} + # * Standard arm64 + + - name: Editor (arm64, release) + target: editor + arch: arm64 + dotnet: false + should-build: ${{ !inputs.test-build }} + + - name: Template (arm64, release) + target: template_release + arch: arm64 + dotnet: false + should-build: ${{ !inputs.test-build }} + + - name: Template (arm64, debug) + target: template_debug + arch: arm64 + dotnet: false + should-build: ${{ !inputs.test-build }} + + # * .NET x86_64 + - name: Editor .NET (x86_64, release) target: editor arch: x86_64 @@ -99,6 +125,8 @@ jobs: dotnet: true should-build: ${{ !inputs.test-build }} + # * .NET x86_32 + # - name: Editor .NET (x86_32, release) # target: editor # arch: x86_32 @@ -117,6 +145,26 @@ jobs: dotnet: true should-build: ${{ !inputs.test-build }} + # * .NET arm64 + + - name: Editor .NET (arm64, release) + target: editor + arch: arm64 + dotnet: true + should-build: ${{ !inputs.test-build }} + + - name: Template .NET (arm64, release) + target: template_release + arch: arm64 + dotnet: true + should-build: ${{ !inputs.test-build }} + + - name: Template .NET (arm64, debug) + target: template_debug + arch: arm64 + dotnet: true + should-build: ${{ !inputs.test-build }} + exclude: - { opts: { should-build: false } } From 85685720929d346b8a308a90b6c31a602321267f Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Jul 2024 14:20:46 +0200 Subject: [PATCH 2/7] GHA: Add Windows ARM64 builds --- .github/workflows/windows.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 195bc8a..8bdb12c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -46,6 +46,8 @@ jobs: fail-fast: false matrix: opts: + # * Standard x86_64 + - name: Editor (x86_64, release) target: editor arch: x86_64 @@ -64,6 +66,8 @@ jobs: dotnet: false should-build: ${{ !inputs.test-build }} + # * Standard x86_32 + # - name: Editor (x86_32, release) # target: editor # arch: x86_32 @@ -82,6 +86,28 @@ jobs: dotnet: false should-build: ${{ !inputs.test-build }} + # * Standard arm64 + + # - name: Editor (arm64, release) + # target: editor + # arch: arm64 + # dotnet: false + # should-build: ${{ !inputs.test-build }} + + - name: Template (arm64, release) + target: template_release + arch: arm64 + dotnet: false + should-build: ${{ !inputs.test-build }} + + - name: Template (arm64, debug) + target: template_debug + arch: arm64 + dotnet: false + should-build: ${{ !inputs.test-build }} + + # * .NET x86_64 + - name: Editor .NET (x86_64, release) target: editor arch: x86_64 @@ -100,6 +126,8 @@ jobs: dotnet: true should-build: ${{ !inputs.test-build }} + # * .NET x86_32 + # - name: Editor .NET (x86_32, release) # target: editor # arch: x86_32 @@ -118,6 +146,26 @@ jobs: dotnet: true should-build: ${{ !inputs.test-build }} + # * .NET arm64 + + # - name: Editor (arm64, release) + # target: editor + # arch: arm64 + # dotnet: true + # should-build: ${{ !inputs.test-build }} + + - name: Template (arm64, release) + target: template_release + arch: arm64 + dotnet: true + should-build: ${{ !inputs.test-build }} + + - name: Template (arm64, debug) + target: template_debug + arch: arm64 + dotnet: true + should-build: ${{ !inputs.test-build }} + exclude: - { opts: { should-build: false } } From dad5082e7e59acd105338f14b321aeaca1fd5e45 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Jul 2024 14:50:29 +0200 Subject: [PATCH 3/7] GHA: Add Linux ARM toolchain --- .github/actions/setup-linux-toolchain/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/setup-linux-toolchain/action.yml b/.github/actions/setup-linux-toolchain/action.yml index 3811b27..936414f 100644 --- a/.github/actions/setup-linux-toolchain/action.yml +++ b/.github/actions/setup-linux-toolchain/action.yml @@ -15,6 +15,9 @@ runs: TOOLCHAIN_64_SHA=16c8302fcb676c1f0fb9df73d6cff250ba1f4286 TOOLCHAIN_32_URL=https://github.com/godotengine/buildroot/releases/download/godot-2020.11.x-2/i686-godot-linux-gnu_sdk-buildroot.tar.bz2 TOOLCHAIN_32_SHA=6171652abc54ef219e5187bc53660ee4e2f796f4 + TOOLCHAIN_ARM64_URL=https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-3/aarch64-godot-linux-gnu_sdk-buildroot.tar.bz2 + TOOLCHAIN_ARM64_SHA=73bed3d26b92c8b9a93c0ceb6bcce8fe567d1764 + # ! Export variables: if [[ "${{ inputs.arch }}" == "x86_64" ]]; then echo "TOOLCHAIN_URL=${TOOLCHAIN_64_URL}" >> "$GITHUB_ENV" @@ -22,6 +25,9 @@ runs: elif [[ "${{ inputs.arch }}" == "x86_32" ]]; then echo "TOOLCHAIN_URL=${TOOLCHAIN_32_URL}" >> "$GITHUB_ENV" echo "TOOLCHAIN_SHA=${TOOLCHAIN_32_SHA}" >> "$GITHUB_ENV" + elif [[ "${{ inputs.arch }}" == "arm64" ]]; then + echo "TOOLCHAIN_URL=${TOOLCHAIN_ARM64_URL}" >> "$GITHUB_ENV" + echo "TOOLCHAIN_SHA=${TOOLCHAIN_ARM64_SHA}" >> "$GITHUB_ENV" fi - name: Cache buildroot From af27aca021396b3b3dd9b4df23635d2d5419c7ad Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 30 Jul 2024 16:19:02 +0200 Subject: [PATCH 4/7] GHA: Fix strip failing in Linux ARM64 builds --- .github/workflows/linux.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 67bfc34..87febd2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -231,7 +231,11 @@ jobs: env: OUTDIR: ${{ startsWith(matrix.opts.target, 'template') && 'out/templates' || 'out/' }} run: | - strip ./bin/godot.* + if [ "${{matrix.opts.arch}}" == "arm64" ]; then + ${GITHUB_WORKSPACE}/buildroot/bin/aarch64-godot-linux-gnu-strip ./bin/godot.* + else + strip ./bin/godot.* + fi chmod +x ./bin/godot.* mkdir -p ${{env.OUTDIR}} mv bin/* ${{env.OUTDIR}} From afc2b63f066d93e17a4d7169dfeea0d36975f4cb Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 31 Jul 2024 10:43:56 +0200 Subject: [PATCH 5/7] GHA: Disable Editor .NET ARM64 --- .github/workflows/linux.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 87febd2..79a0343 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -147,11 +147,13 @@ jobs: # * .NET arm64 - - name: Editor .NET (arm64, release) - target: editor - arch: arm64 - dotnet: true - should-build: ${{ !inputs.test-build }} + # ! FIXME: Needs a separate job for .NET glue generation since we can't execute arm64 binaries on x86_64. + # ! Alternatively, solution generation can be done as post-process job, taking the glue from x86_64, after all builds complete. + # - name: Editor .NET (arm64, release) + # target: editor + # arch: arm64 + # dotnet: true + # should-build: ${{ !inputs.test-build }} - name: Template .NET (arm64, release) target: template_release From 2c58cfc3cba0c95f5592d8ba064b517d9a215d33 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 31 Jul 2024 10:46:53 +0200 Subject: [PATCH 6/7] GHA: Don't strip binaries, done at build time --- .github/workflows/gdextension.yml | 13 ------------- .github/workflows/ios.yml | 3 --- .github/workflows/linux.yml | 5 ----- .github/workflows/macos.yml | 5 ----- 4 files changed, 26 deletions(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index 44db582..e27e397 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -287,19 +287,6 @@ jobs: echo "---" ls -R out/ - - name: Strip lib - if: matrix.opts.platform != 'windows' && matrix.opts.platform != 'web' && (matrix.opts.platform != 'android' || startsWith(matrix.opts.arch, 'x86')) - run: | - ls -l -R out/addons/limboai/bin/ - echo "---" - if [ "$RUNNER_OS" == "macOS" ]; then - strip -u out/addons/limboai/bin/liblimboai*/liblimboai* - else - strip out/addons/limboai/bin/liblimboai* - fi - echo "---" - ls -l -R out/addons/limboai/bin/ - - name: Upload artifact uses: actions/upload-artifact@v4 env: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 6f484a5..cbcc1fb 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -170,9 +170,6 @@ jobs: cp -r misc/dist/ios_xcode bin/ cd bin/ - # --- Note: Doesn't look like libs need stripping --- - # strip *.a - mv libgodot.ios.template_debug.arm64.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a # ! lipo -create libgodot.ios.template_debug.arm64.simulator.a libgodot.ios.template_debug.x86_64.simulator.a -output ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a mv libgodot.ios.template_debug.x86_64.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 79a0343..ef48347 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -233,11 +233,6 @@ jobs: env: OUTDIR: ${{ startsWith(matrix.opts.target, 'template') && 'out/templates' || 'out/' }} run: | - if [ "${{matrix.opts.arch}}" == "arm64" ]; then - ${GITHUB_WORKSPACE}/buildroot/bin/aarch64-godot-linux-gnu-strip ./bin/godot.* - else - strip ./bin/godot.* - fi chmod +x ./bin/godot.* mkdir -p ${{env.OUTDIR}} mv bin/* ${{env.OUTDIR}} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 92b9aec..a0980ad 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -199,7 +199,6 @@ jobs: - name: Prepare artifact run: | - strip bin/godot.* chmod +x bin/godot.* - name: Upload artifact @@ -257,9 +256,6 @@ jobs: run: | ls bin/ lipo -create bin/godot.macos.editor.x86_64* bin/godot.macos.editor.arm64* -output bin/godot.macos.editor.universal - du -sh bin/ - strip bin/godot.macos.editor.universal - du -sh bin/ mkdir -p out/editor/ cp -r misc/dist/macos_tools.app out/editor/${APP_NAME} mkdir -p out/editor/${APP_NAME}/Contents/{MacOS,Resources} @@ -295,7 +291,6 @@ jobs: ls bin/ lipo -create bin/godot.macos.template_release.x86_64* bin/godot.macos.template_release.arm64* -output bin/godot.macos.template_release.universal lipo -create bin/godot.macos.template_debug.x86_64* bin/godot.macos.template_debug.arm64* -output bin/godot.macos.template_debug.universal - strip bin/godot.*.universal cp -r misc/dist/macos_template.app macos_template.app mkdir -p macos_template.app/Contents/MacOS cp bin/godot.macos.template_debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal From abe9a264602b5b34223b0b6d79603279bb74950e Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 31 Jul 2024 12:19:44 +0200 Subject: [PATCH 7/7] GHA: Add Linux ARM32 template builds --- .../actions/setup-linux-toolchain/action.yml | 5 ++++ .github/workflows/linux.yml | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/.github/actions/setup-linux-toolchain/action.yml b/.github/actions/setup-linux-toolchain/action.yml index 936414f..d614267 100644 --- a/.github/actions/setup-linux-toolchain/action.yml +++ b/.github/actions/setup-linux-toolchain/action.yml @@ -17,6 +17,8 @@ runs: TOOLCHAIN_32_SHA=6171652abc54ef219e5187bc53660ee4e2f796f4 TOOLCHAIN_ARM64_URL=https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-3/aarch64-godot-linux-gnu_sdk-buildroot.tar.bz2 TOOLCHAIN_ARM64_SHA=73bed3d26b92c8b9a93c0ceb6bcce8fe567d1764 + TOOLCHAIN_ARM32_URL=https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-3/arm-godot-linux-gnueabihf_sdk-buildroot.tar.bz2 + TOOLCHAIN_ARM32_SHA=aa5853fd73faec3837c6127649471275d7e61cb2 # ! Export variables: if [[ "${{ inputs.arch }}" == "x86_64" ]]; then @@ -28,6 +30,9 @@ runs: elif [[ "${{ inputs.arch }}" == "arm64" ]]; then echo "TOOLCHAIN_URL=${TOOLCHAIN_ARM64_URL}" >> "$GITHUB_ENV" echo "TOOLCHAIN_SHA=${TOOLCHAIN_ARM64_SHA}" >> "$GITHUB_ENV" + elif [[ "${{ inputs.arch }}" == "arm32" ]]; then + echo "TOOLCHAIN_URL=${TOOLCHAIN_ARM32_URL}" >> "$GITHUB_ENV" + echo "TOOLCHAIN_SHA=${TOOLCHAIN_ARM32_SHA}" >> "$GITHUB_ENV" fi - name: Cache buildroot diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ef48347..63b281e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -105,6 +105,20 @@ jobs: dotnet: false should-build: ${{ !inputs.test-build }} + # * Standard arm32 + + - name: Template (arm32, release) + target: template_release + arch: arm32 + dotnet: false + should-build: ${{ !inputs.test-build }} + + - name: Template (arm32, debug) + target: template_debug + arch: arm32 + dotnet: false + should-build: ${{ !inputs.test-build }} + # * .NET x86_64 - name: Editor .NET (x86_64, release) @@ -167,6 +181,20 @@ jobs: dotnet: true should-build: ${{ !inputs.test-build }} + # * .NET arm32 + + - name: Template .NET (arm32, release) + target: template_release + arch: arm32 + dotnet: true + should-build: ${{ !inputs.test-build }} + + - name: Template .NET (arm32, debug) + target: template_debug + arch: arm32 + dotnet: true + should-build: ${{ !inputs.test-build }} + exclude: - { opts: { should-build: false } }