Skip to content

Commit

Permalink
Set required Xcode version in CI for gcc-13
Browse files Browse the repository at this point in the history
The pre-installed gcc 13.3 (brew package 'gcc-13') only seems to work
with an older MacOSX.sdk version than the default in a macos-12 runner.
By setting a specific version gcc will use matching headers like:
/Applications/Xcode_14.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h

Add a check if the compiler is already installed, which silences a warning.
  • Loading branch information
bjosv committed Jun 4, 2024
1 parent 6d21e17 commit 3c990a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ jobs:
- 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 install gcc@${{ matrix.gcc-version }}
# Switch to a working Xcode version.
sudo xcode-select -s /Applications/Xcode_14.0.app/Contents/Developer
- name: Build and run tests
env:
CC: gcc-${{ matrix.gcc-version }}
Expand Down

0 comments on commit 3c990a2

Please sign in to comment.