name: Linux CMake permissions: {} on: workflow_dispatch: push: branches: main tags-ignore: '*.*' paths: - '.github/workflows/cmake-linux.yml' - 'CMakeLists.txt' - 'cmake/**' - 'include/**' - 'src/*pp' - 'src/linux/*pp' pull_request: branches: main paths: - '.github/workflows/cmake-linux.yml' - 'CMakeLists.txt' - 'cmake/**' - 'include/**' - 'src/*pp' - 'src/linux/*pp' jobs: build: name: ${{ matrix.compiler }}-${{ matrix.version }} runs-on: ubuntu-24.04 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.compiler }}-${{ matrix.version }} cancel-in-progress: true strategy: matrix: include: - compiler: clang version: 19 - compiler: clang version: 20 - compiler: clang version: 21 - compiler: clang version: 22 - compiler: gcc version: 14 env: COMPILER: "${{ matrix.compiler }}" VERSION: "${{ matrix.version }}" steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Install clang ${{ matrix.version }} if: ${{ matrix.compiler == 'clang' }} run: wget -qO - https://apt.llvm.org/llvm.sh | sudo bash -s -- ${VERSION} all - name: Configure run: | if [[ "${COMPILER}" == "clang" ]]; then export CC=clang-${VERSION} export CXX=clang++-${VERSION} export CXXFLAGS="-stdlib=libc++" export LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind" else export CC=gcc-${VERSION} export CXX=g++-${VERSION} fi cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug - name: Compile run: cmake --build build --verbose - name: Test run: ctest --test-dir build