From 3f3b503feed54c87aef40f45f3f35f505cb2e6da 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 70260dd9..a301c6dd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -174,6 +174,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: