Skip to content

Commit

Permalink
Separate CI jobs for macOS on x86 (#284)
Browse files Browse the repository at this point in the history
Refactor weekly build to avoid XCode version sensitive macOS builds, fix warning in CI build

Add a check if the compiler is already installed, which silences a warning.

* Run on both M1 and x86 Macs in CI

* Run x86 macos in separate CI jobs

* Fix CI warnings in macos runs

Lift macos runner in CI and only install needed tools.
  • Loading branch information
bjosv authored Jun 10, 2024
1 parent 6d21e17 commit 896db54
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
macos:
name: macOS
runs-on: macos-12
runs-on: macos-14
steps:
- name: Prepare
run: |
brew install cmake ninja
brew install ninja
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Build and run tests
run: |
Expand Down
42 changes: 38 additions & 4 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,17 @@ jobs:
macos-clang:
name: macOS Clang
runs-on: macos-12
runs-on: macos-14
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Build and run tests
run: |
scripts/initbuild.sh make-concurrent
scripts/test.sh
macos-clang-x86:
name: macOS Clang (x86)
runs-on: macos-13 # Last macos x86 runner
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Build and run tests
Expand All @@ -146,16 +156,40 @@ jobs:
macos-gcc:
name: macOS GCC ${{ matrix.gcc-version }}
runs-on: macos-12
runs-on: macos-14
strategy:
fail-fast: false
matrix:
gcc-version: [11, 14]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Prepare
run: |
# Install gcc if not already available.
brew list gcc@${{ matrix.gcc-version }} &>/dev/null || \
(brew update && brew install gcc@${{ matrix.gcc-version }})
- name: Build and run tests
env:
CC: gcc-${{ matrix.gcc-version }}
CXX: g++-${{ matrix.gcc-version }}
run: |
scripts/initbuild.sh make-concurrent
scripts/test.sh
macos-gcc-x86:
name: macOS GCC ${{ matrix.gcc-version }} (x86)
runs-on: macos-13 # Last macos x86 runner
strategy:
fail-fast: false
matrix:
gcc-version: [10, 13]
gcc-version: [10, 14]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Prepare
run: |
brew install gcc@${{ matrix.gcc-version }}
# Install gcc if not already available.
brew list gcc@${{ matrix.gcc-version }} &>/dev/null || \
(brew update && brew install gcc@${{ matrix.gcc-version }})
- name: Build and run tests
env:
CC: gcc-${{ matrix.gcc-version }}
Expand Down

0 comments on commit 896db54

Please sign in to comment.