Skip to content

Commit ef13fb3

Browse files
Cannot get gcc-15 on Ubuntu 24.04 (latest)
1 parent 6853da2 commit ef13fb3

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
build_type: [ Debug ]
2020
compiler:
2121
- { c: gcc, cxx: g++, version: "14" }
22-
- { c: gcc, cxx: g++, version: "15" }
22+
# - { c: gcc, cxx: g++, version: "15" } # Only available on Ubuntu 25.04 "Plucky"
2323
- { c: clang, cxx: clang++, version: "19" }
2424
- { c: clang, cxx: clang++, version: "20" }
2525

@@ -29,14 +29,15 @@ jobs:
2929
- name: Install ${{ matrix.compiler.c }}-${{ matrix.compiler.version }}
3030
run: |
3131
if [[ "${{ matrix.compiler.c }}" == "gcc" ]]; then
32-
sudo apt-get update
33-
sudo apt-get install -y --no-install-recommends gcc-${{ matrix.compiler.version }} g++-${{ matrix.compiler.version }}
32+
PACKAGES="gcc-${{ matrix.compiler.version }} g++-${{ matrix.compiler.version }}"
3433
elif [[ "${{ matrix.compiler.c }}" == "clang" ]]; then
34+
CODENAME=$(lsb_release -sc)
35+
PACKAGES=clang-${{ matrix.compiler.version }}
3536
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm.gpg > /dev/null
36-
sudo add-apt-repository "deb http://apt.llvm.org/plucky/ llvm-toolchain-plucky-${{ matrix.compiler.version }} main"
37-
sudo apt-get update
38-
sudo apt-get install -y --no-install-recommends clang-${{ matrix.compiler.version }}
37+
sudo add-apt-repository "deb http://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${{ matrix.compiler.version }} main"
3938
fi
39+
sudo apt-get update
40+
sudo apt-get install -y --no-install-recommends ${PACKAGES}
4041
4142
- name: Configure CMake
4243
run: |

0 commit comments

Comments
 (0)