-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.29 KB
/
build-macos.yml
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
34
35
36
37
38
39
40
41
42
43
44
name: build-macos
# build on pushes and pull requests on main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
TESTS_BOT_TOKEN: ${{ secrets.TESTS_BOT_TOKEN }}
jobs:
build:
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#installed-software
# macos image comes with installed clang, cmake .. (except ninja-build)
- name: Install deps
run: |
brew update
brew install ninja
- name: Ensure deps are installed
run: |
cmake --version
clang++ --version
ninja --version
- name: Print system information
run: system_profiler SPSoftwareDataType SPHardwareDataType
- name: Build & run CText flow
run: |
mkdir cmake-build-debug && cd cmake-build-debug
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
export TESTS_BOT_TOKEN=${{ secrets.TESTS_BOT_TOKEN }}
ninja tests/all -j$(sysctl -n hw.logicalcpu)
ninja test