Skip to content

Commit c2aacd0

Browse files
Create clsng-tidy.yml
1 parent 5573484 commit c2aacd0

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/clsng-tidy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Clang-Tidy Analysis
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
11+
jobs:
12+
clang-tidy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Install clang-tidy
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y clang-tidy
23+
24+
- name: Configure project (CMake)
25+
run: |
26+
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
27+
28+
- name: Build project
29+
run: |
30+
cmake --build build -- -j$(nproc)
31+
32+
- name: Run clang-tidy
33+
run: |
34+
clang-tidy $(find . -name "*.cpp") -- -I./include -std=c++20

0 commit comments

Comments
 (0)