From cc28fcf19003a8c135a7c331b81ccf7d6ca0228a Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Mon, 18 Aug 2025 20:19:26 +0700 Subject: [PATCH] ci: remove gcc-14 and add clang-14 with gcc-11 test - Add clang-14-libstdcxx-gcc11 matrix entry for testing - Remove gcc-14 to prevent Clang from finding it - Add diagnostic to show which headers Clang will use - Test both gcc-11 and gcc-13 with clang-14 --- .github/workflows/xahau-ga-nix.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/xahau-ga-nix.yml b/.github/workflows/xahau-ga-nix.yml index be88719e3..a2f31f19d 100644 --- a/.github/workflows/xahau-ga-nix.yml +++ b/.github/workflows/xahau-ga-nix.yml @@ -24,7 +24,7 @@ jobs: # - cc/cxx: Actual compiler executables # - compiler_version: Version number for Conan # - stdlib: Standard library (libstdcxx/libcxx) for Conan/CMake configuration - compiler_id: [clang-14-libstdcxx-gcc13, clang-16-libstdcxx-gcc13] # Temporarily disabled: gcc-13-libstdcxx + compiler_id: [clang-14-libstdcxx-gcc11, clang-14-libstdcxx-gcc13, clang-16-libstdcxx-gcc13] # Temporarily disabled: gcc-13-libstdcxx configuration: [Debug] include: # - compiler_id: gcc-13-libstdcxx @@ -33,6 +33,13 @@ jobs: # cxx: g++-13 # compiler_version: 13 # stdlib: libstdcxx + - compiler_id: clang-14-libstdcxx-gcc11 + compiler: clang + cc: clang-14 + cxx: clang++-14 + compiler_version: 14 + stdlib: libstdcxx # Required for clang-14 compatibility + clang_gcc_toolchain: 11 # Use GCC 11 headers with Clang 14 - compiler_id: clang-14-libstdcxx-gcc13 compiler: clang cc: clang-14 @@ -66,6 +73,10 @@ jobs: echo "Installing GCC ${{ matrix.clang_gcc_toolchain }} toolchain for Clang" sudo apt-get install -y gcc-${{ matrix.clang_gcc_toolchain }} g++-${{ matrix.clang_gcc_toolchain }} + # Remove GCC 14 to prevent Clang from finding it + echo "Removing GCC 14 to prevent conflicts" + sudo apt-get remove -y gcc-14 g++-14 || true + # Set the specified GCC version as the system default using update-alternatives echo "Setting GCC ${{ matrix.clang_gcc_toolchain }} as the default compiler" sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.clang_gcc_toolchain }} 100 @@ -76,6 +87,10 @@ jobs: # Verify the change gcc --version g++ --version + + # Show what Clang will use + echo "Checking what headers Clang will use:" + clang++ -E -x c++ - -v < /dev/null 2>&1 | grep "^ /" fi # Install libc++ dev packages if using libc++ (not needed for libstdc++)