Skip to content

Add clang-tidy configuration and CI job #123

Add clang-tidy configuration and CI job

Add clang-tidy configuration and CI job #123

Workflow file for this run

name: ubuntu
on:
pull_request:
paths-ignore:
- 'documentation/**'
- '.github/workflows/documentation.yml'
push:
paths-ignore:
- 'documentation/**'
- '.github/workflows/documentation.yml'
jobs:
ubuntu:
runs-on: ${{ matrix.compiler.os }}
strategy:
fail-fast: false
matrix:
build: [ Debug, Release ]
compiler:
- { cc: "gcc-11", cxx: "g++-11", os: "ubuntu-22.04" }
- { cc: "gcc-12", cxx: "g++-12", os: "ubuntu-22.04" }
- { cc: "gcc-13", cxx: "g++-13", os: "ubuntu-24.04" }
- { cc: "gcc-14", cxx: "g++-14", os: "ubuntu-24.04" }
- { cc: "clang-13", cxx: "clang++-13", os: "ubuntu-22.04" }
- { cc: "clang-14", cxx: "clang++-14", os: "ubuntu-22.04" }
- { cc: "clang-15", cxx: "clang++-15", os: "ubuntu-22.04" }
- { cc: "clang-16", cxx: "clang++-16", os: "ubuntu-24.04" }
- { cc: "clang-17", cxx: "clang++-17", os: "ubuntu-24.04" }
- { cc: "clang-18", cxx: "clang++-18", os: "ubuntu-24.04" }
name: "${{matrix.compiler.cxx}}:${{matrix.build}}"
steps:
- uses: actions/checkout@v4
- name: Configure clang
run: |
if [[ "${{ matrix.compiler.cc }}" == clang* ]]; then
sudo apt update
sudo apt install ${{ matrix.compiler.cc }} -y
fi
- name: Configure gcc
run: |
if [[ "${{ matrix.compiler.cc }}" == gcc* ]]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install ${{ matrix.compiler.cxx }} -y
fi
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build}} -DCMAKE_C_COMPILER=${{matrix.compiler.cc}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
- name: Build
run: cmake --build . --config ${{matrix.build}}
- name: Tests
run: ctest --output-on-failure -C ${{matrix.build}}