From f28f4800ab4d3b839a5fe8281faa18274fce8b7b Mon Sep 17 00:00:00 2001 From: Mingxin Wang Date: Thu, 24 Sep 2026 18:44:25 +0800 Subject: [PATCH] Simplify GCC pipeline and bump Clang to 23 Install GCC from the Ubuntu 26.04 archive instead of the gcc Docker image for the GCC and code coverage BVTs, bump the Clang BVT to 23, and move GCC 15 and Clang 22 into the compatibility matrix. --- .github/workflows/bvt-clang.yml | 2 +- .github/workflows/bvt-codecoverage.yml | 20 +++++++++----- .github/workflows/bvt-compatibility.yml | 2 ++ .github/workflows/bvt-gcc.yml | 36 ++++++++++++++----------- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/.github/workflows/bvt-clang.yml b/.github/workflows/bvt-clang.yml index fcb2f63..ce367d7 100644 --- a/.github/workflows/bvt-clang.yml +++ b/.github/workflows/bvt-clang.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: env: - CLANG_VERSION: 22 + CLANG_VERSION: 23 jobs: bvt-clang: diff --git a/.github/workflows/bvt-codecoverage.yml b/.github/workflows/bvt-codecoverage.yml index ea75b2c..7fb1dfd 100644 --- a/.github/workflows/bvt-codecoverage.yml +++ b/.github/workflows/bvt-codecoverage.yml @@ -2,22 +2,28 @@ on: workflow_call: workflow_dispatch: +env: + GCC_VERSION: 16 + jobs: bvt-codecoverage: runs-on: ubuntu-26.04 - container: gcc:16 steps: - uses: actions/checkout@v7 - - name: Install CMake, Ninja, and gcovr + - name: Install gcc and gcovr run: | - apt-get update - apt-get install -y cmake ninja-build gcovr + sudo apt install -y "g++-$GCC_VERSION" gcovr + { + echo "CC=gcc-$GCC_VERSION" + echo "CXX=g++-$GCC_VERSION" + echo "GCOV=gcov-$GCC_VERSION" + } >> "$GITHUB_ENV" - name: Check toolchain versions run: | - g++ --version - gcov --version + "$CXX" --version + "$GCOV" --version cmake --version ninja --version gcovr --version @@ -39,7 +45,7 @@ jobs: mkdir -p build/coverage/report gcovr --root . \ --filter 'include/proxy/' \ - --gcov-executable gcov \ + --gcov-executable "$GCOV" \ --exclude-unreachable-branches \ --print-summary \ --txt build/coverage/report/coverage.txt \ diff --git a/.github/workflows/bvt-compatibility.yml b/.github/workflows/bvt-compatibility.yml index a8dfcb5..a6d7a39 100644 --- a/.github/workflows/bvt-compatibility.yml +++ b/.github/workflows/bvt-compatibility.yml @@ -12,12 +12,14 @@ jobs: compiler: - {family: gcc, version: 13, modules: false, doc_tests: true, runner: ubuntu-26.04} - {family: gcc, version: 14, modules: false, doc_tests: true, runner: ubuntu-26.04} + - {family: gcc, version: 15, modules: true, doc_tests: true, runner: ubuntu-26.04} - {family: clang, version: 16, modules: false, doc_tests: false, runner: ubuntu-24.04} - {family: clang, version: 17, modules: false, doc_tests: true, runner: ubuntu-26.04} - {family: clang, version: 18, modules: false, doc_tests: true, runner: ubuntu-26.04} - {family: clang, version: 19, modules: false, doc_tests: true, runner: ubuntu-26.04} - {family: clang, version: 20, modules: true, doc_tests: true, runner: ubuntu-26.04} - {family: clang, version: 21, modules: true, doc_tests: true, runner: ubuntu-26.04} + - {family: clang, version: 22, modules: true, doc_tests: true, runner: ubuntu-26.04} steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/bvt-gcc.yml b/.github/workflows/bvt-gcc.yml index 4814893..6b76bbb 100644 --- a/.github/workflows/bvt-gcc.yml +++ b/.github/workflows/bvt-gcc.yml @@ -2,59 +2,63 @@ on: workflow_call: workflow_dispatch: +env: + GCC_VERSION: 16 + jobs: bvt-gcc: runs-on: ubuntu-26.04 - container: gcc:16 steps: - uses: actions/checkout@v7 - - name: Install CMake, Meson, and Bazelisk + - name: Install meson + run: pipx install meson + + - name: Install gcc run: | - apt-get update - apt-get install -y cmake meson ninja-build curl - curl -fsSL -o /usr/local/bin/bazel \ - https://github.com/bazelbuild/bazelisk/releases/download/v1.29.0/bazelisk-linux-amd64 - chmod +x /usr/local/bin/bazel + sudo apt install -y "g++-$GCC_VERSION" + { + echo "CC=gcc-$GCC_VERSION" + echo "CXX=g++-$GCC_VERSION" + } >> "$GITHUB_ENV" - name: Check toolchain versions run: | - g++ --version + "$CXX" --version cmake --version ninja --version meson --version bazel version - - name: Build and run test with gcc 15 on cmake + - name: Build and run test with gcc ${{ env.GCC_VERSION }} on cmake run: | cmake --preset default -DCMAKE_CXX_STANDARD=23 -DPROXY_BUILD_MODULES=TRUE cmake --build --preset default -j ctest --preset default -j mkdir build/cmake/drop - chmod +x tools/dump_build_env.sh - ./tools/dump_build_env.sh g++ build/cmake/drop/env-info.json + bash ./tools/dump_build_env.sh "$CXX" build/cmake/drop/env-info.json - - name: Build and run freestanding test with gcc 15 on cmake + - name: Build and run freestanding test with gcc ${{ env.GCC_VERSION }} on cmake run: | cmake --preset freestanding -DCMAKE_CXX_STANDARD=23 -DPROXY_BUILD_MODULES=TRUE cmake --build --preset freestanding -j ctest --preset freestanding -j - - name: Build and run test with gcc 15 on meson + - name: Build and run test with gcc ${{ env.GCC_VERSION }} on meson run: | meson setup build/meson --buildtype=release -Dtests=enabled -Dbenchmarks=enabled meson test -C build/meson meson test -C build/meson --benchmark --test-args=--benchmark_list_tests=true - - name: Build and run freestanding test with gcc 15 on meson + - name: Build and run freestanding test with gcc ${{ env.GCC_VERSION }} on meson run: | meson setup build/meson-freestanding --buildtype=release -Dfreestanding=true meson test -C build/meson-freestanding - - name: Build and Run test with gcc 15 on bazel + - name: Build and Run test with gcc ${{ env.GCC_VERSION }} on bazel run: bazel test --lockfile_mode=error //tests:proxy_tests //benchmarks:proxy_benchmarks //docs/... - - name: Build and run freestanding test with gcc 15 on bazel + - name: Build and run freestanding test with gcc ${{ env.GCC_VERSION }} on bazel run: bazel test --config=freestanding --lockfile_mode=error //tests:proxy_freestanding_tests - name: Run benchmarks