Skip to content

Commit 9b4efb9

Browse files
committed
[CI] fix macOS CI
1 parent 9895cad commit 9b4efb9

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.github/workflows/macOS.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ on:
1717
push:
1818
branches: [develop]
1919
paths-ignore:
20+
- '.github/workflows/Windows-LLVM.yml'
2021
- '.github/workflows/Windows-MSVC.yml'
2122
- '.github/workflows/Linux.yml'
22-
- '.github/workflows/macOS.yml'
2323
- '.github/workflows/iOS.yml'
2424
- '.github/workflows/Android.yml'
2525
- '.github/workflows/AutoMerger.yml'
@@ -36,7 +36,7 @@ jobs:
3636
matrix:
3737
os: [macOS-latest]
3838
kind: [static, shared]
39-
mode: [release, debug, asan]
39+
mode: [release, debug]
4040

4141
runs-on: ${{ matrix.os }}
4242

@@ -53,22 +53,8 @@ jobs:
5353
with:
5454
fetch-depth: 0
5555

56-
- name: Cache LLVM
57-
id: cache_llvm
58-
uses: actions/cache@v4
59-
with:
60-
path: ${{ runner.workspace }}/StormKit/llvm
61-
key: ${{ matrix.os }}-llvm
62-
save-always: true
63-
restore-keys: |
64-
${{ matrix.os }}-llvm
65-
66-
- name: Download and Uncompress LLVM
67-
if: ${{ steps.cache_llvm.outputs.cache-hit != 'true' }}
68-
run: |
69-
wget 'https://github.com/Arthapz/llvm-prebuilt/raw/main/macOS/llvm.7z.001'
70-
7z x llvm.7z.001
71-
rm llvm.7z.001
56+
- name: Install llvm
57+
run: brew install llvm
7258

7359
- name: Set xmake env
7460
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
@@ -79,9 +65,6 @@ jobs:
7965
xmake-version: branch@dev
8066
actions-cache-folder: .xmake-cache-${{ steps.cache_key.outputs.key }}
8167

82-
- name: Update xmake to patched xmake
83-
run: xmake update -s https://github.com/Arthapz/xmake.git#modules
84-
8568
- name: Update xmake repository
8669
run: xmake repo --update -v
8770

@@ -98,18 +81,18 @@ jobs:
9881
- name: Configure & Build
9982
id: build
10083
run: |
101-
xmake f -v --yes -m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} -k ${{ matrix.kind }} --sanitizers=${{ matrix.mode == 'asan' && 'y' || 'n' }} --examples=y --tests=y --toolchain=llvm --sdk="${{ runner.workspace }}/StormKit/llvm/" --runtimes="c++_shared"
84+
xmake f -v --yes -m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} -k ${{ matrix.kind }} --sanitizers=${{ matrix.mode == 'debug' && 'y' || 'n' }} --examples=y --tests=y --toolchain=llvm --sdk="/opt/homebrew/opt/llvm/" --runtimes="c++_shared"
10285
xmake b -v
10386
10487
- name: Tests
105-
run: DYLD_LIBRARY_PATH="${{ runner.workspace }}/StormKit/llvm/lib" xmake test -v
88+
run: xmake test -v
10689

10790
- name: Installation
10891
run: xmake install -v --installdir="${{ runner.workspace }}/output"
10992

11093
- name: Upload artifacts
11194
id: upload
112-
uses: actions/upload-artifact@v1
95+
uses: actions/upload-artifact@v4
11396
with:
11497
name: macOS-x64-${{ matrix.kind }}-${{ matrix.mode }}
11598
path: ${{ runner.workspace }}/output

xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ option("vsxmake", { default = false, category = "root menu/support" })
287287
---------------------------- global configs ----------------------------
288288
set_allowedmodes(allowedmodes)
289289
set_allowedplats("windows", "mingw", "linux", "macosx", "wasm")
290-
set_allowedarchs("windows|x64", "mingw|x86_64", "linux|x86_64", "macosx|x86_64")
290+
set_allowedarchs("windows|x64", "mingw|x86_64", "linux|x86_64", "linux|aarch64", "macosx|x86_64", "macosx|arm64")
291291

292292
-- set_runtimes(is_mode("debug") and "MDd" or "MD")
293293
add_cxxflags(

0 commit comments

Comments
 (0)