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.
This commit is contained in:
flink 2026-07-20 21:16:49 -04:00
parent bcaa44d055
commit 3f3b503fee

View File

@ -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: