From f112198031dca2136f9b4fe043c4e8efc00f0611 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 18 Jul 2024 17:09:30 +0200 Subject: [PATCH 1/7] GHA: Add GDExtension iOS builds --- .github/workflows/gdextension.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index 44db582..d2ac1ce 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -160,6 +160,20 @@ jobs: arch: x86_32 should-build: ${{ !inputs.test-build }} + - name: 🍏 iOS (universal, release) + runner: macos-latest + platform: ios + target: template_release + arch: universal + should-build: ${{ !inputs.test-build }} + + - name: 🍏 iOS (universal, debug) + runner: macos-latest + platform: ios + target: template_debug + arch: universal + should-build: ${{ !inputs.test-build }} + exclude: - { opts: { should-build: false } } @@ -293,7 +307,10 @@ jobs: ls -l -R out/addons/limboai/bin/ echo "---" if [ "$RUNNER_OS" == "macOS" ]; then - strip -u out/addons/limboai/bin/liblimboai*/liblimboai* + # MacOS libs + strip -u out/addons/limboai/bin/liblimboai*/liblimboai* || true + # iOS libs + strip -u out/addons/limboai/bin/liblimboai* || true else strip out/addons/limboai/bin/liblimboai* fi From 1b9a9843142db962a7a39f9d437e03d8b429981c Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 18 Jul 2024 17:20:48 +0200 Subject: [PATCH 2/7] GHA: Change default godot-cpp branch to master --- .github/workflows/gdextension.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index d2ac1ce..22aca10 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -5,7 +5,7 @@ on: godot-cpp-ref: description: A tag, branch or commit hash in the godot-cpp repository. type: string - default: 4.2 + default: master limboai-ref: description: A tag, branch or commit hash in the LimboAI repository. type: string @@ -20,7 +20,7 @@ on: godot-cpp-ref: description: A tag, branch or commit hash in the godot-cpp repository. type: string - default: 4.2 + default: master limboai-ref: description: A tag, branch or commit hash in the LimboAI repository. type: string From 6bfc2005c611e7834de42feac961b14a3909e61b Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 18 Jul 2024 17:37:19 +0200 Subject: [PATCH 3/7] Add iOS builds to the GDExtension manifest --- gdextension/limboai.gdextension | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdextension/limboai.gdextension b/gdextension/limboai.gdextension index 4cea5dd..51149b5 100644 --- a/gdextension/limboai.gdextension +++ b/gdextension/limboai.gdextension @@ -25,6 +25,8 @@ android.debug.x86_64 = "res://addons/limboai/bin/liblimboai.android.template_deb android.release.x86_64 = "res://addons/limboai/bin/liblimboai.android.template_release.x86_64.so" android.debug.x86_32 = "res://addons/limboai/bin/liblimboai.android.template_debug.x86_32.so" android.release.x86_32 = "res://addons/limboai/bin/liblimboai.android.template_release.x86_32.so" +ios.release = "res://addons/limboai/bin/liblimboai.ios.template_release.universal.dylib" +ios.debug = "res://addons/limboai/bin/liblimboai.ios.template_debug.universal.dylib" web.debug.wasm32 = "res://addons/limboai/bin/liblimboai.web.template_debug.wasm32.wasm" web.release.wasm32 = "res://addons/limboai/bin/liblimboai.web.template_release.wasm32.wasm" From 152d80a182f9f60792c2aacbdd6805856614a112 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 18 Jul 2024 18:27:36 +0200 Subject: [PATCH 4/7] GHA: Disable stripping of iOS libs --- .github/workflows/gdextension.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index 22aca10..3a3f116 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -310,7 +310,7 @@ jobs: # MacOS libs strip -u out/addons/limboai/bin/liblimboai*/liblimboai* || true # iOS libs - strip -u out/addons/limboai/bin/liblimboai* || true + # strip -u out/addons/limboai/bin/liblimboai* || true else strip out/addons/limboai/bin/liblimboai* fi From ee79d6ca2d33d4ef77898f0b4b42c8184e3a41aa Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 18 Jul 2024 21:19:26 +0200 Subject: [PATCH 5/7] GHA: Change iOS arch to arm64 & build simulator libs --- .github/workflows/gdextension.yml | 18 ++++++++++++++++-- gdextension/limboai.gdextension | 6 ++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index 3a3f116..630761d 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -160,14 +160,28 @@ jobs: arch: x86_32 should-build: ${{ !inputs.test-build }} - - name: 🍏 iOS (universal, release) + - name: 🍏 iOS (arm64, release) + runner: macos-latest + platform: ios + target: template_release + arch: arm64 + should-build: ${{ !inputs.test-build }} + + - name: 🍏 iOS (arm64, debug) + runner: macos-latest + platform: ios + target: template_debug + arch: arm64 + should-build: ${{ !inputs.test-build }} + + - name: 🍏 iOS (simulator, release) runner: macos-latest platform: ios target: template_release arch: universal should-build: ${{ !inputs.test-build }} - - name: 🍏 iOS (universal, debug) + - name: 🍏 iOS (simulator, debug) runner: macos-latest platform: ios target: template_debug diff --git a/gdextension/limboai.gdextension b/gdextension/limboai.gdextension index 51149b5..50915a5 100644 --- a/gdextension/limboai.gdextension +++ b/gdextension/limboai.gdextension @@ -25,8 +25,10 @@ android.debug.x86_64 = "res://addons/limboai/bin/liblimboai.android.template_deb android.release.x86_64 = "res://addons/limboai/bin/liblimboai.android.template_release.x86_64.so" android.debug.x86_32 = "res://addons/limboai/bin/liblimboai.android.template_debug.x86_32.so" android.release.x86_32 = "res://addons/limboai/bin/liblimboai.android.template_release.x86_32.so" -ios.release = "res://addons/limboai/bin/liblimboai.ios.template_release.universal.dylib" -ios.debug = "res://addons/limboai/bin/liblimboai.ios.template_debug.universal.dylib" +ios.release.arm64 = "res://addons/limboai/bin/liblimboai.ios.template_release.arm64.dylib" +ios.debug.arm64 = "res://addons/limboai/bin/liblimboai.ios.template_debug.arm64.dylib" +ios.release.simulator = "res://addons/limboai/bin/liblimboai.ios.template_release.universal.dylib" +ios.debug.simulator = "res://addons/limboai/bin/liblimboai.ios.template_debug.universal.dylib" web.debug.wasm32 = "res://addons/limboai/bin/liblimboai.web.template_debug.wasm32.wasm" web.release.wasm32 = "res://addons/limboai/bin/liblimboai.web.template_release.wasm32.wasm" From 66931c1a368d3b659495e987062d8b5a0d787711 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Fri, 19 Jul 2024 10:55:06 +0200 Subject: [PATCH 6/7] GHA: Build with ios_simulator=yes flag --- .github/workflows/gdextension.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index 630761d..d78f245 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -179,6 +179,7 @@ jobs: platform: ios target: template_release arch: universal + scons-flags: ios_simulator=yes should-build: ${{ !inputs.test-build }} - name: 🍏 iOS (simulator, debug) @@ -186,6 +187,7 @@ jobs: platform: ios target: template_debug arch: universal + scons-flags: ios_simulator=yes should-build: ${{ !inputs.test-build }} exclude: @@ -300,7 +302,7 @@ jobs: SCONS_CACHE: ${{github.workspace}}/.scons_cache/ run: | PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH - scons platform=${{matrix.opts.platform}} target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} ${{env.SCONSFLAGS}} + scons platform=${{matrix.opts.platform}} target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} ${{matrix.opts.scons-flags}} ${{env.SCONSFLAGS}} - name: Prepare artifact shell: bash From 32393d6f64d9580380877fe884c5fe0eaab6d38d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Fri, 19 Jul 2024 11:17:23 +0200 Subject: [PATCH 7/7] GHA: Refactor stripping of iOS libraries --- .github/workflows/gdextension.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index d78f245..4330666 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -322,11 +322,10 @@ jobs: run: | ls -l -R out/addons/limboai/bin/ echo "---" - if [ "$RUNNER_OS" == "macOS" ]; then - # MacOS libs - strip -u out/addons/limboai/bin/liblimboai*/liblimboai* || true - # iOS libs - # strip -u out/addons/limboai/bin/liblimboai* || true + if [ "${{matrix.opts.platform}}" == "macos" ]; then + strip -u out/addons/limboai/bin/liblimboai*/liblimboai* + elif [ "${{matrix.opts.platform}}" == "ios" ]; then + strip -u out/addons/limboai/bin/liblimboai* else strip out/addons/limboai/bin/liblimboai* fi