Add OSX arm64 build target.

New "macos_arch" to specify the desired arch, and "macos_sdk_path" to
override the default SDK path.
This commit is contained in:
Fabio Alessandrelli
2021-07-05 16:07:55 +02:00
parent dbf3a13d0f
commit 5b8bcb7164
2 changed files with 45 additions and 2 deletions

View File

@@ -145,6 +145,33 @@ jobs:
run: |
./Godot.app/Contents/MacOS/Godot --path test -s script.gd
macos-arm64:
name: Build (macOS, Clang, cross-compile arm64)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
submodules: recursive
- name: Set up Python (for SCons)
uses: actions/setup-python@v2
with:
python-version: '3.9.1'
- name: Install dependencies
run: |
python -m pip install scons
- name: Build godot-cpp
run: |
# The default SDK in github the actions environemnt seems to have problems compiling for arm64.
# Use the latest 11.x SDK.
SDK_BASE=/Library/Developer/CommandLineTools/SDKs
SDK_VER=$(ls $SDK_BASE | grep "MacOSX11." | sort -r | head -n1)
echo $SDK_BASE/$SDK_VER/
scons target=release generate_bindings=yes macos_arch=arm64 macos_deployment_target=10.15 macos_sdk_path="$SDK_BASE/$SDK_VER/" -j $(sysctl -n hw.logicalcpu)
static-checks:
name: Static Checks (clang-format)
runs-on: ubuntu-20.04