Add gcc 15 to CI #319
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CMake | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| # The CMake configure and build commands are platform agnostic and should work equally | |
| # well on Windows or Mac. You can convert this to a matrix build if you need | |
| # cross-platform coverage. | |
| # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| # Allow specifying a container per-matrix to avoid duplicating jobs | |
| container: ${{ matrix.config.container }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "Linux g++ 10.2 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "g++-10", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 10.2 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "g++-10", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux g++ 11 C++17 Debug", | |
| os: ubuntu-22.04, | |
| buildtype: Debug, | |
| cxx: "g++-11", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 11 C++20 Debug", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "g++-11", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux g++ 11 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Debug, | |
| cxx: "g++-11", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 11 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "g++-11", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux g++ 12 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "g++-12", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 12 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "g++-12", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux g++ 13 C++17", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "g++-13", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 13 C++20", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "g++-13", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux g++ 14 C++17", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "g++-14", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 14 C++20", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "g++-14", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux g++ 15 (Debian) C++17", | |
| os: ubuntu-24.04, | |
| container: debian:testing, | |
| buildtype: Release, | |
| cxx: "g++-15", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux g++ 15 (Debian) C++20", | |
| os: ubuntu-24.04, | |
| container: debian:testing, | |
| buildtype: Release, | |
| cxx: "g++-15", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-13 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-13", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux clang-13 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-13", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-14 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-14", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux clang-14 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-14", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-15 C++17 Debug", | |
| os: ubuntu-22.04, | |
| buildtype: Debug, | |
| cxx: "clang++-15", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux clang-15 C++20 Debug", | |
| os: ubuntu-22.04, | |
| buildtype: Debug, | |
| cxx: "clang++-15", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-15 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-15", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux clang-15 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-15", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-16 C++17", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-16", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Linux clang-16 C++20", | |
| os: ubuntu-22.04, | |
| buildtype: Release, | |
| cxx: "clang++-16", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-17 C++20", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "clang++-17", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-18 C++20", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "clang++-18", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-19 C++20", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "clang++-19", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Linux clang-20 C++20", | |
| os: ubuntu-24.04, | |
| buildtype: Release, | |
| cxx: "clang++-20", | |
| cxx_flags: -stdlib=libc++, | |
| exe_linker_flags: -lc++, | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Windows MSVC 2017 (x64) C++17", | |
| os: windows-2019, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 17, | |
| msvcver: 2017, | |
| } | |
| - { | |
| name: "Windows MSVC 2017 (x64) C++20", | |
| os: windows-2019, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 20, | |
| msvcver: 2017, | |
| } | |
| - { | |
| name: "Windows MSVC 2019 (x64) C++17", | |
| os: windows-2019, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Windows MSVC 2019 (x64) C++20", | |
| os: windows-2019, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Windows MSVC 2022 (x64) C++17", | |
| os: windows-2022, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Windows MSVC 2022 (x64) C++20", | |
| os: windows-2022, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Windows MSVC 2022 (aarch64) C++20", | |
| os: windows-11-arm, | |
| buildtype: Release, | |
| cxx: "cl", | |
| environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Msys2/CLANG", | |
| os: windows-2019, | |
| buildtype: Release, | |
| mingw: MINGW64, | |
| mingw-arch: x86_64, | |
| cxx: "clang", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Msys2/GCC", | |
| os: windows-2019, | |
| buildtype: Release, | |
| mingw: MINGW64, | |
| mingw-arch: x86_64, | |
| cxx: "gcc", | |
| cxxver: 20, | |
| } | |
| - { | |
| name: "Msys2/debugCLANG", | |
| os: windows-2019, | |
| buildtype: Debug, | |
| mingw: MINGW64, | |
| mingw-arch: x86_64, | |
| cxx: "clang", | |
| cxxver: 17, | |
| } | |
| - { | |
| name: "Msys2/debugGCC", | |
| os: windows-2019, | |
| buildtype: Debug, | |
| mingw: MINGW64, | |
| mingw-arch: x86_64, | |
| cxx: "gcc", | |
| cxxver: 17, | |
| } | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: "Install Msys2" | |
| if: (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW')) | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.config.mingw }} | |
| install: >- | |
| git | |
| mingw-w64-${{ matrix.config.mingw-arch }}-cmake | |
| mingw-w64-${{ matrix.config.mingw-arch }}-ninja | |
| mingw-w64-${{ matrix.config.mingw-arch }}-${{ matrix.config.cxx }} | |
| mingw-w64-${{ matrix.config.mingw-arch }}-toolchain | |
| update: true | |
| - name: Install Clang 13 | |
| id: install_clang_13 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-13' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 13 | |
| sudo apt-get install libc++-13-dev libc++abi-13-dev libunwind-13-dev | |
| - name: Install Clang 14 | |
| id: install_clang_14 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-14' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 14 | |
| sudo apt-get install libc++-14-dev libc++abi-14-dev libunwind-14-dev | |
| - name: Install Clang 15 | |
| id: install_clang_15 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-15' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 15 | |
| sudo apt-get install libc++-15-dev libc++abi-15-dev libunwind-15-dev | |
| - name: Install Clang 16 | |
| id: install_clang_16 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-16' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 16 | |
| sudo apt-get install libc++-16-dev libc++abi-16-dev libunwind-16-dev | |
| - name: Install Clang 17 | |
| id: install_clang_17 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-17' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 17 | |
| sudo apt-get install libc++-17-dev libc++abi-17-dev libunwind-17-dev | |
| - name: Install Clang 18 | |
| id: install_clang_18 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-18' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install libc++-18-dev libc++abi-18-dev libunwind-18-dev | |
| - name: Install Clang 19 | |
| id: install_clang_19 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-19' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 19 | |
| sudo apt-get install libc++-19-dev libc++abi-19-dev libunwind-19-dev | |
| - name: Install Clang 20 | |
| id: install_clang_20 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-20' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 20 | |
| sudo apt-get install libc++-20-dev libc++abi-20-dev libunwind-20-dev | |
| - name: Install g++ 10 | |
| id: install_gcc_10 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-10' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
| sudo apt-get install g++-10 | |
| - name: Install g++ 11 | |
| id: install_gcc_11 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-11' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
| sudo apt-get install g++-11 | |
| - name: Install g++ 12 | |
| id: install_gcc_12 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-12' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| sudo apt-get install g++-12 | |
| - name: Install g++ 13 | |
| id: install_gcc_13 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-13' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
| sudo apt-get install g++-13 | |
| - name: Install g++ 14 | |
| id: install_gcc_14 | |
| if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-14' ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
| sudo apt-get install g++-14 | |
| - name: Install GCC 15 and tools (Debian container) | |
| if: matrix.config.container == 'debian:testing' && matrix.config.cxx == 'g++-15' | |
| shell: bash | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| g++-15 cmake ninja-build build-essential pkg-config | |
| - name: Install MSVC 2017 | |
| id: install_msvc_2017 | |
| if: startsWith(matrix.config.os, 'windows-2019') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 ) | |
| shell: bash | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| choco install visualstudio2017community | |
| choco install visualstudio2017-workload-nativedesktop | |
| choco install visualstudio2017-workload-vctools | |
| - name: MSYS2 - Configure, Build & Test | |
| id: install_msys2 | |
| if: (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW')) | |
| shell: msys2 {0} | |
| working-directory: ${{ env.HOME }} | |
| run: | | |
| cmake $GITHUB_WORKSPACE \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \ | |
| -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \ | |
| -DBUILD_TESTING=ON \ | |
| -DCMAKE_CXX_FLAGS=${{ matrix.config.cxx_flags }} \ | |
| -DCMAKE_EXE_LINKER_FLAGS=${{ matrix.config.exe_linker_flags }} \ | |
| -DCMAKE_VERBOSE_MAKEFILE=ON | |
| cmake --build . --config ${{ matrix.config.buildtype }} | |
| ctest --output-on-failure -C ${{ matrix.config.buildtype }} | |
| - name: Create Build Environment | |
| # Some projects don't allow in-source building, so create a separate build directory | |
| # We'll use this as our working directory for all subsequent commands | |
| # Use the GITHUB_WORKSPACE env var so the path resolves correctly inside containers (/__w/...) | |
| run: cmake -E make_directory "$GITHUB_WORKSPACE/build" | |
| - name: Configure CMake | |
| if: (!contains(matrix.config.mingw, 'MINGW')) | |
| # Use a bash shell so we can use the same syntax for environment variable | |
| # access regardless of the host operating system | |
| shell: bash | |
| working-directory: $GITHUB_WORKSPACE/build | |
| env: | |
| CXX: ${{ matrix.config.cxx }} | |
| # Note the current convention is to use the -S and -B options here to specify source | |
| # and build directories, but this is only available with CMake 3.13 and higher. | |
| # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | |
| run: | | |
| # run environment setup script if any | |
| [ -n "${{ matrix.config.environment_script }}" ] && "${{ matrix.config.environment_script }}" | |
| cmake $GITHUB_WORKSPACE \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \ | |
| -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \ | |
| -DBUILD_TESTING=ON \ | |
| -DCMAKE_CXX_FLAGS=${{ matrix.config.cxx_flags }} \ | |
| -DCMAKE_EXE_LINKER_FLAGS=${{ matrix.config.exe_linker_flags }} \ | |
| -DCMAKE_VERBOSE_MAKEFILE=ON | |
| - name: Build | |
| if: (!contains(matrix.config.mingw, 'MINGW')) | |
| working-directory: $GITHUB_WORKSPACE/build | |
| shell: bash | |
| # Execute the build. You can specify a specific target with "--target <NAME>" | |
| run: cmake --build . --config ${{ matrix.config.buildtype }} | |
| - name: Test | |
| if: (!contains(matrix.config.mingw, 'MINGW')) | |
| working-directory: $GITHUB_WORKSPACE/build | |
| shell: bash | |
| # Execute tests defined by the CMake configuration. | |
| # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
| run: ctest --output-on-failure -C ${{ matrix.config.buildtype }} | |