blob: 9e90ce19d5edc56b0719d2df69cc891f51e34b25 [file] [log] [blame]
name: CI
on:
push:
paths-ignore:
- 'doc/**'
- 'scripts/**'
- 'LICENSE.txt'
- 'README.md'
pull_request:
paths-ignore:
- 'doc/**'
- 'scripts/**'
- 'LICENSE.txt'
- 'README.md'
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
jobs:
clang-tidy:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
flags: ["", "-D DOCTEST_CONFIG_DISABLE"]
steps:
- uses: actions/checkout@v2
- name: Install
run: sudo apt-get install -y ninja-build clang-tidy-14
- name: Generate
run: cmake -B build -S . -G Ninja -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_EXPORT_COMPILE_COMMANDS=ON -D CMAKE_CXX_CLANG_TIDY="clang-tidy-14;-warnings-as-errors=*" -D CMAKE_CXX_FLAGS="${{ matrix.flags }} -Wno-unknown-pragmas"
# (clang-diagnostic-)unknown-pragmas is disabled due to https://github.com/clangd/clangd/issues/1167
- name: Build
run: cmake --build build