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
Notes: sideshowbarker 2024-07-17 03:00:02 +09:00
3 changed files with 5 additions and 4 deletions

View file

@ -49,6 +49,7 @@ runs:
shell: bash
run: |
set -e
sudo xcode-select --switch /Applications/Xcode_15.4.app
brew update
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"
fi
elif ${{ inputs.os_name == 'macOS' }} ; then
echo "host_cc=$(brew --prefix llvm@18)/bin/clang" >> "$GITHUB_OUTPUT"
echo "host_cxx=$(brew --prefix llvm@18)/bin/clang++" >> "$GITHUB_OUTPUT"
echo "host_cc=$(xcrun --find clang)" >> "$GITHUB_OUTPUT"
echo "host_cxx=$(xcrun --find clang++)" >> "$GITHUB_OUTPUT"
fi
- name: Set dynamic environment variables

View file

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