-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (29 loc) · 1018 Bytes
/
static-analysis.yml
File metadata and controls
31 lines (29 loc) · 1018 Bytes
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
name: Static analysis
on: [pull_request]
jobs:
clang-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install prerequisites
run: |
sudo apt install clang libomp-dev
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ github.job }}
- name: Build
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --parallel
- name: Run clang-tidy
run: |
find app/Accuracy app/Converters app/Graph app/ReaderImage src -name '*.cpp' -print0 \
| xargs -0 clang-tidy -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/(Accuracy|Converters|Graph|ReaderImage)/.*)" -p build