Skip to content

Commit 8075c92

Browse files
committed
[CI] fix macOS CI
1 parent 9895cad commit 8075c92

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

.github/workflows/macOS.yml

Lines changed: 8 additions & 21 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,9 @@ jobs:
5353
with:
5454
fetch-depth: 0
5555

56-
- name: Cache LLVM
57-
id: cache_llvm
58-
uses: actions/cache@v4
56+
- uses: tecolicom/actions-use-homebrew-tools@v1
5957
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
58+
tools: llvm
7259

7360
- name: Set xmake env
7461
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
@@ -80,7 +67,7 @@ jobs:
8067
actions-cache-folder: .xmake-cache-${{ steps.cache_key.outputs.key }}
8168

8269
- name: Update xmake to patched xmake
83-
run: xmake update -s https://github.com/Arthapz/xmake.git#modules
70+
run: xmake update -s -f --integrate github:Arthapz/xmake#fix-xlinker-rpath-decuplication
8471

8572
- name: Update xmake repository
8673
run: xmake repo --update -v
@@ -98,18 +85,18 @@ jobs:
9885
- name: Configure & Build
9986
id: build
10087
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"
88+
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="$(brew --prefix)/opt/llvm/" --runtimes="c++_shared"
10289
xmake b -v
10390
10491
- name: Tests
105-
run: DYLD_LIBRARY_PATH="${{ runner.workspace }}/StormKit/llvm/lib" xmake test -v
92+
run: xmake test -v
10693

10794
- name: Installation
10895
run: xmake install -v --installdir="${{ runner.workspace }}/output"
10996

11097
- name: Upload artifacts
11198
id: upload
112-
uses: actions/upload-artifact@v1
99+
uses: actions/upload-artifact@v4
113100
with:
114101
name: macOS-x64-${{ matrix.kind }}-${{ matrix.mode }}
115102
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)