mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-08 03:06:43 +00:00
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
This commit is contained in:
17
.github/workflows/xahau-ga-nix.yml
vendored
17
.github/workflows/xahau-ga-nix.yml
vendored
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user