Skip to content

Commit f6a4f6a

Browse files
committed
Improve handling of selecting GCC/clang versions in CI
1 parent bdf59a2 commit f6a4f6a

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,29 @@ jobs:
2424
matrix:
2525
include:
2626
# GCC builds
27-
- {os: ubuntu-latest, compiler: gcc, version: '10',
27+
- {os: ubuntu-24.04, compiler: gcc, version: '10',
2828
flags: '-Wsuggest-override'}
29-
- {os: ubuntu-latest, compiler: gcc, version: '11',
29+
- {os: ubuntu-24.04, compiler: gcc, version: '11',
3030
flags: '-Wsuggest-override'}
31-
- {os: ubuntu-latest, compiler: gcc, version: '12',
31+
- {os: ubuntu-24.04, compiler: gcc, version: '12',
3232
flags: '-Wsuggest-override'}
33-
- {os: ubuntu-latest, compiler: gcc, version: '13',
33+
- {os: ubuntu-24.04, compiler: gcc, version: '13',
3434
flags: '-Wsuggest-override'}
35-
- {os: ubuntu-24.04, compiler: gcc, version: '14',
35+
- {os: ubuntu-24.04, compiler: gcc, version: '14',
3636
flags: '-Wsuggest-override'}
3737

3838
# Clang builds
39-
- {os: ubuntu-20.04, compiler: clang, version: '10'}
40-
- {os: ubuntu-20.04, compiler: clang, version: '11'}
41-
- {os: ubuntu-20.04, compiler: clang, version: '12'}
42-
- {os: ubuntu-22.04, compiler: clang, version: '13'}
43-
- {os: ubuntu-22.04, compiler: clang, version: '14'}
44-
- {os: ubuntu-22.04, compiler: clang, version: '15'}
45-
- {os: ubuntu-22.04, compiler: clang, version: '16'}
46-
- {os: ubuntu-latest, compiler: clang, version: '17'}
47-
- {os: ubuntu-latest, compiler: clang, version: '18'}
39+
- {os: ubuntu-22.04, compiler: clang, version: '10'}
40+
- {os: ubuntu-22.04, compiler: clang, version: '11'}
41+
- {os: ubuntu-22.04, compiler: clang, version: '12'}
42+
- {os: ubuntu-24.04, compiler: clang, version: '13'}
43+
- {os: ubuntu-24.04, compiler: clang, version: '14'}
44+
- {os: ubuntu-24.04, compiler: clang, version: '15'}
45+
- {os: ubuntu-24.04, compiler: clang, version: '16'}
46+
- {os: ubuntu-24.04, compiler: clang, version: '17'}
47+
- {os: ubuntu-24.04, compiler: clang, version: '18'}
48+
- {os: ubuntu-24.04, compiler: clang, version: '19', llvm-apt: true}
49+
- {os: ubuntu-24.04, compiler: clang, version: '20', llvm-apt: true}
4850

4951
# Windows builds
5052
- {os: windows-latest, compiler: msvc, version: '14.4', # VS 2022
@@ -57,7 +59,7 @@ jobs:
5759
- {os: ubuntu-24.04, compiler: gcc, version: '14',
5860
common-options: '--std=c++23', flags: '-Wsuggest-override',
5961
boost-version: '1.85.0', extra-desc: 'c++23'}
60-
- {os: ubuntu-latest, compiler: clang, version: '18',
62+
- {os: ubuntu-24.04, compiler: clang, version: '20', llvm-apt: true,
6163
common-options: '--std=c++23', boost-version: '1.85.0',
6264
extra-desc: 'c++23'}
6365
fail-fast: false
@@ -140,7 +142,8 @@ jobs:
140142
sudo apt-get install g++-${{ matrix.version }}
141143
echo "CXX=g++-${{ matrix.version }}" >> ${GITHUB_ENV}
142144
- name: Install clang
143-
if: startsWith(matrix.os, 'ubuntu-') && matrix.compiler == 'clang'
145+
if: startsWith(matrix.os, 'ubuntu-') && matrix.compiler == 'clang' &&
146+
matrix.llvm-apt
144147
run: |
145148
export CODENAME=`lsb_release -c | sed 's/Codename:\t//'`
146149
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -

0 commit comments

Comments
 (0)