Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Update macOS CI to support Apple Silicon runners #376

Merged
merged 10 commits into from
Feb 3, 2024
38 changes: 25 additions & 13 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,29 @@ jobs:
build_and_test:
strategy:
matrix:
os: [ macos-11, macos-12 ]
compiler: [ g++-11, g++-12, clang++ ]
os: [ macos-12, macos-13, macos-14 ]
compiler: [ g++-11, g++-12, g++-13, clang++ ]
build_type: [ Debug, Release ]
include:
- os: macos-12
architecture: x64
- os: macos-13
architecture: x64
- os: macos-14
architecture: arm64
- compiler: clang++
ccompiler: clang
- compiler: g++-11
ccompiler: gcc-11
- compiler: g++-12
ccompiler: gcc-12
- os: macos-11
compiler: g++-10
ccompiler: gcc-10
build_type: Debug
- os: macos-11
compiler: g++-10
ccompiler: gcc-10
build_type: Release
exclude:
- os: macos-14
compiler: g++-11
- os: macos-14
compiler: g++-12
- os: macos-14
compiler: g++-13

name: ${{matrix.os}} with ${{matrix.compiler}} (${{matrix.build_type}} mode)
runs-on: ${{matrix.os}}
Expand All @@ -70,11 +75,18 @@ jobs:
run: brew install tbb

# Use XCode 13.2 as a workaround because XCode 14.0 seems broken
- name: Setup XCode version
- if: matrix.os == 'macos-12'
name: Setup XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^13.2"

- if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
name: Setup XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^14.2"

- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -89,7 +101,7 @@ jobs:
with:
version: ${{env.Z3_VERSION}}
platform: macOS
architecture: x64
architecture: ${{matrix.architecture}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand All @@ -115,7 +127,7 @@ jobs:

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j3 # macOS runners provide 3 cores
run: cmake --build . -j3 # all macOS runners provide at least 3 cores

- name: Test
working-directory: ${{github.workspace}}/build
Expand Down