Skip to content

Commit ad6b634

Browse files
committed
Update compilers for Ubsan, add ASAN builds
1 parent 87831eb commit ad6b634

File tree

1 file changed

+77
-32
lines changed

1 file changed

+77
-32
lines changed

.github/workflows/ci.yml

Lines changed: 77 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -118,36 +118,46 @@ jobs:
118118
- g++-12-multilib
119119
# Linux, gcc-13
120120
- toolset: gcc-13
121-
cxxstd: "11,14,17,20,2b"
121+
cxxstd: "03,11,14,17,20,2b"
122122
cxxflags: -pipe
123123
os: ubuntu-latest
124124
container: ubuntu:24.04
125125
install: g++-13-multilib
126126
address-model: 32,64
127127
# Linux, gcc-14
128128
- toolset: gcc-14
129-
cxxstd: "11,14,17,20,2b"
129+
cxxstd: "03,11,14,17,20,2b"
130130
cxxflags: -pipe
131131
os: ubuntu-latest
132132
container: ubuntu:24.04
133133
install: g++-14-multilib
134134
address-model: 32,64
135135
# Linux, gcc-15
136136
- toolset: gcc-15
137-
cxxstd: "11,14,17,20,23,2c"
137+
cxxstd: "03,11,14,17,20,23,2c"
138+
cxxflags: -pipe
138139
os: ubuntu-latest
139-
container: ubuntu:26.04
140+
container: ubuntu:25.04
140141
install: g++-15-multilib
141-
# Linux, gcc-12 UBSAN
142+
address-model: 32,64
143+
# Linux, gcc-15, ubsan
142144
- name: UBSAN
143-
toolset: gcc-12
145+
toolset: gcc-15
144146
cxxstd: "03,11,14,17,20,23"
145147
cxxflags: -pipe
146148
ubsan: 1
147149
os: ubuntu-latest
148-
container: ubuntu:22.04
149-
install:
150-
- g++-12
150+
container: ubuntu:25.04
151+
install: g++-15
152+
# Linux, gcc-15, asan
153+
- name: ASAN
154+
toolset: gcc-15
155+
cxxstd: "03,11,14,17,20,23"
156+
cxxflags: -pipe
157+
asan: 1
158+
os: ubuntu-latest
159+
container: ubuntu:25.04
160+
install: g++-15
151161
#------------------
152162
# Linux, clang
153163
#------------------
@@ -325,21 +335,24 @@ jobs:
325335
- toolset: clang
326336
compiler: clang++-19
327337
cxxstd: "03,11,14,17,20,2b"
338+
cxxflags: -pipe
328339
container: ubuntu:24.04
329340
os: ubuntu-latest
330341
install: clang-19
331342
# Linux, clang-20
332343
- toolset: clang
333344
compiler: clang++-20
334-
cxxstd: "11,14,17,20,23,2c"
335-
container: ubuntu:26.04
345+
cxxstd: "03,11,14,17,20,23,2c"
346+
cxxflags: -pipe
347+
container: ubuntu:25.04
336348
os: ubuntu-latest
337349
install: clang-20
338350
# Linux, clang-15 libc++
339351
- toolset: clang
340352
compiler: clang++-15
341-
cxxstd: "03,11,14,17,20,2b"
342-
os: ubuntu-22.04
353+
cxxstd: "11,14,17,20,2b"
354+
os: ubuntu-latest
355+
container: ubuntu:22.04
343356
install:
344357
- clang-15
345358
- libc++-15-dev
@@ -350,39 +363,54 @@ jobs:
350363
- toolset: clang
351364
compiler: clang++-18
352365
cxxstd: "11,14,17,20,2b"
353-
os: ubuntu-24.04
366+
os: ubuntu-latest
367+
container: ubuntu:24.04
354368
install:
355369
- clang-18
356370
- libc++-18-dev
357371
- libc++abi-18-dev
358372
cxxflags: -pipe -stdlib=libc++
359373
linkflags: -stdlib=libc++
360-
# Linux, clang-14 libc++, ubsan
374+
# Linux, clang-20 libc++
375+
- toolset: clang
376+
compiler: clang++-20
377+
cxxstd: "11,14,17,20,23,2c"
378+
os: ubuntu-latest
379+
container: ubuntu:25.04
380+
install:
381+
- clang-20
382+
- libc++-20-dev
383+
- libc++abi-20-dev
384+
cxxflags: -pipe -stdlib=libc++
385+
linkflags: -stdlib=libc++
386+
# Linux, clang-20 libc++, ubsan
361387
- name: UBSAN
362388
toolset: clang
363-
compiler: clang++-14
364-
cxxstd: "03,11,14,17,20"
389+
compiler: clang++-20
390+
cxxstd: "11,14,17,20,23,2c"
365391
cxxflags: -pipe -stdlib=libc++
366392
linkflags: -stdlib=libc++
367393
ubsan: 1
368-
os: ubuntu-22.04
394+
os: ubuntu-latest
395+
container: ubuntu:25.04
369396
install:
370-
- clang-14
371-
- libc++-14-dev
372-
- libc++abi-14-dev
373-
# Linux, clang-18 libc++, ubsan
374-
- name: UBSAN
397+
- clang-20
398+
- libc++-20-dev
399+
- libc++abi-20-dev
400+
# Linux, clang-20 libc++, asan
401+
- name: ASAN
375402
toolset: clang
376-
compiler: clang++-18
377-
cxxstd: "11,14,17,20"
403+
compiler: clang++-20
404+
cxxstd: "11,14,17,20,23,2c"
378405
cxxflags: -pipe -stdlib=libc++
379406
linkflags: -stdlib=libc++
380-
ubsan: 1
381-
os: ubuntu-24.04
407+
asan: 1
408+
os: ubuntu-latest
409+
container: ubuntu:25.04
382410
install:
383-
- clang-18
384-
- libc++-18-dev
385-
- libc++abi-18-dev
411+
- clang-20
412+
- libc++-20-dev
413+
- libc++abi-20-dev
386414
#------------------
387415
# MacOS, clang
388416
#------------------
@@ -579,29 +607,46 @@ jobs:
579607
run: |
580608
cd boost-root
581609
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}" "debug-symbols=off")
610+
#Build variant
582611
if [ -n "${{matrix.build_variant}}" ]
583612
then
584613
B2_ARGS+=("variant=${{matrix.build_variant}}")
585614
else
586615
B2_ARGS+=("variant=$DEFAULT_BUILD_VARIANT")
587616
fi
617+
#Threading
588618
if [ -n "${{matrix.threading}}" ]
589619
then
590620
B2_ARGS+=("threading=${{matrix.threading}}")
591621
fi
622+
#UBSAN options
592623
if [ -n "${{matrix.ubsan}}" ]
593624
then
594-
export UBSAN_OPTIONS="print_stacktrace=1"
595-
B2_ARGS+=("undefined-sanitizer=norecover" "linkflags=-fuse-ld=gold" "define=UBSAN=1" "debug-symbols=on" "visibility=global")
625+
export UBSAN_OPTIONS="verbosity=1:print_stacktrace=1"
626+
B2_ARGS+=("undefined-sanitizer=norecover" "define=UBSAN=1")
627+
fi
628+
#ASAN options
629+
if [ -n "${{matrix.asan}}" ]
630+
then
631+
export ASAN_OPTIONS="verbosity=1:print_stacktrace=1"
632+
B2_ARGS+=("address-sanitizer=norecover" "define=ASAN=1")
633+
fi
634+
#Common UBSAN / ASAN options
635+
if [ -n "${{matrix.asan}}" ] || [ -n "${{matrix.ubsan}}" ]
636+
then
637+
B2_ARGS+=("debug-symbols=on" "visibility=global")
596638
fi
639+
#cxxflags
597640
if [ -n "${{matrix.cxxflags}}" ]
598641
then
599642
B2_ARGS+=("cxxflags=${{matrix.cxxflags}}")
600643
fi
644+
#address-model
601645
if [ -n "${{matrix.address-model}}" ]
602646
then
603647
B2_ARGS+=("address-model=${{matrix.address-model}}")
604648
fi
649+
#link-flags
605650
if [ -n "${{matrix.linkflags}}" ]
606651
then
607652
B2_ARGS+=("linkflags=${{matrix.linkflags}}")

0 commit comments

Comments
 (0)