Skip to content

Commit a0b39d2

Browse files
Restructure C++ CI builds (#300)
Only run one build on Ubuntu to ensure Linux build works. Run others on macOS to ensure main development environment is functional.
1 parent 62be395 commit a0b39d2

3 files changed

Lines changed: 101 additions & 144 deletions

File tree

.github/actions/homebrew-packages-setup/init.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ echo "::group::Outputs from init"
5252

5353
# Tools to install
5454
echo "tools-to-install<<ENDTOOLS"
55-
if [[ "${RUNNER_OS}" = "Linux" ]]; then
56-
echo "binutils"
57-
fi
5855
echo "gcc@${GCC_MAJOR_VERSION}"
5956
echo "llvm@${LLVM_MAJOR_VERSION}"
6057
echo "ENDTOOLS"

.github/files/CMakeUserPresets.json

Lines changed: 74 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,41 @@
22
"version": 8,
33
"configurePresets": [
44
{
5-
"name": "_ci-common",
6-
"hidden": true,
7-
"binaryDir": "build",
8-
"inherits": ["cmake-conan"]
9-
},
10-
{
11-
"name": "ci-ubuntu-gcc-release",
12-
"inherits": ["_ci-ubuntu-gcc", "_ci-release"]
5+
"name": "ci-macos-clang-debug",
6+
"inherits": ["_ci-macos-clang", "_ci-debug", "_ci-clang-tidy"]
137
},
148
{
15-
"name": "ci-ubuntu-gcc-debug",
16-
"inherits": ["_ci-ubuntu-gcc", "_ci-debug"]
9+
"name": "ci-macos-clang-release",
10+
"inherits": ["_ci-macos-clang", "_ci-release", "_ci-clang-tidy"]
1711
},
1812
{
19-
"name": "ci-ubuntu-clang-release",
20-
"inherits": ["_ci-ubuntu-clang", "_ci-release", "_ci-clang-tidy"]
13+
"name": "ci-macos-gcc-debug",
14+
"inherits": ["_ci-macos-gcc", "_ci-debug"]
2115
},
2216
{
23-
"name": "ci-ubuntu-clang-debug",
24-
"inherits": ["_ci-ubuntu-clang", "_ci-debug", "_ci-clang-tidy"]
17+
"name": "ci-macos-gcc-release",
18+
"inherits": ["_ci-macos-gcc", "_ci-release"]
2519
},
2620
{
27-
"name": "ci-macos-clang-release",
28-
"inherits": ["_ci-macos-clang", "_ci-release", "_ci-clang-tidy"]
21+
"name": "ci-ubuntu-clang-release",
22+
"inherits": ["_ci-ubuntu-clang", "_ci-release", "_ci-clang-tidy"]
2923
},
3024
{
31-
"name": "ci-macos-clang-debug",
32-
"inherits": ["_ci-macos-clang", "_ci-debug", "_ci-clang-tidy"]
25+
"name": "_ci-macos-clang",
26+
"hidden": true,
27+
"inherits": [
28+
"gcc-clang-flags",
29+
"_ci-common",
30+
"_ci-clang",
31+
"_ci-gcc-libstdc++-for-clang-common",
32+
"_ci-gcc-libstdc++-for-clang-macos"
33+
],
34+
"cacheVariables": {
35+
"CMAKE_CXX_FLAGS": "$env{PRESET_CXX_FLAGS_GCC_CLANG} $env{PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_COMMON} $env{PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_MACOS}"
36+
}
3337
},
3438
{
35-
"name": "_ci-ubuntu-gcc",
39+
"name": "_ci-macos-gcc",
3640
"hidden": true,
3741
"inherits": ["gcc-clang-flags", "_ci-common", "_ci-gcc"],
3842
"cacheVariables": {
@@ -54,31 +58,23 @@
5458
}
5559
},
5660
{
57-
"name": "_ci-macos-clang",
61+
"name": "_ci-common",
5862
"hidden": true,
59-
"inherits": [
60-
"gcc-clang-flags",
61-
"_ci-common",
62-
"_ci-clang",
63-
"_ci-gcc-libstdc++-for-clang-common",
64-
"_ci-gcc-libstdc++-for-clang-macos"
65-
],
66-
"cacheVariables": {
67-
"CMAKE_CXX_FLAGS": "$env{PRESET_CXX_FLAGS_GCC_CLANG} $env{PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_COMMON} $env{PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_MACOS}"
68-
}
63+
"binaryDir": "build",
64+
"inherits": ["cmake-conan"]
6965
},
7066
{
71-
"name": "_ci-release",
67+
"name": "_ci-debug",
7268
"hidden": true,
7369
"cacheVariables": {
74-
"CMAKE_BUILD_TYPE": "Release"
70+
"CMAKE_BUILD_TYPE": "Debug"
7571
}
7672
},
7773
{
78-
"name": "_ci-debug",
74+
"name": "_ci-release",
7975
"hidden": true,
8076
"cacheVariables": {
81-
"CMAKE_BUILD_TYPE": "Debug"
77+
"CMAKE_BUILD_TYPE": "Release"
8278
}
8379
},
8480
{
@@ -117,178 +113,152 @@
117113
}
118114
},
119115
{
120-
"name": "_ci-gcc-libstdc++-for-clang-ubuntu",
116+
"name": "_ci-gcc-libstdc++-for-clang-macos",
121117
"hidden": true,
122118
"environment": {
123-
"PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_UBUNTU": "-cxx-isystem$penv{HOMEBREW_PREFIX}/opt/gcc/include/c++/15/x86_64-pc-linux-gnu"
119+
"PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_MACOS": "-cxx-isystem$penv{HOMEBREW_PREFIX}/opt/gcc/include/c++/15/aarch64-apple-darwin24"
124120
}
125121
},
126122
{
127-
"name": "_ci-gcc-libstdc++-for-clang-macos",
123+
"name": "_ci-gcc-libstdc++-for-clang-ubuntu",
128124
"hidden": true,
129125
"environment": {
130-
"PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_MACOS": "-cxx-isystem$penv{HOMEBREW_PREFIX}/opt/gcc/include/c++/15/aarch64-apple-darwin24"
126+
"PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_UBUNTU": "-cxx-isystem$penv{HOMEBREW_PREFIX}/opt/gcc/include/c++/15/x86_64-pc-linux-gnu"
131127
}
132128
}
133129
],
134130
"buildPresets": [
135131
{
136-
"name": "ci-ubuntu-gcc-release",
137-
"configurePreset": "ci-ubuntu-gcc-release"
138-
},
139-
{
140-
"name": "ci-ubuntu-gcc-debug",
141-
"configurePreset": "ci-ubuntu-gcc-debug"
132+
"name": "ci-macos-clang-debug",
133+
"configurePreset": "ci-macos-clang-debug"
142134
},
143135
{
144-
"name": "ci-ubuntu-clang-release",
145-
"configurePreset": "ci-ubuntu-clang-release"
136+
"name": "ci-macos-clang-release",
137+
"configurePreset": "ci-macos-clang-release"
146138
},
147139
{
148-
"name": "ci-ubuntu-clang-debug",
149-
"configurePreset": "ci-ubuntu-clang-debug"
140+
"name": "ci-macos-gcc-debug",
141+
"configurePreset": "ci-macos-gcc-debug"
150142
},
151143
{
152-
"name": "ci-macos-clang-release",
153-
"configurePreset": "ci-macos-clang-release"
144+
"name": "ci-macos-gcc-release",
145+
"configurePreset": "ci-macos-gcc-release"
154146
},
155147
{
156-
"name": "ci-macos-clang-debug",
157-
"configurePreset": "ci-macos-clang-debug"
148+
"name": "ci-ubuntu-clang-release",
149+
"configurePreset": "ci-ubuntu-clang-release"
158150
}
159151
],
160152
"testPresets": [
161153
{
162-
"name": "ci-ubuntu-gcc-release",
163-
"configurePreset": "ci-ubuntu-gcc-release",
164-
"inherits": ["output-on-failure"]
165-
},
166-
{
167-
"name": "ci-ubuntu-gcc-debug",
168-
"configurePreset": "ci-ubuntu-gcc-debug",
154+
"name": "ci-macos-clang-debug",
155+
"configurePreset": "ci-macos-clang-debug",
169156
"inherits": ["output-on-failure"]
170157
},
171158
{
172-
"name": "ci-ubuntu-clang-release",
173-
"configurePreset": "ci-ubuntu-clang-release",
159+
"name": "ci-macos-clang-release",
160+
"configurePreset": "ci-macos-clang-release",
174161
"inherits": ["output-on-failure"]
175162
},
176163
{
177-
"name": "ci-ubuntu-clang-debug",
178-
"configurePreset": "ci-ubuntu-clang-debug",
164+
"name": "ci-macos-gcc-debug",
165+
"configurePreset": "ci-macos-gcc-debug",
179166
"inherits": ["output-on-failure"]
180167
},
181168
{
182-
"name": "ci-macos-clang-release",
183-
"configurePreset": "ci-macos-clang-release",
169+
"name": "ci-macos-gcc-release",
170+
"configurePreset": "ci-macos-gcc-release",
184171
"inherits": ["output-on-failure"]
185172
},
186173
{
187-
"name": "ci-macos-clang-debug",
188-
"configurePreset": "ci-macos-clang-debug",
174+
"name": "ci-ubuntu-clang-release",
175+
"configurePreset": "ci-ubuntu-clang-release",
189176
"inherits": ["output-on-failure"]
190177
}
191178
],
192179
"workflowPresets": [
193180
{
194-
"name": "ci-ubuntu-gcc-release",
195-
"steps": [
196-
{
197-
"type": "configure",
198-
"name": "ci-ubuntu-gcc-release"
199-
},
200-
{
201-
"type": "build",
202-
"name": "ci-ubuntu-gcc-release"
203-
},
204-
{
205-
"type": "test",
206-
"name": "ci-ubuntu-gcc-release"
207-
}
208-
]
209-
},
210-
{
211-
"name": "ci-ubuntu-gcc-debug",
181+
"name": "ci-macos-clang-debug",
212182
"steps": [
213183
{
214184
"type": "configure",
215-
"name": "ci-ubuntu-gcc-debug"
185+
"name": "ci-macos-clang-debug"
216186
},
217187
{
218188
"type": "build",
219-
"name": "ci-ubuntu-gcc-debug"
189+
"name": "ci-macos-clang-debug"
220190
},
221191
{
222192
"type": "test",
223-
"name": "ci-ubuntu-gcc-debug"
193+
"name": "ci-macos-clang-debug"
224194
}
225195
]
226196
},
227197
{
228-
"name": "ci-ubuntu-clang-release",
198+
"name": "ci-macos-clang-release",
229199
"steps": [
230200
{
231201
"type": "configure",
232-
"name": "ci-ubuntu-clang-release"
202+
"name": "ci-macos-clang-release"
233203
},
234204
{
235205
"type": "build",
236-
"name": "ci-ubuntu-clang-release"
206+
"name": "ci-macos-clang-release"
237207
},
238208
{
239209
"type": "test",
240-
"name": "ci-ubuntu-clang-release"
210+
"name": "ci-macos-clang-release"
241211
}
242212
]
243213
},
244214
{
245-
"name": "ci-ubuntu-clang-debug",
215+
"name": "ci-macos-gcc-debug",
246216
"steps": [
247217
{
248218
"type": "configure",
249-
"name": "ci-ubuntu-clang-debug"
219+
"name": "ci-macos-gcc-debug"
250220
},
251221
{
252222
"type": "build",
253-
"name": "ci-ubuntu-clang-debug"
223+
"name": "ci-macos-gcc-debug"
254224
},
255225
{
256226
"type": "test",
257-
"name": "ci-ubuntu-clang-debug"
227+
"name": "ci-macos-gcc-debug"
258228
}
259229
]
260230
},
261231
{
262-
"name": "ci-macos-clang-release",
232+
"name": "ci-macos-gcc-release",
263233
"steps": [
264234
{
265235
"type": "configure",
266-
"name": "ci-macos-clang-release"
236+
"name": "ci-macos-gcc-release"
267237
},
268238
{
269239
"type": "build",
270-
"name": "ci-macos-clang-release"
240+
"name": "ci-macos-gcc-release"
271241
},
272242
{
273243
"type": "test",
274-
"name": "ci-macos-clang-release"
244+
"name": "ci-macos-gcc-release"
275245
}
276246
]
277247
},
278248
{
279-
"name": "ci-macos-clang-debug",
249+
"name": "ci-ubuntu-clang-release",
280250
"steps": [
281251
{
282252
"type": "configure",
283-
"name": "ci-macos-clang-debug"
253+
"name": "ci-ubuntu-clang-release"
284254
},
285255
{
286256
"type": "build",
287-
"name": "ci-macos-clang-debug"
257+
"name": "ci-ubuntu-clang-release"
288258
},
289259
{
290260
"type": "test",
291-
"name": "ci-macos-clang-debug"
261+
"name": "ci-ubuntu-clang-release"
292262
}
293263
]
294264
}

0 commit comments

Comments
 (0)