11# Copyright 2020-2021 Peter Dimov
22# Copyright 2021 Andrey Semashev
3- # Copyright 2021-2024 Alexander Grund
3+ # Copyright 2021-2025 Alexander Grund
44# Copyright 2022 James E. King III
55#
66# Distributed under the Boost Software License, Version 1.0.
@@ -86,56 +86,70 @@ jobs:
8686 include :
8787 # Linux, gcc
8888 # GCC 5 is the first to have enough C++11 support, so don't test anything older except for one to verify the checks
89- - { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' }
90- - { compiler: gcc-5, cxxstd: '03,11,14,1z', os: ubuntu-22.04, container: 'ubuntu:18.04' }
91- - { compiler: gcc-6, cxxstd: '11,14,17', os: ubuntu-22.04, container: 'ubuntu:18.04' }
92- - { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-22.04, container: 'ubuntu:18.04' }
93- - { compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-22.04, container: 'ubuntu:18.04' }
94- - { compiler: gcc-9, cxxstd: '11,14,17,2a', os: ubuntu-22.04, container: 'ubuntu:18.04' }
95- - { compiler: gcc-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
96- - { compiler: gcc-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
89+ - { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-latest, container: 'ubuntu:16.04' }
90+ - { compiler: gcc-5, cxxstd: '03,11,14,1z', os: ubuntu-latest, container: 'ubuntu:18.04' }
91+ - { compiler: gcc-6, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:18.04' }
92+ # GCC 7 & 8 on Ubuntu 20 show failures in basic_filebuf::_M_convert_to_external conversion
93+ - { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:18.04' }
94+ - { compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-latest, container: 'ubuntu:18.04' }
95+ - { compiler: gcc-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
96+ - { compiler: gcc-10, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
97+ - { compiler: gcc-11, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
98+ - { compiler: gcc-12, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
99+ - { compiler: gcc-13, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
100+ - { compiler: gcc-14, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
101+
97102 - { name: GCC w/ sanitizers, sanitize: yes,
98- compiler : gcc-12 , cxxstd: '11,14,17,20', os: ubuntu-22 .04 }
103+ compiler : gcc-13 , cxxstd: '11,14,17,20', os: ubuntu-24 .04 }
99104 - { name: Collect coverage, coverage: yes,
100- compiler : gcc-8, cxxstd: '11,2a', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' }
105+ compiler : gcc-8, cxxstd: '11,2a', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' }
101106
102107 # Linux, clang
103- - { compiler: clang-3.5, cxxstd: '03, 11', os: ubuntu-20.04 , container: 'ubuntu:16.04' }
104- - { compiler: clang-3.6, cxxstd: '11,14', os: ubuntu-20.04 , container: 'ubuntu:16.04' }
105- - { compiler: clang-3.7, cxxstd: '11,14', os: ubuntu-20.04 , container: 'ubuntu:16.04' }
106- - { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-20.04 , container: 'ubuntu:16.04' }
107- - { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-22.04 , container: 'ubuntu:18.04' }
108- - { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-22.04 , container: 'ubuntu:18.04' }
109- - { compiler: clang-5.0, cxxstd: '11,14,1z', os: ubuntu-22.04 , container: 'ubuntu:18.04' }
110- - { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-22 .04, container: 'ubuntu:18.04' }
111- - { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-22 .04, container: 'ubuntu:18.04' }
108+ - { compiler: clang-3.5, cxxstd: '11', os: ubuntu-latest , container: 'ubuntu:16.04' }
109+ - { compiler: clang-3.6, cxxstd: '11,14', os: ubuntu-latest , container: 'ubuntu:16.04' }
110+ - { compiler: clang-3.7, cxxstd: '11,14', os: ubuntu-latest , container: 'ubuntu:16.04' }
111+ - { compiler: clang-3.8, cxxstd: '11,14', os: ubuntu-latest , container: 'ubuntu:16.04' }
112+ - { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-latest , container: 'ubuntu:18.04' }
113+ - { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-latest , container: 'ubuntu:18.04' }
114+ - { compiler: clang-5.0, cxxstd: '11,14,1z', os: ubuntu-latest , container: 'ubuntu:18.04' }
115+ - { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20 .04 }
116+ - { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-20 .04 }
112117 # Note: clang-8 does not fully support C++20, so it is not compatible with some libstdc++ versions in this mode
113- - { compiler: clang-8, cxxstd: '11,14,17,2a', os: ubuntu-22 .04, container: 'ubuntu:18.04', install: 'clang-8 g++-7' , gcc_toolchain: 7 }
114- - { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
115- - { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
116- - { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
117- - { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
118+ - { compiler: clang-8, cxxstd: '11,14,17,2a', os: ubuntu-20 .04 , gcc_toolchain: 7 }
119+ - { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
120+ - { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
121+ - { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
122+ - { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
118123 # Clang isn't compatible with libstdc++-13, so use the slightly older one
119- - { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-13 g++-12', gcc_toolchain: 12 }
120- - { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-14 g++-12', gcc_toolchain: 12 }
121- - { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-15 g++-12', gcc_toolchain: 12 }
124+ - { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-22.04, gcc_toolchain: 11 }
125+ - { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-22.04, gcc_toolchain: 11 }
126+ - { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-22.04, gcc_toolchain: 12 }
127+ - { compiler: clang-16, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
128+ # https://github.com/llvm/llvm-project/issues/59827: disabled 2b/23 for clang-17 with libstdc++13 in 24.04
129+ - { compiler: clang-17, cxxstd: '11,14,17,20', os: ubuntu-24.04 }
130+ - { compiler: clang-18, cxxstd: '11,14,17,20,23,2c', os: ubuntu-24.04 }
131+ - { name: Run code fuzzer, fuzzing: yes,
132+ compiler : clang-18, cxxstd: '20', os: ubuntu-24.04, variant: debug, link: static }
122133
123134 # libc++
124135 - { compiler: clang-6.0, cxxstd: '11,14', os: ubuntu-22.04, container: 'ubuntu:18.04', stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' }
125136 - { name: Clang w/ sanitizers, sanitize: yes,
126137 compiler : clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' }
127138
128139 # OSX, clang
129- - { compiler: clang, cxxstd: '11,14,17,20', os: macos-12 }
130140 - { name: MacOS w/ clang and sanitizers,
131141 compiler : clang, cxxstd: '11,14,17,20,2b', os: macos-13, ubsan: yes }
132142 # TODO: Iconv issue
133143 # - { compiler: clang, cxxstd: '11,14,17,20,2b', os: macos-14 }
134144
135145 timeout-minutes : 120
136146 runs-on : ${{matrix.os}}
137- container : ${{matrix.container}}
138- env : {B2_USE_CCACHE: 1, ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true}
147+ container :
148+ image : ${{matrix.container}}
149+ volumes :
150+ - /node20217:/node20217:rw,rshared
151+ - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
152+ env : {B2_USE_CCACHE: 1}
139153
140154 steps :
141155 - name : Setup environment
@@ -158,22 +172,26 @@ jobs:
158172 echo "B2_USE_CCACHE=0" >> $GITHUB_ENV
159173 fi
160174 git config --global pack.threads 0
175+ if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then
176+ # Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590
177+ curl -sL https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217
178+ fi
161179
162- - uses : actions/checkout@v3
180+ - uses : actions/checkout@v4
163181 with :
164182 # For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
165183 fetch-depth : ${{ matrix.coverage && '0' || '1' }}
166184
167185 - name : Cache ccache
168- uses : actions/cache@v3
186+ uses : actions/cache@v4
169187 if : env.B2_USE_CCACHE
170188 with :
171189 path : ~/.ccache
172190 key : ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
173191 restore-keys : ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
174192
175193 - name : Fetch Boost.CI
176- uses : actions/checkout@v3
194+ uses : actions/checkout@v4
177195 with :
178196 repository : boostorg/boost-ci
179197 ref : master
@@ -190,13 +208,8 @@ jobs:
190208 run : |
191209 SOURCE_KEYS=(${{join(matrix.source_keys, ' ')}})
192210 SOURCES=(${{join(matrix.sources, ' ')}})
193- # Add these by default
194- SOURCE_KEYS+=(
195- 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F'
196- 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x40976EAF437D05B5'
197- 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3B4FE6ACC0B21F32'
198- )
199- SOURCES+=(ppa:ubuntu-toolchain-r/test)
211+
212+ [[ "${{matrix.address-model}}" != *32* ]] || sudo dpkg --add-architecture i386
200213
201214 ci/add-apt-keys.sh "${SOURCE_KEYS[@]}"
202215 # Initial update before adding sources required to get e.g. keys
@@ -207,9 +220,11 @@ jobs:
207220 if [[ -z "${{matrix.install}}" ]]; then
208221 pkgs="${{matrix.compiler}}"
209222 pkgs="${pkgs/gcc-/g++-}"
223+ [[ -z "${{matrix.gcc_toolchain}}" ]] || pkgs+=" g++-${{matrix.gcc_toolchain}}"
210224 else
211225 pkgs="${{matrix.install}}"
212226 fi
227+ [[ "${{matrix.address-model}}" != *32* ]] || pkgs+=" libicu-dev:i386"
213228 sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs libicu-dev
214229
215230 - name : Setup GCC Toolchain
@@ -283,7 +298,8 @@ jobs:
283298 # More entries can be added in the same way, see the B2_ARGS assignment in ci/enforce.sh for the possible keys.
284299 # B2_DEFINES: ${{matrix.defines}}
285300 # Variables set here (to non-empty) will override the top-level environment variables, e.g.
286- # B2_VARIANT: ${{matrix.variant}}
301+ B2_VARIANT : ${{matrix.variant}}
302+ B2_LINK : ${{matrix.link}}
287303 B2_UBSAN : ${{matrix.ubsan}}
288304 run : source ci/github/install.sh
289305
@@ -297,27 +313,53 @@ jobs:
297313 B2_TARGETS="libs/$SELF/test//show_config --verbose-test" ci/build.sh
298314 ci/build.sh
299315
316+ - name : Show config.log
317+ if : ' !matrix.coverity && always()'
318+ run : cat "$BOOST_ROOT/bin.v2/config.log"
319+
320+ - name : Test output
321+ if : ' !matrix.coverity && always()'
322+ run : |
323+ for f in $(find "$BOOST_ROOT/bin.v2/libs/$SELF/test" -type f -name '*.run'); do
324+ name=$(basename "$f")
325+ name=${name%.run}
326+ config=$(dirname "$f")
327+ config=${config#*.test/*/}
328+ config=${config/\/visibility-hidden/}
329+ echo "::group::$name"
330+ echo "$config"
331+ echo ""
332+ cat "$f"
333+ echo "::endgroup::"
334+ done
335+
336+ - name : Collect coverage
337+ if : matrix.coverage
338+ run : ci/codecov.sh "collect" && mv coverage.info coverage.all.info
339+
300340 - name : Run tests with iconv only
301341 if : ' !matrix.coverity'
302342 run : ci/build.sh
303343 env : {B2_FLAGS: -a boost.locale.icu=off boost.locale.iconv=on}
344+ - name : Collect coverage
345+ if : matrix.coverage
346+ run : ci/codecov.sh "collect" && mv coverage.info coverage.iconv.info
347+
304348 - name : Run tests with ICU only
305349 if : ' !matrix.coverity'
306350 run : ci/build.sh
307351 env : {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=off}
308-
309352 - name : Collect coverage
310353 if : matrix.coverage
311- run : ci/codecov.sh "upload"
312- env :
313- BOOST_CI_CODECOV_IO_UPLOAD : skip
354+ run : ci/codecov.sh "collect" && mv coverage.info coverage.icu.info
314355
315356 - name : Upload coverage
316357 if : matrix.coverage
317- uses : codecov/codecov-action@v4
358+ uses : codecov/codecov-action@v5
318359 with :
360+ fail_ci_if_error : true
319361 disable_search : true
320- file : coverage.info
362+ files : coverage.all.info,coverage.iconv.info,coverage.icu .info
321363 name : Github Actions
322364 token : ${{secrets.CODECOV_TOKEN}}
323365 verbose : true
@@ -329,6 +371,11 @@ jobs:
329371 COVERITY_SCAN_NOTIFICATION_EMAIL : ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
330372 COVERITY_SCAN_TOKEN : ${{ secrets.COVERITY_SCAN_TOKEN }}
331373
374+ - name : Run fuzzing
375+ if : matrix.fuzzing
376+ run : B2_TARGETS="libs/$SELF/fuzzing" ci/build.sh
377+ env : {B2_FLAGS: -a}
378+
332379 windows :
333380 defaults :
334381 run :
@@ -434,10 +481,10 @@ jobs:
434481
435482 - name : Upload coverage
436483 if : matrix.coverage
437- uses : codecov/codecov-action@v4
484+ uses : codecov/codecov-action@v5
438485 with :
439486 disable_search : true
440- file : __out/cobertura.xml
487+ files : __out/cobertura.xml
441488 name : Github Actions
442489 token : ${{secrets.CODECOV_TOKEN}}
443490 verbose : true
0 commit comments