Upgrade iwyu workflow to use clang 18 #2762
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-24.04] | |
compiler: [g++-11, g++-12, g++-13, g++-14, clang++-17, clang++-18, clang++-19] | |
configuration: [Debug, Release] | |
exclude: | |
- os: ubuntu-22.04 | |
compiler: g++-13 | |
- os: ubuntu-22.04 | |
compiler: g++-14 | |
- os: ubuntu-22.04 | |
compiler: clang++-17 | |
- os: ubuntu-22.04 | |
compiler: clang++-18 | |
- os: ubuntu-22.04 | |
compiler: clang++-19 | |
- os: ubuntu-24.04 | |
compiler: g++-11 | |
- os: ubuntu-24.04 | |
compiler: g++-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: prepare clang++-19 | |
if: matrix.compiler == 'clang++-19' | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 19 | |
echo "CXXFLAGS=\"--gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/13\"" >> "$GITHUB_ENV" | |
- name: configure | |
run: CXX=${{ matrix.compiler }} cmake -Werror=dev -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -D ENABLE_TESTS="unit" -D CMAKE_COMPILE_WARNING_AS_ERROR=1 -B build | |
- name: build source | |
run: cmake --build build --target Osiris -j $(nproc --all) | |
- name: build unit tests | |
run: cmake --build build --target UnitTests -j $(nproc --all) | |
- name: run unit tests | |
run: ctest --test-dir build --output-on-failure --schedule-random -j $(nproc --all) |