Skip to content

Commit 2c24b37

Browse files
committed
CI: build on macos
1 parent 85e38be commit 2c24b37

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,49 @@ jobs:
265265
run: |
266266
cd build/result/${{ matrix.build-config }}
267267
./cage-test-core
268+
269+
270+
MacOS:
271+
name: macos-${{ matrix.build-config }}
272+
runs-on: macos-latest
273+
env:
274+
LDFLAGS: "-L/opt/homebrew/opt/llvm/lib"
275+
CPPFLAGS: "-I/opt/homebrew/opt/llvm/include"
276+
CC: /opt/homebrew/opt/llvm/bin/clang
277+
CXX: /opt/homebrew/opt/llvm/bin/clang++
278+
strategy:
279+
fail-fast: false
280+
matrix:
281+
build-config: [debug, release]
282+
283+
steps:
284+
- name: Install packages
285+
run: |
286+
brew install nasm llvm
287+
288+
- name: Versions
289+
run: |
290+
cmake --version
291+
git --version
292+
${CC} --version
293+
${CXX} --version
294+
295+
- uses: actions/checkout@v4
296+
with:
297+
submodules: recursive
298+
299+
- name: Configure
300+
run: |
301+
mkdir build
302+
cd build
303+
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} ..
304+
305+
- name: Build
306+
run: |
307+
cd build
308+
cmake --build . -- -j$(( `sysctl -n hw.ncpu` + 1 ))
309+
310+
- name: Tests
311+
run: |
312+
cd build/result/${{ matrix.build-config }}
313+
./cage-test-core

0 commit comments

Comments
 (0)