2023-08-01 10:47:53 +00:00
|
|
|
name: 🍏 iOS builds
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
2024-03-10 16:23:59 +00:00
|
|
|
godot-ref:
|
2023-08-01 10:47:53 +00:00
|
|
|
description: A tag, branch or commit hash in the Godot repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2024-03-10 16:23:59 +00:00
|
|
|
limboai-ref:
|
2023-08-01 10:47:53 +00:00
|
|
|
description: A tag, branch or commit hash in the LimboAI repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2024-03-10 16:23:59 +00:00
|
|
|
godot-ref:
|
2023-08-01 10:47:53 +00:00
|
|
|
description: A tag, branch or commit hash in the Godot repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2024-03-10 16:23:59 +00:00
|
|
|
limboai-ref:
|
2023-08-01 10:47:53 +00:00
|
|
|
description: A tag, branch or commit hash in the LimboAI repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
|
|
|
|
|
|
|
# Global Settings
|
|
|
|
env:
|
|
|
|
SCONS_CACHE_LIMIT: 4096
|
2024-07-30 11:40:55 +00:00
|
|
|
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra
|
2023-08-01 10:47:53 +00:00
|
|
|
DOTNET_NOLOGO: true
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ios-builds:
|
|
|
|
runs-on: "macos-latest"
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Template (arm64, release)
|
|
|
|
target: template_release
|
|
|
|
arch: arm64
|
|
|
|
ios_simulator: false
|
2024-08-16 18:20:22 +00:00
|
|
|
dotnet: false
|
2023-08-01 10:47:53 +00:00
|
|
|
|
|
|
|
- name: Template (arm64, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: arm64
|
|
|
|
ios_simulator: false
|
2024-08-16 18:20:22 +00:00
|
|
|
dotnet: false
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2024-08-20 13:26:24 +00:00
|
|
|
- name: Simulator (x86_64, release)
|
2023-08-01 10:47:53 +00:00
|
|
|
target: template_release
|
|
|
|
arch: x86_64
|
|
|
|
ios_simulator: true
|
2024-08-16 18:20:22 +00:00
|
|
|
dotnet: false
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2024-08-20 13:26:24 +00:00
|
|
|
- name: Simulator (x86_64, debug)
|
2023-08-01 10:47:53 +00:00
|
|
|
target: template_debug
|
|
|
|
arch: x86_64
|
|
|
|
ios_simulator: true
|
2024-08-16 18:20:22 +00:00
|
|
|
dotnet: false
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2023-08-01 20:09:25 +00:00
|
|
|
# ! Disabled for now as it doesn't work with cctools-port and current LLVM.
|
|
|
|
# * See https://github.com/godotengine/build-containers/pull/85.
|
|
|
|
# - name: Simulator Lib (arm64, release)
|
|
|
|
# target: template_release
|
|
|
|
# arch: arm64
|
|
|
|
# ios_simulator: true
|
|
|
|
|
|
|
|
# - name: Simulator Lib (arm64, debug)
|
|
|
|
# target: template_debug
|
|
|
|
# arch: arm64
|
|
|
|
# ios_simulator: true
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2024-08-20 13:26:24 +00:00
|
|
|
- name: Template .NET (arm64, release)
|
|
|
|
target: template_release
|
|
|
|
arch: arm64
|
|
|
|
ios_simulator: false
|
|
|
|
dotnet: true
|
|
|
|
|
|
|
|
- name: Template .NET (arm64, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: arm64
|
|
|
|
ios_simulator: false
|
|
|
|
dotnet: true
|
|
|
|
|
|
|
|
- name: Simulator .NET (x86_64, release)
|
|
|
|
target: template_release
|
|
|
|
arch: x86_64
|
|
|
|
ios_simulator: true
|
|
|
|
dotnet: true
|
|
|
|
|
|
|
|
- name: Simulator .NET (x86_64, debug)
|
|
|
|
target: template_debug
|
|
|
|
arch: x86_64
|
|
|
|
ios_simulator: true
|
|
|
|
dotnet: true
|
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
env:
|
2024-08-20 13:26:24 +00:00
|
|
|
BIN: godot.ios.${{matrix.target}}.${{matrix.arch}}${{ matrix.dotnet == true && '.mono' || '' }}
|
2023-08-01 10:47:53 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone Godot
|
2023-11-09 14:07:29 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
|
|
|
repository: godotengine/godot
|
2024-03-10 16:23:59 +00:00
|
|
|
ref: ${{ inputs.godot-ref }}
|
2023-08-01 10:47:53 +00:00
|
|
|
|
|
|
|
- name: Clone LimboAI module
|
2023-11-09 14:07:29 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
|
|
|
path: modules/limboai
|
2024-03-10 16:23:59 +00:00
|
|
|
ref: ${{ inputs.limboai-ref }}
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2023-08-02 18:51:22 +00:00
|
|
|
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
|
|
|
|
- uses: ./modules/limboai/.github/actions/init-version
|
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
- name: Set up Python 3.x
|
2024-03-10 13:24:56 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
2024-03-10 13:24:56 +00:00
|
|
|
python-version: "3.x"
|
|
|
|
architecture: "x64"
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up scons
|
2023-08-01 10:47:53 +00:00
|
|
|
run: |
|
|
|
|
python -c "import sys; print(sys.version)"
|
|
|
|
python -m pip install scons==4.4.0
|
|
|
|
|
|
|
|
- name: Diagnostics
|
|
|
|
run: |
|
|
|
|
python --version
|
|
|
|
scons --version
|
|
|
|
dotnet --info
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up Vulkan SDK
|
2023-08-01 10:47:53 +00:00
|
|
|
run: |
|
|
|
|
sh misc/scripts/install_vulkan_sdk_macos.sh
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up scons cache
|
2024-03-10 13:24:56 +00:00
|
|
|
uses: actions/cache@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
|
|
|
path: ${{github.workspace}}/.scons_cache/
|
2024-03-10 16:23:59 +00:00
|
|
|
key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
|
2023-08-01 10:47:53 +00:00
|
|
|
restore-keys: |
|
2024-03-10 16:23:59 +00:00
|
|
|
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
|
|
|
|
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
|
|
|
|
${{env.BIN}}-${{inputs.godot-ref}}
|
2023-08-01 10:47:53 +00:00
|
|
|
|
|
|
|
- name: Compilation
|
|
|
|
env:
|
|
|
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
|
|
run: |
|
2024-08-20 13:26:24 +00:00
|
|
|
scons platform=ios target=${{matrix.target}} arch=${{matrix.arch}} ios_simulator=${{matrix.ios_simulator}} module_mono_enabled=${{matrix.dotnet}} ${{env.SCONSFLAGS}}
|
2023-08-01 10:47:53 +00:00
|
|
|
|
|
|
|
- name: Upload artifact
|
2024-03-10 16:23:59 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
2024-08-20 13:26:24 +00:00
|
|
|
name: tmp-ios${{matrix.dotnet == true && '-dotnet' || ''}}-templates-${{strategy.job-index}}
|
2023-08-01 10:47:53 +00:00
|
|
|
path: bin/*
|
|
|
|
|
|
|
|
package-ios-templates:
|
|
|
|
runs-on: "macos-latest"
|
2024-08-20 13:26:24 +00:00
|
|
|
name: ${{ matrix.name }}
|
2023-08-01 10:47:53 +00:00
|
|
|
needs: ios-builds
|
|
|
|
|
2024-08-20 13:26:24 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Package iOS templates
|
|
|
|
dotnet: false
|
|
|
|
- name: Package iOS .NET templates
|
|
|
|
dotnet: true
|
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
steps:
|
|
|
|
- name: Clone Godot
|
2023-11-09 14:07:29 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
|
|
|
repository: godotengine/godot
|
2024-03-10 16:23:59 +00:00
|
|
|
ref: ${{ inputs.godot-ref }}
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2023-08-02 16:50:17 +00:00
|
|
|
- name: Clone LimboAI module
|
2023-11-09 14:07:29 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-02 16:50:17 +00:00
|
|
|
with:
|
|
|
|
path: modules/limboai
|
2024-03-10 16:23:59 +00:00
|
|
|
ref: ${{ inputs.limboai-ref }}
|
2023-08-02 16:50:17 +00:00
|
|
|
|
|
|
|
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
|
|
|
|
- uses: ./modules/limboai/.github/actions/init-version
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up Vulkan SDK
|
2023-08-01 10:47:53 +00:00
|
|
|
run: |
|
|
|
|
sh misc/scripts/install_vulkan_sdk_macos.sh
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Download templates artifact
|
2024-03-10 16:23:59 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
2024-08-20 13:26:24 +00:00
|
|
|
pattern: tmp-ios${{matrix.dotnet == true && '-dotnet' || ''}}-templates-*
|
2024-03-10 16:23:59 +00:00
|
|
|
merge-multiple: true
|
2023-08-01 10:47:53 +00:00
|
|
|
path: bin/
|
|
|
|
|
|
|
|
- name: Make template bundle
|
|
|
|
run: |
|
|
|
|
ls bin/
|
|
|
|
cp -r misc/dist/ios_xcode bin/
|
|
|
|
cd bin/
|
|
|
|
|
|
|
|
mv libgodot.ios.template_debug.arm64.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
|
2023-08-01 20:09:25 +00:00
|
|
|
# ! 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
|
2023-08-01 10:47:53 +00:00
|
|
|
|
|
|
|
mv libgodot.ios.template_release.arm64.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a
|
2023-08-01 20:09:25 +00:00
|
|
|
# ! lipo -create libgodot.ios.template_release.arm64.simulator.a libgodot.ios.template_release.x86_64.simulator.a -output ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
|
|
|
mv libgodot.ios.template_release.x86_64.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
2023-08-01 10:47:53 +00:00
|
|
|
|
2024-01-26 11:07:30 +00:00
|
|
|
cp -r ~/VulkanSDK/*/macOS/lib/MoltenVK.xcframework ios_xcode
|
2023-08-01 10:47:53 +00:00
|
|
|
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
|
|
|
|
|
|
|
|
mkdir -p ${{github.workspace}}/out/templates/
|
|
|
|
cd ios_xcode
|
|
|
|
zip -q -9 -r ${{github.workspace}}/out/templates/ios.zip *
|
|
|
|
|
2024-08-16 18:20:22 +00:00
|
|
|
echo "${GODOT_VERSION}.limboai+${LIMBOAI_VERSION}${{matrix.dotnet == true && '.mono' || ''}}" > ${{github.workspace}}/out/templates/version.txt
|
2023-11-29 13:32:30 +00:00
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
ls -l ${{github.workspace}}/out/*
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Upload template bundle
|
2024-03-10 16:23:59 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
2024-08-20 13:26:24 +00:00
|
|
|
name: ${{env.NAME_PREFIX}}${{matrix.dotnet == true && '.dotnet' || ''}}.export-templates.ios
|
2023-08-01 10:47:53 +00:00
|
|
|
path: out/*
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Delete templates artifact
|
2024-03-26 17:49:26 +00:00
|
|
|
uses: geekyeggo/delete-artifact@v5
|
2023-08-01 10:47:53 +00:00
|
|
|
with:
|
2024-08-20 13:26:24 +00:00
|
|
|
name: tmp-ios${{matrix.dotnet == true && '-dotnet' || ''}}-templates-*
|
2024-03-10 16:23:59 +00:00
|
|
|
useGlob: true
|
|
|
|
failOnError: false
|