1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
name: Linux CMake
on:
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: gcc
version: 14
steps:
- uses: actions/checkout@v6
- name: Install clang ${{ matrix.version }}
if: ${{ matrix.compiler == 'clang' }}
run: wget -qO - https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ matrix.version }} all
- name: Configure
run: |
if [[ "${{ matrix.compiler }}" == "clang" ]]; then
export CC=clang-${{ matrix.version }}
export CXX=clang++-${{ matrix.version }}
export CXXFLAGS="-stdlib=libc++"
export LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
else
export CC=gcc-${{ matrix.version }}
export CXX=g++-${{ matrix.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
|