fix: correct C++ compiler naming in CI (clang++-16 not clang-16++)
CI / build-and-test (push) Failing after 34s

Clang installs the C++ compiler as clang++-16, not clang-16++.
Use sed to properly transform the C compiler path.
This commit is contained in:
2026-08-04 14:24:09 -04:00
parent 4a8b87e2cd
commit 3302712336
+2 -2
View File
@@ -40,8 +40,8 @@ jobs:
run: | run: |
CC=$(find /usr/bin -maxdepth 1 \( -name 'clang-1[5-9]' -o -name 'clang-2[0-9]' \) 2>/dev/null | head -1) CC=$(find /usr/bin -maxdepth 1 \( -name 'clang-1[5-9]' -o -name 'clang-2[0-9]' \) 2>/dev/null | head -1)
if [ -z "$CC" ]; then CC=/usr/bin/clang-18; fi if [ -z "$CC" ]; then CC=/usr/bin/clang-18; fi
CXX="${CC}++" CXX=$(echo "$CC" | sed 's/clang-/clang++-/')
echo "Using compiler: $CXX" echo "CC=$CC CXX=$CXX"
cmake -B build -G Ninja \ cmake -B build -G Ninja \
-DCMAKE_C_COMPILER="$CC" \ -DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_CXX_COMPILER="$CXX"