From c5aaff567dc4d70c4105ce3fde9bebbbf90c894f Mon Sep 17 00:00:00 2001 From: flink Date: Mon, 20 Jul 2026 21:16:49 -0400 Subject: [PATCH] Set matching CC alongside CXX in Linux CI matrix The Configure step only set CXX, so CMake's C compiler detection fell back to whatever the default happened to be on the runner, independent of which C++ compiler the matrix entry was actually testing (e.g. CXX=clang++-3.6 but CC left to detect GCC 11). Derive CC from the same matrix.cxx value the job already installs a matching compiler for. --- .github/workflows/linux.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e9a21424..8d45e478 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -179,6 +179,13 @@ jobs: sudo apt install locales-all cmake -E make_directory ${{runner.workspace}}/build + - name: Select matching C compiler + run: | + cc=${{matrix.cxx}} + cc=${cc/clang++/clang} + cc=${cc/g++/gcc} + echo "CC=$cc" >> "$GITHUB_ENV" + - name: Configure working-directory: ${{runner.workspace}}/build env: