Skip to content

Commit 9933cea

Browse files
committed
Optimize GH runner script:
- Disable debug info to improve disk performance - Remove ancient Clang 3.5 - Add -pipe to avoid disk writing for intermediate files - Separate 32 and 64 bit window tasks as Windows machines are much slower than Linux machines
1 parent 3be74c4 commit 9933cea

File tree

1 file changed

+47
-15
lines changed

1 file changed

+47
-15
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
# Linux, gcc-4.8
3030
- toolset: gcc-4.8
3131
cxxstd: "03,11"
32+
cxxflags: -pipe
3233
address-model: 32,64
3334
os: ubuntu-latest
3435
container: ubuntu:18.04
@@ -37,13 +38,15 @@ jobs:
3738
# Linux, gcc-4.9
3839
- toolset: gcc-4.9
3940
cxxstd: "03,11"
41+
cxxflags: -pipe
4042
address-model: 32,64
4143
os: ubuntu-latest
4244
container: ubuntu:16.04
4345
install:
4446
- g++-4.9-multilib
4547
# Linux, gcc-5
4648
- toolset: gcc-5
49+
cxxflags: -pipe
4750
cxxstd: "03,11,14,1z"
4851
address-model: 32,64
4952
os: ubuntu-latest
@@ -53,6 +56,7 @@ jobs:
5356
# Linux, gcc-6
5457
- toolset: gcc-6
5558
cxxstd: "03,11,14,1z"
59+
cxxflags: -pipe
5660
address-model: 32,64
5761
os: ubuntu-latest
5862
container: ubuntu:18.04
@@ -61,6 +65,7 @@ jobs:
6165
# Linux, gcc-7
6266
- toolset: gcc-7
6367
cxxstd: "03,11,14,17"
68+
cxxflags: -pipe
6469
address-model: 32,64
6570
os: ubuntu-latest
6671
container: ubuntu:18.04
@@ -69,6 +74,7 @@ jobs:
6974
# Linux, gcc-8
7075
- toolset: gcc-8
7176
cxxstd: "03,11,14,17,2a"
77+
cxxflags: -pipe
7278
address-model: 32,64
7379
os: ubuntu-latest
7480
container: ubuntu:18.04
@@ -77,6 +83,7 @@ jobs:
7783
# Linux, gcc-9
7884
- toolset: gcc-9
7985
cxxstd: "03,11,14,17,2a"
86+
cxxflags: -pipe
8087
address-model: 32,64
8188
os: ubuntu-latest
8289
container: ubuntu:20.04
@@ -85,6 +92,7 @@ jobs:
8592
# Linux, gcc-10
8693
- toolset: gcc-10
8794
cxxstd: "03,11,14,17,20"
95+
cxxflags: -pipe
8896
address-model: 32,64
8997
os: ubuntu-latest
9098
container: ubuntu:20.04
@@ -93,6 +101,7 @@ jobs:
93101
# Linux, gcc-11
94102
- toolset: gcc-11
95103
cxxstd: "03,11,14,17,20,23"
104+
cxxflags: -pipe
96105
address-model: 32,64
97106
os: ubuntu-latest
98107
container: ubuntu:22.04
@@ -101,6 +110,7 @@ jobs:
101110
# Linux, gcc-12
102111
- toolset: gcc-12
103112
cxxstd: "03,11,14,17,20,23"
113+
cxxflags: -pipe
104114
address-model: 32,64
105115
os: ubuntu-latest
106116
container: ubuntu:22.04
@@ -109,13 +119,15 @@ jobs:
109119
# Linux, gcc-13
110120
- toolset: gcc-13
111121
cxxstd: "11,14,17,20,2b"
122+
cxxflags: -pipe
112123
os: ubuntu-latest
113124
container: ubuntu:24.04
114125
install: g++-13-multilib
115126
address-model: 32,64
116127
# Linux, gcc-14
117128
- toolset: gcc-14
118129
cxxstd: "11,14,17,20,2b"
130+
cxxflags: -pipe
119131
os: ubuntu-latest
120132
container: ubuntu:24.04
121133
install: g++-14-multilib
@@ -124,6 +136,7 @@ jobs:
124136
- name: UBSAN
125137
toolset: gcc-12
126138
cxxstd: "03,11,14,17,20,23"
139+
cxxflags: -pipe
127140
ubsan: 1
128141
os: ubuntu-latest
129142
container: ubuntu:22.04
@@ -132,18 +145,11 @@ jobs:
132145
#------------------
133146
# Linux, clang
134147
#------------------
135-
# Linux, clang-3.5
136-
- toolset: clang
137-
compiler: clang++-3.5
138-
cxxstd: "03,11"
139-
os: ubuntu-latest
140-
container: ubuntu:16.04
141-
install:
142-
- clang-3.5
143148
# Linux, clang-3.6
144149
- toolset: clang
145150
compiler: clang++-3.6
146151
cxxstd: "03,11,14"
152+
cxxflags: -pipe
147153
os: ubuntu-latest
148154
container: ubuntu:16.04
149155
install:
@@ -152,6 +158,7 @@ jobs:
152158
- toolset: clang
153159
compiler: clang++-3.7
154160
cxxstd: "03,11,14"
161+
cxxflags: -pipe
155162
os: ubuntu-latest
156163
container: ubuntu:16.04
157164
install:
@@ -160,6 +167,7 @@ jobs:
160167
- toolset: clang
161168
compiler: clang++-3.8
162169
cxxstd: "03,11,14"
170+
cxxflags: -pipe
163171
os: ubuntu-latest
164172
container: ubuntu:16.04
165173
install:
@@ -168,6 +176,7 @@ jobs:
168176
- toolset: clang
169177
compiler: clang++-3.9
170178
cxxstd: "03,11,14"
179+
cxxflags: -pipe
171180
os: ubuntu-latest
172181
container: ubuntu:18.04
173182
install:
@@ -176,6 +185,7 @@ jobs:
176185
- toolset: clang
177186
compiler: clang++-4.0
178187
cxxstd: "03,11,14"
188+
cxxflags: -pipe
179189
os: ubuntu-latest
180190
container: ubuntu:18.04
181191
install:
@@ -184,6 +194,7 @@ jobs:
184194
- toolset: clang
185195
compiler: clang++-5.0
186196
cxxstd: "03,11,14,1z"
197+
cxxflags: -pipe
187198
os: ubuntu-latest
188199
container: ubuntu:18.04
189200
install:
@@ -192,6 +203,7 @@ jobs:
192203
- toolset: clang
193204
compiler: clang++-6.0
194205
cxxstd: "03,11,14,17"
206+
cxxflags: -pipe
195207
os: ubuntu-latest
196208
container: ubuntu:18.04
197209
install:
@@ -200,6 +212,7 @@ jobs:
200212
- toolset: clang
201213
compiler: clang++-7
202214
cxxstd: "03,11,14,17"
215+
cxxflags: -pipe
203216
os: ubuntu-latest
204217
container: ubuntu:18.04
205218
install:
@@ -209,6 +222,7 @@ jobs:
209222
- toolset: clang
210223
compiler: clang++-8
211224
cxxstd: "03,11,14,17,2a"
225+
cxxflags: -pipe
212226
os: ubuntu-latest
213227
container: ubuntu:18.04
214228
install:
@@ -219,6 +233,7 @@ jobs:
219233
- toolset: clang
220234
compiler: clang++-9
221235
cxxstd: "03,11,14,17,2a"
236+
cxxflags: -pipe
222237
os: ubuntu-latest
223238
container: ubuntu:20.04
224239
install:
@@ -227,6 +242,7 @@ jobs:
227242
- toolset: clang
228243
compiler: clang++-10
229244
cxxstd: "03,11,14,17,20"
245+
cxxflags: -pipe
230246
os: ubuntu-latest
231247
container: ubuntu:20.04
232248
install:
@@ -235,6 +251,7 @@ jobs:
235251
- toolset: clang
236252
compiler: clang++-11
237253
cxxstd: "03,11,14,17,20"
254+
cxxflags: -pipe
238255
os: ubuntu-latest
239256
container: ubuntu:22.04
240257
install:
@@ -243,6 +260,7 @@ jobs:
243260
- toolset: clang
244261
compiler: clang++-12
245262
cxxstd: "03,11,14,17,20"
263+
cxxflags: -pipe
246264
os: ubuntu-latest
247265
container: ubuntu:22.04
248266
install:
@@ -251,6 +269,7 @@ jobs:
251269
- toolset: clang
252270
compiler: clang++-13
253271
cxxstd: "03,11,14,17,20"
272+
cxxflags: -pipe
254273
os: ubuntu-latest
255274
container: ubuntu:22.04
256275
install:
@@ -259,6 +278,7 @@ jobs:
259278
- toolset: clang
260279
compiler: clang++-14
261280
cxxstd: "03,11,14,17,20"
281+
cxxflags: -pipe
262282
os: ubuntu-latest
263283
container: ubuntu:22.04
264284
install:
@@ -267,12 +287,14 @@ jobs:
267287
- toolset: clang
268288
compiler: clang++-15
269289
cxxstd: "03,11,14,17,20"
290+
cxxflags: -pipe
270291
container: ubuntu:22.04
271292
os: ubuntu-latest
272293
install: clang-15
273294
# Linux, clang-16
274295
- toolset: clang
275296
compiler: clang++-16
297+
cxxflags: -pipe
276298
cxxstd: "03,11,14,17,20,2b"
277299
container: ubuntu:24.04
278300
os: ubuntu-latest
@@ -281,13 +303,15 @@ jobs:
281303
- toolset: clang
282304
compiler: clang++-17
283305
cxxstd: "03,11,14,17,20,2b"
306+
cxxflags: -pipe
284307
container: ubuntu:24.04
285308
os: ubuntu-latest
286309
install: clang-17
287310
# Linux, clang-18
288311
- toolset: clang
289312
compiler: clang++-18
290313
cxxstd: "03,11,14,17,20,2b"
314+
cxxflags: -pipe
291315
container: ubuntu:24.04
292316
os: ubuntu-latest
293317
install: clang-18
@@ -307,7 +331,7 @@ jobs:
307331
- clang-15
308332
- libc++-15-dev
309333
- libc++abi-15-dev
310-
cxxflags: -stdlib=libc++
334+
cxxflags: -pipe -stdlib=libc++
311335
linkflags: -stdlib=libc++
312336
# Linux, clang-18 libc++
313337
- toolset: clang
@@ -318,14 +342,14 @@ jobs:
318342
- clang-18
319343
- libc++-18-dev
320344
- libc++abi-18-dev
321-
cxxflags: -stdlib=libc++
345+
cxxflags: -pipe -stdlib=libc++
322346
linkflags: -stdlib=libc++
323347
# Linux, clang-14 libc++, ubsan
324348
- name: UBSAN
325349
toolset: clang
326350
compiler: clang++-14
327351
cxxstd: "03,11,14,17,20"
328-
cxxflags: -stdlib=libc++
352+
cxxflags: -pipe -stdlib=libc++
329353
linkflags: -stdlib=libc++
330354
ubsan: 1
331355
os: ubuntu-22.04
@@ -338,7 +362,7 @@ jobs:
338362
toolset: clang
339363
compiler: clang++-18
340364
cxxstd: "11,14,17,20"
341-
cxxflags: -stdlib=libc++
365+
cxxflags: -pipe -stdlib=libc++
342366
linkflags: -stdlib=libc++
343367
ubsan: 1
344368
os: ubuntu-24.04
@@ -471,6 +495,7 @@ jobs:
471495
BOOST_BRANCH=develop && [ "$REF" = "master" ] && BOOST_BRANCH=master || true
472496
echo BOOST_BRANCH: $BOOST_BRANCH
473497
BUILD_JOBS=$((nproc || sysctl -n hw.ncpu) 2> /dev/null)
498+
echo BUILD_JOBS: $BUILD_JOBS
474499
echo "BUILD_JOBS=$BUILD_JOBS" >> $GITHUB_ENV
475500
echo "CMAKE_BUILD_PARALLEL_LEVEL=$BUILD_JOBS" >> $GITHUB_ENV
476501
DEPINST_ARGS=()
@@ -540,7 +565,7 @@ jobs:
540565
if: matrix.cmake_tests == ''
541566
run: |
542567
cd boost-root
543-
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
568+
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}" "debug-symbols=off")
544569
if [ -n "${{matrix.build_variant}}" ]
545570
then
546571
B2_ARGS+=("variant=${{matrix.build_variant}}")
@@ -576,9 +601,15 @@ jobs:
576601
fail-fast: false
577602
matrix:
578603
include:
604+
#------------------
605+
#Windows runners are much slower, split 32/64 bit jobs
579606
- toolset: msvc-14.3
580607
cxxstd: "14,17,20,latest"
581-
addrmd: 32,64
608+
addrmd: 32
609+
os: windows-2025
610+
- toolset: msvc-14.3
611+
cxxstd: "14,17,20,latest"
612+
addrmd: 64
582613
os: windows-2025
583614
- toolset: clang-win
584615
cxxstd: "14,17,latest"
@@ -606,6 +637,7 @@ jobs:
606637
set BOOST_BRANCH=develop
607638
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
608639
echo BOOST_BRANCH: %BOOST_BRANCH%
640+
echo NUMBER_OF_PROCESSORS: %NUMBER_OF_PROCESSORS%
609641
mkdir snapshot
610642
cd snapshot
611643
echo Downloading library snapshot: https://github.com/%GITHUB_REPOSITORY%/archive/%GITHUB_SHA%.zip
@@ -633,5 +665,5 @@ jobs:
633665
shell: cmd
634666
run: |
635667
cd boost-root
636-
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker
668+
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker debug-symbols=off
637669

0 commit comments

Comments
 (0)