forked from JDRaftKeeper/RaftKeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (26 loc) · 986 Bytes
/
macos.yml
File metadata and controls
33 lines (26 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build and Test on macOS
on: # yamllint disable-line rule:truthy
workflow_call:
jobs:
run:
# strategy:
# matrix:
# arch: [x86_64, arm64]
# runs-on: macos-14-${{ matrix.arch == 'arm64' && 'arm64' || 'latest' }} # actions is stuck in Github
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install cmake
run: brew list cmake &>/dev/null || brew install cmake
- name: Install tools
run: brew install ninja ccache llvm@18
- name: Generate Makefile
run: export CC=$(brew --prefix llvm@18)/bin/clang CXX=$(brew --prefix llvm@18)/bin/clang++ && cmake -G Ninja -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
working-directory: ${{github.workspace}}/build
run: ninja -j 10
- name: Run unit tests
working-directory: ${{github.workspace}}/build
run: ./src/rk_unit_tests --gtest_color=yes