-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (113 loc) · 3.47 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: macOS CI
on:
push:
branches: [ 'main' ]
paths:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.cmake'
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/macos.yml'
pull_request:
branches: [ 'main' ]
paths:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.cmake'
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/macos.yml'
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build_and_test:
strategy:
matrix:
os: [ macos-13, macos-14 ]
compiler: [ g++-12, g++-13, clang++ ]
build_type: [ Debug, Release ]
include:
- os: macos-13
architecture: x64
- os: macos-14
architecture: arm64
- compiler: clang++
ccompiler: clang
- compiler: g++-12
ccompiler: gcc-12
exclude:
- os: macos-14
compiler: g++-11
- os: macos-14
compiler: g++-12
- os: macos-14
compiler: g++-13
name: ${{matrix.os}} with ${{matrix.compiler}} (${{matrix.build_type}} mode)
runs-on: ${{matrix.os}}
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
# Remove existing 2to3 binary
- name: Remove existing 2to3 binary
run: sudo rm /usr/local/bin/2to3 || true
# Install Boost using Homebrew
- name: Install Boost
run: brew install boost
# Setup TBB for parallel STL algorithms via Homebrew (macOS 11 is no longer supported)
- if: matrix.os != 'macos-11'
name: Setup TBB
run: brew install tbb
# Use XCode 13.2 as a workaround because XCode 14.0 seems broken
- if: matrix.os == 'macos-12'
name: Setup XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^13.2"
- if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
name: Setup XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^14.2"
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: '${{matrix.os}}-${{matrix.compiler}}-${{matrix.build_type}}'
variant: ccache
save: true
max-size: 10G
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: >
cmake ${{github.workspace}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
-DFICTION_TEST=ON
-DFICTION_BENCHMARK=OFF
-DFICTION_EXPERIMENTS=ON
-DFICTION_Z3=OFF
-DFICTION_PROGRESS_BARS=OFF
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j3 # all macOS runners provide at least 3 cores
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --verbose