ci: 在 macOS 上使用 clang 18

This commit is contained in:
Weiyou Wang
2024-08-17 01:21:34 +10:00
committed by zzyyyl
parent 2190016c06
commit dde048fb4c
2 changed files with 25 additions and 4 deletions

View File

@@ -296,10 +296,14 @@ jobs:
macOS-Core:
needs: meta
runs-on: macos-14
strategy:
matrix:
arch: [arm64, x86_64]
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -308,7 +312,7 @@ jobs:
- name: Install Dependencies
run: |
brew install ninja
brew install ninja llvm@18
- name: Bootstrap MaaDeps
run: |
@@ -319,7 +323,10 @@ jobs:
- name: Configure MaaCore
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES='${{ matrix.arch }}' -DMAA_VERSION='${{ needs.meta.outputs.tag }}'
LLVM_PREFIX=$(brew --prefix llvm)
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES='${{ matrix.arch }}' -DMAA_VERSION='${{ needs.meta.outputs.tag }}' \
-DCMAKE_C_COMPILER=${LLVM_PREFIX}/bin/clang \
-DCMAKE_CXX_COMPILER=${LLVM_PREFIX}/bin/clang++
- name: Build MaaCore
run: |