Skip to content

Commit b7987c4

Browse files
authored
Merge pull request #194 from boostorg/ci
GHA: Avoid using gcc-toolchain change for Clang jobs and stop using Ubuntu 20 runners
2 parents 64f1eee + 8f1078a commit b7987c4

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

.github/workflows/ci.yml

+29-27
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ jobs:
5151
- { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-latest, container: 'ubuntu:16.04' }
5252
- { compiler: gcc-5, cxxstd: '03,11,14,1z', os: ubuntu-latest, container: 'ubuntu:18.04' }
5353
- { compiler: gcc-6, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:18.04' }
54-
- { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-20.04 }
55-
- { compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
56-
- { compiler: gcc-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
54+
- { compiler: gcc-7, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' }
55+
- { compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-latest, container: 'ubuntu:20.04' }
56+
- { compiler: gcc-9, cxxstd: '11,14,17,2a', os: ubuntu-22.04 }
5757
- { compiler: gcc-10, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
5858
- { compiler: gcc-11, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
5959
- { compiler: gcc-12, cxxstd: '11,14,17,20', os: ubuntu-22.04 }
@@ -63,7 +63,7 @@ jobs:
6363
- { name: GCC w/ sanitizers, sanitize: yes,
6464
compiler: gcc-13, cxxstd: '11,14,17,20', os: ubuntu-24.04 }
6565
- { name: Collect coverage, coverage: yes,
66-
compiler: gcc-8, cxxstd: '11,14,17,2a', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' }
66+
compiler: gcc-8, cxxstd: '11,2a', os: ubuntu-latest, container: 'ubuntu:20.04', install: 'g++-8-multilib', address-model: '32,64' }
6767

6868
# Linux, clang
6969
- { compiler: clang-3.5, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' }
@@ -73,28 +73,26 @@ jobs:
7373
- { compiler: clang-3.9, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04' }
7474
- { compiler: clang-4.0, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04' }
7575
- { compiler: clang-5.0, cxxstd: '11,14,1z', os: ubuntu-latest, container: 'ubuntu:18.04' }
76-
- { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-20.04 }
77-
- { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-20.04 }
76+
- { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' }
77+
- { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' }
7878
# Note: clang-8 does not fully support C++20, so it is not compatible with some libstdc++ versions in this mode
79-
- { compiler: clang-8, cxxstd: '11,14,17,2a', os: ubuntu-20.04 , install: 'clang-8 g++-7', gcc_toolchain: 7 }
80-
- { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-20.04 }
81-
- { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
82-
- { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
83-
- { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04 }
84-
# Clang isn't compatible with libstdc++-13, so use the slightly older one
85-
- { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-13 g++-12', gcc_toolchain: 12 }
86-
- { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-14 g++-12', gcc_toolchain: 12 }
87-
- { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-22.04, install: 'clang-15 g++-12', gcc_toolchain: 12 }
79+
- { compiler: clang-8, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' }
80+
- { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-latest, container: 'ubuntu:20.04' }
81+
- { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04' }
82+
- { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04' }
83+
- { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04' }
84+
- { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' }
85+
- { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' }
86+
- { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' }
8887
- { compiler: clang-16, cxxstd: '11,14,17,20,2b', os: ubuntu-24.04 }
89-
# https://github.com/llvm/llvm-project/issues/59827: disabled 2b/23 for clang-17 with libstdc++13 in 24.04
90-
- { compiler: clang-17, cxxstd: '11,14,17,20', os: ubuntu-24.04 }
88+
- { compiler: clang-17, cxxstd: '11,14,17,20,23', os: ubuntu-latest, container: 'ubuntu:24.04' }
9189
- { compiler: clang-18, cxxstd: '11,14,17,20,23,2c', os: ubuntu-24.04 }
9290

9391
# libc++
9492
- { compiler: clang-6.0, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04', stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' }
95-
- { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' }
93+
- { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04', stdlib: libc++ }
9694
- { name: Clang w/ sanitizers, sanitize: yes,
97-
compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-22.04, stdlib: libc++, install: 'clang-14 libc++-14-dev libc++abi-14-dev' }
95+
compiler: clang-17, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:24.04', stdlib: libc++ }
9896

9997
# OSX, clang
10098
- { name: MacOS w/ clang and sanitizers,
@@ -128,7 +126,7 @@ jobs:
128126
osver=$(lsb_release -sr | cut -f1 -d.)
129127
pkgs="g++ git xz-utils"
130128
# Ubuntu 22+ has only Python 3 in the repos
131-
if [ -n "$osver" ] && [ "$osver" -ge "22" ]; then
129+
if [ -n "$osver" ] && [ "$osver" -ge "20" ]; then
132130
pkgs+=" python-is-python3 libpython3-dev"
133131
else
134132
pkgs+=" python libpython-dev"
@@ -191,8 +189,13 @@ jobs:
191189
192190
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
193191
if [[ -z "${{matrix.install}}" ]]; then
194-
pkgs="${{matrix.compiler}}"
195-
pkgs="${pkgs/gcc-/g++-}"
192+
compiler="${{matrix.compiler}}"
193+
pkgs="${compiler/gcc-/g++-}"
194+
[[ -z "${{matrix.gcc_toolchain}}" ]] || pkgs+=" g++-${{matrix.gcc_toolchain}}"
195+
if [[ "${{matrix.stdlib}}" == "libc++" && $compiler == "clang-"* ]]; then
196+
ver=${compiler#*-}
197+
pkgs+=" libc++-${ver}-dev libc++abi-${ver}-dev"
198+
fi
196199
else
197200
pkgs="${{matrix.install}}"
198201
fi
@@ -215,11 +218,11 @@ jobs:
215218
216219
- name: Setup multiarch
217220
if: matrix.multiarch
221+
run: ci/github/setup_bdde.sh
218222
env:
219223
BDDE_DISTRO: ${{matrix.distro}}
220224
BDDE_EDITION: ${{matrix.edition}}
221225
BDDE_ARCH: ${{matrix.arch}}
222-
run: ci/github/setup_bdde.sh
223226

224227
- name: Setup Boost
225228
env:
@@ -261,10 +264,9 @@ jobs:
261264
fail_ci_if_error: true
262265
disable_search: true
263266
files: coverage.info
264-
name: Github Actions
267+
name: ${{env.CODECOV_NAME}} (POSIX)
265268
token: ${{secrets.CODECOV_TOKEN}}
266269
verbose: true
267-
working-directory: ${{env.BOOST_CI_SRC_FOLDER}}
268270

269271
- name: Run coverity
270272
if: matrix.coverity && github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'master')
@@ -338,8 +340,8 @@ jobs:
338340
fail-fast: false
339341
matrix:
340342
include:
341-
- { os: ubuntu-20.04, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' }
342-
- { os: ubuntu-20.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
343+
- { os: ubuntu-latest, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' }
344+
- { os: ubuntu-latest, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' }
343345
- { os: windows-2019, build_shared: ON, build_type: Debug, generator: 'Visual Studio 16 2019' }
344346
- { os: windows-2019, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 16 2019' }
345347

0 commit comments

Comments
 (0)