From 17a43ee6350849703c59d8f5f937158f9adbd173 Mon Sep 17 00:00:00 2001 From: KeviM Date: Fri, 25 Sep 2026 14:42:30 -0700 Subject: [PATCH] ci: test the oldest compilers the README lists The README promises Clang 19 with libstdc++ and Apple Clang 17, but CI built only with GCC 13, Clang 18 with libc++, and the newest Apple Clang. Two jobs now build with -Werror and run the tests on each floor: clang-19 on Ubuntu 24.04, and Xcode 16.4 on macos-15 targeting macOS 13.4. The Xcode job fails if the selected compiler is not Apple Clang 17. --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 6 ++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cc2696..ed335c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,24 @@ jobs: - name: Test run: make test + # The README's oldest Clang with libstdc++. + build-linux-clang19: + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + build-essential clang-19 libcurl4-openssl-dev + - name: Build + run: >- + make build CMAKE_ARGS="-DCMAKE_CXX_COMPILER=clang++-19 + -DSPC_WARNINGS_AS_ERRORS=ON" + - name: Test + run: make test + # The README build on a Mac: Apple Clang and the system libcurl. One # universal binary targeting macOS 13.4 covers both architectures, and # test-macos runs it on an older macOS and a real Intel Mac. @@ -133,6 +151,26 @@ jobs: build/tests/spc_tests build/examples/example_parse_outlook + # The README's oldest Apple Clang, 17, from Xcode 16.4. + build-macos-xcode16: + runs-on: macos-15 + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Select Xcode 16.4 + run: | + sudo xcode-select -s /Applications/Xcode_16.4.app + version=$(c++ --version) + echo "$version" + grep -q '^Apple clang version 17\.' <<<"$version" + - name: Build + run: >- + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSPC_WARNINGS_AS_ERRORS=ON + -DCMAKE_OSX_DEPLOYMENT_TARGET=13.4 + - run: cmake --build build --parallel + - name: Test + run: ctest --test-dir build --output-on-failure + markdown-lint: runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b5b34e..70a4b99 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,8 +36,10 @@ make fixtures-check # fixture checksums make test-consumers # installed and FetchContent consumers ``` -CI also runs the tests with ASan and UBSan, with TSan, and with Clang 18 and -libc++, and it compiles the libraries with clang-tidy. To match those locally: +CI also runs the tests with ASan and UBSan, with TSan, and on the oldest +compilers the README lists: Clang 18 with libc++, Clang 19 with libstdc++, +and Apple Clang 17. It compiles the libraries with clang-tidy too. To run the +sanitizers and clang-tidy locally: ```bash make test BUILD_DIR=build-asan CMAKE_ARGS=-DSPC_ENABLE_SANITIZERS=ON