Skip to content

Commit 45405ec

Browse files
authored
Add gcc 15 to CI
1 parent b837edb commit 45405ec

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

.github/workflows/cmake.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
1515
name: ${{ matrix.config.name }}
1616
runs-on: ${{ matrix.config.os }}
17+
# Allow specifying a container per-matrix to avoid duplicating jobs
18+
container: ${{ matrix.config.container }}
1719

1820
strategy:
1921
fail-fast: false
@@ -103,6 +105,22 @@ jobs:
103105
cxx: "g++-14",
104106
cxxver: 20,
105107
}
108+
- {
109+
name: "Linux g++ 15 (Debian) C++17",
110+
os: ubuntu-24.04,
111+
container: debian:testing,
112+
buildtype: Release,
113+
cxx: "g++-15",
114+
cxxver: 17,
115+
}
116+
- {
117+
name: "Linux g++ 15 (Debian) C++20",
118+
os: ubuntu-24.04,
119+
container: debian:testing,
120+
buildtype: Release,
121+
cxx: "g++-15",
122+
cxxver: 20,
123+
}
106124
- {
107125
name: "Linux clang-13 C++17",
108126
os: ubuntu-22.04,
@@ -472,6 +490,14 @@ jobs:
472490
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
473491
sudo apt-get install g++-14
474492
493+
- name: Install GCC 15 and tools (Debian container)
494+
if: matrix.config.container == 'debian:testing' && matrix.config.cxx == 'g++-15'
495+
shell: bash
496+
run: |
497+
apt-get update
498+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
499+
g++-15 cmake ninja-build build-essential pkg-config
500+
475501
- name: Install MSVC 2017
476502
id: install_msvc_2017
477503
if: startsWith(matrix.config.os, 'windows-2019') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 )
@@ -501,14 +527,14 @@ jobs:
501527
- name: Create Build Environment
502528
# Some projects don't allow in-source building, so create a separate build directory
503529
# We'll use this as our working directory for all subsequent commands
504-
run: cmake -E make_directory ${{runner.workspace}}/build
530+
run: cmake -E make_directory "build"
505531

506532
- name: Configure CMake
507533
if: (!contains(matrix.config.mingw, 'MINGW'))
508534
# Use a bash shell so we can use the same syntax for environment variable
509535
# access regardless of the host operating system
510536
shell: bash
511-
working-directory: ${{runner.workspace}}/build
537+
working-directory: build
512538
env:
513539
CXX: ${{ matrix.config.cxx }}
514540
# Note the current convention is to use the -S and -B options here to specify source
@@ -528,15 +554,16 @@ jobs:
528554
529555
- name: Build
530556
if: (!contains(matrix.config.mingw, 'MINGW'))
531-
working-directory: ${{runner.workspace}}/build
557+
working-directory: build
532558
shell: bash
533559
# Execute the build. You can specify a specific target with "--target <NAME>"
534560
run: cmake --build . --config ${{ matrix.config.buildtype }}
535561

536562
- name: Test
537563
if: (!contains(matrix.config.mingw, 'MINGW'))
538-
working-directory: ${{runner.workspace}}/build
564+
working-directory: build
539565
shell: bash
540566
# Execute tests defined by the CMake configuration.
541567
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
542568
run: ctest --output-on-failure -C ${{ matrix.config.buildtype }}
569+

0 commit comments

Comments
 (0)