Skip to content

Use homebrew llvm@20 instead of apple clang #19

Use homebrew llvm@20 instead of apple clang

Use homebrew llvm@20 instead of apple clang #19

Workflow file for this run

name: macos
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-15
strategy:
matrix:
include:
- build_type: debug
lto: "n"
- build_type: release
lto: "n"
- build_type: release
lto: "y"
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-macos-${{ matrix.build_type }}-${{ matrix.lto }}
cancel-in-progress: true
steps:
- name: Setup llvm
run: |
brew install llvm@20
- name: Install lld
run: |
brew install lld@20
- name: Setup python
run: |
# avoid compile python
brew install python@3.13
brew install python-setuptools
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup xmake
run: |
brew install xmake
# - name: Setup xmake
# uses: xmake-io/github-action-setup-xmake@v1
# with:
# xmake-version: '2.9.9'
# actions-cache-folder: '.xmake-cache'
- name: Package
run: |
export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH"
xmake config --yes --verbose --toolchain=clang --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.build_type }}-lto_${{ matrix.lto }}.tar.xz
path: build/package/*
compression-level: 0
if-no-files-found: error