CI: Use Xcode's Clang in the macOS workflows

Most users will be building with Xcode Clang on macOS anyway, as our
build scripts default to the system compiler if it's new enough. We
already have an upstream Clang-based workflow on Linux, so we won't lose
any compiler coverage by switching to Apple Clang on macOS.

This should help us avoid build breakages like #186.
This commit is contained in:
Daniel Bertalan
2024-06-19 14:19:24 +02:00
committed by Andrew Kaster
parent d86a6e1bec
commit 9df41954c0
3 changed files with 5 additions and 4 deletions

View File

@@ -49,6 +49,7 @@ runs:
shell: bash shell: bash
run: | run: |
set -e set -e
sudo xcode-select --switch /Applications/Xcode_15.4.app
brew update brew update
brew install autoconf autoconf-archive automake coreutils bash ninja wabt ccache unzip qt llvm@18 brew install autoconf autoconf-archive automake coreutils bash ninja wabt ccache unzip qt llvm@18

View File

@@ -72,8 +72,8 @@ jobs:
echo "host_cxx=g++-13" >> "$GITHUB_OUTPUT" echo "host_cxx=g++-13" >> "$GITHUB_OUTPUT"
fi fi
elif ${{ inputs.os_name == 'macOS' }} ; then elif ${{ inputs.os_name == 'macOS' }} ; then
echo "host_cc=$(brew --prefix llvm@18)/bin/clang" >> "$GITHUB_OUTPUT" echo "host_cc=$(xcrun --find clang)" >> "$GITHUB_OUTPUT"
echo "host_cxx=$(brew --prefix llvm@18)/bin/clang++" >> "$GITHUB_OUTPUT" echo "host_cxx=$(xcrun --find clang++)" >> "$GITHUB_OUTPUT"
fi fi
- name: Set dynamic environment variables - name: Set dynamic environment variables

View File

@@ -60,8 +60,8 @@ jobs:
- name: Assign Build Parameters - name: Assign Build Parameters
id: 'build-parameters' id: 'build-parameters'
run: | run: |
echo "host_cc=$(brew --prefix llvm@18)/bin/clang" >> "$GITHUB_OUTPUT" echo "host_cc=$(xcrun --find clang)" >> "$GITHUB_OUTPUT"
echo "host_cxx=$(brew --prefix llvm@18)/bin/clang++" >> "$GITHUB_OUTPUT" echo "host_cxx=$(xcrun --find clang++)" >> "$GITHUB_OUTPUT"
- name: Install NDK - name: Install NDK
run: | run: |