-
Notifications
You must be signed in to change notification settings - Fork 33
72 lines (61 loc) · 1.77 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: macOS
on:
push:
paths:
- '.github/workflows/macos.yml'
- 'CMakeLists.txt'
- 'src/**'
- 'test/**'
- 'modules/**'
- '3rdparty/**'
pull_request:
paths:
- '.github/workflows/macos.yml'
- 'CMakeLists.txt'
- 'src/**'
- 'test/**'
- 'modules/**'
- '3rdparty/**'
release:
types: published
jobs:
build:
strategy:
fail-fast: false
matrix:
config: [Release, Debug]
# Don't build with macos-14 yet, newton dynamics 3.14 can't handle it.
image: [macos-12, macos-13]
runs-on: ${{ matrix.image }}
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- uses: hendrikmuhs/ccache-action@v1
with:
key: macos-${{ matrix.image }}-${{ matrix.image}}-${{ matrix.config }}
- name: Configure
shell: bash
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Compile Dependencies
shell: bash
run: |
cmake --build build --parallel --config ${{ matrix.config }} --target compile-osp-magnum-deps compile-test-deps
- name: Compile OSP-Magnum
shell: bash
run: |
cmake --build build --parallel --config ${{ matrix.config }} --target osp-magnum
- name: Compile Unit Tests
shell: bash
run: |
cmake --build build --parallel --config ${{ matrix.config }} --target compile-tests
# TODO: Why doesn't the "test" target execute tests?
- name: Run Unit Tests
shell: bash
run: |
ctest --schedule-random --progress --output-on-failure --parallel --no-tests=error --build-config ${{ matrix.config }} --test-dir build