From a161aae4c056dbb80dfd3305960f3577a0c9fc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 14:19:23 +0100 Subject: [PATCH 01/10] Update build_cmake.yml: modernize compilers and runners, refine coverage steps, and add optional Docker setup --- .github/workflows/build_cmake.yml | 107 ++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 59aca66..2102c42 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -3,6 +3,7 @@ name: CMake Build Matrix on: [ push, pull_request ] jobs: + # Modern compilers on native runners (same as before, just updated) build: name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} @@ -19,15 +20,6 @@ jobs: cc: gcc cxx: g++ - - name: "Ubuntu 22.04 Clang 13.0" - os: ubuntu-22.04 - build_type: Release - packages: ninja-build libc++-13-dev libc++abi-13-dev - generator: Ninja - compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: clang-13 - cxx: clang++-13 - - name: "Ubuntu 22.04 Clang 15.0" os: ubuntu-22.04 build_type: Release @@ -64,24 +56,6 @@ jobs: cc: clang-10 cxx: clang++-10 - - name: "Ubuntu 20.04 Clang 11.0" - os: ubuntu-20.04 - build_type: Release - packages: ninja-build clang-11 libc++-11-dev libc++abi-11-dev - generator: Ninja - compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: clang-11 - cxx: clang++-11 - - - name: "Ubuntu 20.04 GCC 9.3 coverage" - os: ubuntu-20.04 - build_type: Debug - packages: ninja-build lcov - generator: Ninja - compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: gcc - cxx: g++ - - name: "Windows MSVC 2019" os: windows-2019 build_type: Release @@ -91,8 +65,26 @@ jobs: cc: cl cxx: cl - - name: "macOS 13 AppleClang" - os: macos-13 + - name: "Windows MSVC 2022" + os: windows-2022 + build_type: Release + packages: ninja + generator: "Visual Studio 17 2022" + compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" + cc: cl + cxx: cl + + - name: "macOS 14 AppleClang (ARM)" + os: macos-14 + build_type: Release + packages: ninja + generator: Ninja + compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" + cc: clang + cxx: clang++ + + - name: "macOS 15 AppleClang (ARM)" + os: macos-15 build_type: Release packages: ninja generator: Ninja @@ -101,7 +93,7 @@ jobs: cxx: clang++ steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: print environment run: | @@ -148,7 +140,7 @@ jobs: - name: Run tests run: | - cd build && ctest -C ${{ matrix.config.build_type }} + cd build && ctest -C ${{ matrix.config.build_type }} --output-on-failure - name: Collect coverage info if: startsWith(matrix.config.build_type, 'Debug') @@ -156,15 +148,58 @@ jobs: cd build lcov --compat-libtool --directory . --capture --output-file coverage_output.info lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info - # sed -i 's|SF:/.*/filesystem/|SF:../|g' coverage.info - name: Upload coverage info if: startsWith(matrix.config.build_type, 'Debug') - env: - COVERALLS_DEBUG: true - NODE_COVERALLS_DEBUG: 1 - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v2 # UPDATED with: path-to-lcov: ${{ github.workspace }}/build/coverage.info github-token: ${{ secrets.GITHUB_TOKEN }} + # Optional: Legacy compilers via Docker +# legacy-compilers: +# name: "Docker ${{ matrix.compiler }} ${{ matrix.version }}" +# runs-on: ubuntu-latest +# strategy: +# fail-fast: false +# matrix: +# include: +# # GCC 5.5 is minimum supported version +# - compiler: gcc +# version: 5 +# - compiler: gcc +# version: 6 +# - compiler: gcc +# version: 7 +# - compiler: gcc +# version: 8 +# # Clang 6 is minimum supported version +# - compiler: clang +# version: 6 +# - compiler: clang +# version: 7 +# - compiler: clang +# version: 8 +# - compiler: clang +# version: 9 +# +# container: +# image: ${{ matrix.compiler == 'gcc' && format('gcc:{0}', matrix.version) || format('silkeh/clang:{0}', matrix.version) }} +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install CMake and Ninja +# run: | +# apt-get update +# apt-get install -y cmake ninja-build +# +# - name: Configure +# run: | +# cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release +# +# - name: Build +# run: cmake --build build +# +# - name: Test +# run: cd build && ctest --output-on-failure \ No newline at end of file From b1c6284a6edeaee238406b1fd285dc9072fe736f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 15:14:57 +0100 Subject: [PATCH 02/10] Re-enable legacy compiler builds in GitHub Actions and update FreeBSD image to 14.3 in Cirrus CI --- .cirrus.yml | 2 +- .github/workflows/build_cmake.yml | 92 +++++++++++++++---------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index b188205..a56c10a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,6 +1,6 @@ freebsd_task: freebsd_instance: - image_family: freebsd-14-0 + image_family: freebsd-14-3 install_script: | pkg install -y cmake pw groupadd testgrp diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 2102c42..348523a 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -157,49 +157,49 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} # Optional: Legacy compilers via Docker -# legacy-compilers: -# name: "Docker ${{ matrix.compiler }} ${{ matrix.version }}" -# runs-on: ubuntu-latest -# strategy: -# fail-fast: false -# matrix: -# include: -# # GCC 5.5 is minimum supported version -# - compiler: gcc -# version: 5 -# - compiler: gcc -# version: 6 -# - compiler: gcc -# version: 7 -# - compiler: gcc -# version: 8 -# # Clang 6 is minimum supported version -# - compiler: clang -# version: 6 -# - compiler: clang -# version: 7 -# - compiler: clang -# version: 8 -# - compiler: clang -# version: 9 -# -# container: -# image: ${{ matrix.compiler == 'gcc' && format('gcc:{0}', matrix.version) || format('silkeh/clang:{0}', matrix.version) }} -# -# steps: -# - uses: actions/checkout@v4 -# -# - name: Install CMake and Ninja -# run: | -# apt-get update -# apt-get install -y cmake ninja-build -# -# - name: Configure -# run: | -# cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release -# -# - name: Build -# run: cmake --build build -# -# - name: Test -# run: cd build && ctest --output-on-failure \ No newline at end of file + legacy-compilers: + name: "Docker ${{ matrix.compiler }} ${{ matrix.version }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + # GCC 5.5 is minimum supported version + - compiler: gcc + version: 5 + - compiler: gcc + version: 6 + - compiler: gcc + version: 7 + - compiler: gcc + version: 8 + # Clang 6 is minimum supported version + - compiler: clang + version: 6 + - compiler: clang + version: 7 + - compiler: clang + version: 8 + - compiler: clang + version: 9 + + container: + image: ${{ matrix.compiler == 'gcc' && format('gcc:{0}', matrix.version) || format('silkeh/clang:{0}', matrix.version) }} + + steps: + - uses: actions/checkout@v4 + + - name: Install CMake and Ninja + run: | + apt-get update + apt-get install -y cmake ninja-build + + - name: Configure + run: | + cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: cmake --build build + + - name: Test + run: cd build && ctest --output-on-failure \ No newline at end of file From 8bc001414bf3fd9dd46184c3c5119d4dbfce72a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 16:32:31 +0100 Subject: [PATCH 03/10] Update build_cmake.yml: add new platforms, revise toolchain configs, and fix EOL dependency issues --- .github/workflows/build_cmake.yml | 78 ++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 348523a..13a8901 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -11,19 +11,37 @@ jobs: fail-fast: false matrix: config: - - name: "Ubuntu 22.04 GCC 11" - os: ubuntu-22.04 + - name: "Ubuntu 24.04 GCC 13" + os: ubuntu-24.04 build_type: Release packages: ninja-build generator: Ninja compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: gcc - cxx: g++ + cc: gcc-13 + cxx: g++-13 - - name: "Ubuntu 22.04 Clang 15.0" + - name: "Ubuntu 24.04 Clang 18" + os: ubuntu-24.04 + build_type: Release + packages: ninja-build clang-18 libc++-18-dev libc++abi-18-dev + generator: Ninja + compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" + cc: clang-18 + cxx: clang++-18 + + - name: "Ubuntu 22.04 GCC 12" os: ubuntu-22.04 build_type: Release - packages: ninja-build libc++-15-dev libc++abi-15-dev + packages: ninja-build gcc-12 g++-12 + generator: Ninja + compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" + cc: gcc-12 + cxx: g++-12 + + - name: "Ubuntu 22.04 Clang 15" + os: ubuntu-22.04 + build_type: Release + packages: ninja-build clang-15 libc++-15-dev libc++abi-15-dev generator: Ninja compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" cc: clang-15 @@ -35,26 +53,8 @@ jobs: packages: ninja-build lcov generator: Ninja compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: gcc - cxx: g++ - - - name: "Ubuntu 20.04 GCC 9.3" - os: ubuntu-20.04 - build_type: Release - packages: ninja-build - generator: Ninja - compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: gcc - cxx: g++ - - - name: "Ubuntu 20.04 Clang 10.0" - os: ubuntu-20.04 - build_type: Release - packages: ninja-build - generator: Ninja - compatibility: "cxx_std_11;cxx_std_17;cxx_std_20" - cc: clang-10 - cxx: clang++-10 + cc: gcc-11 + cxx: g++-11 - name: "Windows MSVC 2019" os: windows-2019 @@ -74,6 +74,7 @@ jobs: cc: cl cxx: cl + # FIXED: Replace macos-13 with macos-14 (Apple Silicon) - name: "macOS 14 AppleClang (ARM)" os: macos-14 build_type: Release @@ -83,6 +84,7 @@ jobs: cc: clang cxx: clang++ + # ADDED: macOS 15 for latest testing - name: "macOS 15 AppleClang (ARM)" os: macos-15 build_type: Release @@ -93,7 +95,7 @@ jobs: cxx: clang++ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 # UPDATED from v2 - name: print environment run: | @@ -167,27 +169,47 @@ jobs: # GCC 5.5 is minimum supported version - compiler: gcc version: 5 + checkout_version: v1 # Old containers need v1 (no Node.js dependency) - compiler: gcc version: 6 + checkout_version: v1 - compiler: gcc version: 7 + checkout_version: v4 - compiler: gcc version: 8 + checkout_version: v4 # Clang 6 is minimum supported version - compiler: clang version: 6 + checkout_version: v4 - compiler: clang version: 7 + checkout_version: v4 - compiler: clang version: 8 + checkout_version: v4 - compiler: clang version: 9 + checkout_version: v4 container: image: ${{ matrix.compiler == 'gcc' && format('gcc:{0}', matrix.version) || format('silkeh/clang:{0}', matrix.version) }} steps: - - uses: actions/checkout@v4 + # Use older checkout for GCC 5-6 (ancient glibc doesn't support Node 20) + - name: Checkout code + uses: actions/checkout@${{ matrix.checkout_version }} + + # Fix Debian Buster EOL repository issues (GCC 7-8, Clang 7-9) + - name: Fix Debian repositories for EOL releases + if: matrix.version == 7 || matrix.version == 8 || matrix.version == 9 + run: | + # Debian Buster reached EOL, repositories moved to archive + sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list + sed -i 's|security.debian.org/debian-security|archive.debian.org/debian-security|g' /etc/apt/sources.list + sed -i '/stretch-updates/d' /etc/apt/sources.list + sed -i '/buster-updates/d' /etc/apt/sources.list - name: Install CMake and Ninja run: | From 770f1ae251ff893435c560293c53ce007420b45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 16:46:31 +0100 Subject: [PATCH 04/10] Clarify legacy compiler tests in build_cmake.yml --- .github/workflows/build_cmake.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 13a8901..a4c8d0f 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -158,7 +158,8 @@ jobs: path-to-lcov: ${{ github.workspace }}/build/coverage.info github-token: ${{ secrets.GITHUB_TOKEN }} - # Optional: Legacy compilers via Docker + # Legacy compilers via Docker + # Tests with officially supported minimum versions (GCC 5.5+, Clang 6+) legacy-compilers: name: "Docker ${{ matrix.compiler }} ${{ matrix.version }}" runs-on: ubuntu-latest From 7777e3c106ba4f83bc4f7a49b8b91df7293ff143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 16:50:11 +0100 Subject: [PATCH 05/10] Clarify legacy compiler tests in build_cmake.yml --- .github/workflows/build_cmake.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index a4c8d0f..23939b0 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -199,8 +199,13 @@ jobs: steps: # Use older checkout for GCC 5-6 (ancient glibc doesn't support Node 20) - - name: Checkout code - uses: actions/checkout@${{ matrix.checkout_version }} + - name: Checkout code (v1 for old glibc) + if: matrix.checkout_version == 'v1' + uses: actions/checkout@v1 + + - name: Checkout code (v4 for modern containers) + if: matrix.checkout_version == 'v4' + uses: actions/checkout@v4 # Fix Debian Buster EOL repository issues (GCC 7-8, Clang 7-9) - name: Fix Debian repositories for EOL releases From 3aad88b8e60f1e949970e8baac8b616d2bdcfb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 18:52:33 +0100 Subject: [PATCH 06/10] Fix Debian Jessie EOL repository issues for GCC 5-6 and refine Buster handling --- .github/workflows/build_cmake.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 23939b0..28e1222 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -207,8 +207,17 @@ jobs: if: matrix.checkout_version == 'v4' uses: actions/checkout@v4 + # Fix Debian Jessie EOL repository issues (GCC 5-6) + - name: Fix Debian repositories for Jessie (GCC 5-6) + if: matrix.version == 5 || matrix.version == 6 + run: | + # Debian Jessie reached EOL, repositories moved to archive + sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list + sed -i 's|security.debian.org|archive.debian.org/debian-security|g' /etc/apt/sources.list + sed -i '/jessie-updates/d' /etc/apt/sources.list + # Fix Debian Buster EOL repository issues (GCC 7-8, Clang 7-9) - - name: Fix Debian repositories for EOL releases + - name: Fix Debian repositories for Buster (GCC 7-8, Clang 7-9) if: matrix.version == 7 || matrix.version == 8 || matrix.version == 9 run: | # Debian Buster reached EOL, repositories moved to archive From ef40391bd81fa15f95c36c564d29af4dd10c12e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 18:59:35 +0100 Subject: [PATCH 07/10] Refine Debian repository fixes and conditions in build matrix for GCC/Clang versions. --- .github/workflows/build_cmake.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 28e1222..04a6cc4 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -207,22 +207,22 @@ jobs: if: matrix.checkout_version == 'v4' uses: actions/checkout@v4 - # Fix Debian Jessie EOL repository issues (GCC 5-6) + # Fix Debian Jessie EOL repository issues (GCC 5-6 only) - name: Fix Debian repositories for Jessie (GCC 5-6) - if: matrix.version == 5 || matrix.version == 6 + if: matrix.compiler == 'gcc' && (matrix.version == 5 || matrix.version == 6) run: | # Debian Jessie reached EOL, repositories moved to archive sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list - sed -i 's|security.debian.org|archive.debian.org/debian-security|g' /etc/apt/sources.list + sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list sed -i '/jessie-updates/d' /etc/apt/sources.list # Fix Debian Buster EOL repository issues (GCC 7-8, Clang 7-9) - name: Fix Debian repositories for Buster (GCC 7-8, Clang 7-9) - if: matrix.version == 7 || matrix.version == 8 || matrix.version == 9 + if: (matrix.compiler == 'gcc' && (matrix.version == 7 || matrix.version == 8)) || (matrix.compiler == 'clang' && (matrix.version == 7 || matrix.version == 8 || matrix.version == 9)) run: | # Debian Buster reached EOL, repositories moved to archive sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list - sed -i 's|security.debian.org/debian-security|archive.debian.org/debian-security|g' /etc/apt/sources.list + sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list sed -i '/stretch-updates/d' /etc/apt/sources.list sed -i '/buster-updates/d' /etc/apt/sources.list From 3634e15e6ac2332642cd472622dbd6efcc65ac43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 22:07:27 +0100 Subject: [PATCH 08/10] Fix formatting and resolve expired GPG key issues in build_cmake.yml --- .github/workflows/build_cmake.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 04a6cc4..3742b79 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -229,7 +229,12 @@ jobs: - name: Install CMake and Ninja run: | apt-get update - apt-get install -y cmake ninja-build + # GCC 5-6 need --allow-unauthenticated due to expired Jessie GPG keys + if [ "${{ matrix.compiler }}" = "gcc" ] && ([ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]); then + apt-get install -y --allow-unauthenticated cmake ninja-build + else + apt-get install -y cmake ninja-build + fi - name: Configure run: | From 9ef4be2a961e36d81f3e01556635bf6eb27ae7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 22:41:14 +0100 Subject: [PATCH 09/10] Update build_cmake.yml to handle GCC 5-6 with older CMake versions --- .github/workflows/build_cmake.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 3742b79..5adba98 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -238,7 +238,18 @@ jobs: - name: Configure run: | - cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + # GCC 5-6 have CMake 3.0.2 which doesn't support -S/-B flags (added in 3.13) + if [ "${{ matrix.compiler }}" = "gcc" ]; then + if [ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]; then + mkdir build + cd build + cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release + else + cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + fi + else + cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release + fi - name: Build run: cmake --build build From b44136d1fb0e35491928e226e624017c6b394f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schu=CC=88mann?= Date: Sat, 27 Dec 2025 23:01:43 +0100 Subject: [PATCH 10/10] Simplify and streamline `build_cmake.yml`: eliminate outdated CMake workaround for GCC 5-6, ensuring unified CMake configuration across all versions. --- .github/workflows/build_cmake.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 5adba98..7923fa2 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -230,26 +230,19 @@ jobs: run: | apt-get update # GCC 5-6 need --allow-unauthenticated due to expired Jessie GPG keys - if [ "${{ matrix.compiler }}" = "gcc" ] && ([ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]); then - apt-get install -y --allow-unauthenticated cmake ninja-build + if [ "${{ matrix.compiler }}" = "gcc" ] && [ "${{ matrix.version }}" = "5" -o "${{ matrix.version }}" = "6" ]; then + apt-get install -y --allow-unauthenticated ninja-build wget ca-certificates + # Debian Jessie has CMake 3.0.2, but project needs 3.7.2+ + # Download CMake 3.16.9 (supports -S/-B flags, works with old glibc) + wget -qO- "https://cmake.org/files/v3.16/cmake-3.16.9-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local else apt-get install -y cmake ninja-build fi - name: Configure run: | - # GCC 5-6 have CMake 3.0.2 which doesn't support -S/-B flags (added in 3.13) - if [ "${{ matrix.compiler }}" = "gcc" ]; then - if [ "${{ matrix.version }}" = "5" ] || [ "${{ matrix.version }}" = "6" ]; then - mkdir build - cd build - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release - else - cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release - fi - else - cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release - fi + # Now all versions have CMake 3.10+, so we can use -S/-B flags + cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=Release - name: Build run: cmake --build build