Skip to content

Commit

Permalink
[CI] Make OSX universal build instead 2 builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Faless committed Sep 29, 2021
1 parent 67f9109 commit 480ad9f
Showing 1 changed file with 3 additions and 37 deletions.
40 changes: 3 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
if-no-files-found: error

macos:
name: Build (macOS, Clang)
runs-on: macos-10.15
name: Build (macOS, Clang, universal / x86_64 + arm64)
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -116,41 +116,7 @@ jobs:
- name: Build godot-cpp
run: |
scons target=release generate_bindings=yes macos_arch=x86_64 -j $(sysctl -n hw.logicalcpu)
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: godot-cpp-macos-x86_64-release
path: bin/libgodot-cpp.osx.release.x86_64.a
if-no-files-found: error

macos-arm64:
name: Build (macOS, Clang, cross-compile arm64)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up Python (for SCons)
uses: actions/setup-python@v2
with:
python-version: '3.x'

- 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)
scons target=release generate_bindings=yes -j $(sysctl -n hw.logicalcpu)
static-checks:
name: Static Checks (clang-format)
Expand Down

0 comments on commit 480ad9f

Please sign in to comment.