-
Notifications
You must be signed in to change notification settings - Fork 3
96 lines (78 loc) · 2.87 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: macos
on: [push, pull_request]
jobs:
Build:
name: ${{matrix.name}} (${{matrix.config}})
runs-on: ${{matrix.os}}
env:
CMAKE_GENERATOR: Ninja
strategy:
fail-fast: false
matrix:
name: [
macos-12-xcode-13-x86_64,
macos-12-xcode-13-arm64,
macos-12-xcode-14-x86_64,
macos-12-xcode-14-arm64
]
config: [Debug, Release]
include:
- name: macos-12-xcode-13-x86_64
os: macos-12
compiler: xcode
version: "13.4"
architecture: x86_64
- name: macos-12-xcode-13-arm64
os: macos-12
compiler: xcode
version: "13.4"
architecture: arm64
- name: macos-12-xcode-14-x86_64
os: macos-12
compiler: xcode
version: "14.2"
architecture: x86_64
- name: macos-12-xcode-14-arm64
os: macos-12
compiler: xcode
version: "14.2"
architecture: arm64
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: |
brew install ninja
brew install doxygen graphviz
if [ "${{matrix.compiler}}" = "xcode" ]; then
ls -ls /Applications/
sudo xcode-select -switch /Applications/Xcode_${{matrix.version}}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE:STRING=${{matrix.config}} -DCMAKE_OSX_ARCHITECTURES:STRING=${{matrix.architecture}}
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.config}}
- name: Test
if: matrix.architecture != 'arm64'
working-directory: ${{runner.workspace}}/build
run: ctest --output-on-failure -C ${{matrix.config}}
# - name: Coverage
# if: matrix.config == 'Debug' && matrix.architecture != 'arm64'
# working-directory: ${{runner.workspace}}/build
# run: cmake --build . --target coverage
# - name: Archive Coverage
# if: matrix.config == 'Debug' && matrix.architecture != 'arm64'
# uses: actions/upload-artifact@v3
# with:
# name: coverage-macos
# path: |
# ${{runner.workspace}}/build/tests/coverage.${{matrix.compiler}}-${{matrix.version}}.txt
# ${{runner.workspace}}/build/tests/coverage.overview.${{matrix.compiler}}-${{matrix.version}}.txt
- name: Documentation
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target documentation