Skip to content

Commit 3f84101

Browse files
committed
Add clang tidy in CI
1 parent f78a88f commit 3f84101

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/clang-tidy.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Clang Tidy Diff
2+
on:
3+
pull_request_target:
4+
paths:
5+
- '**.cpp'
6+
- '**.h'
7+
- '.github/workflows/clang-tidy.yml'
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
submodules: 'recursive'
15+
- uses: ilammy/msvc-dev-cmd@v1
16+
if: runner.os == 'Windows'
17+
- uses: turtlesec-no/get-ninja@main
18+
- uses: ZedThree/clang-tidy-review@v0.17.1
19+
id: review
20+
with:
21+
token: ${{ secrets.CLANG_TIDY_TOKEN }}
22+
apt_packages: |
23+
libc++-dev, libc++abi-dev, libpixman-1-dev,
24+
libfreetype6-dev, libharfbuzz-dev, zlib1g-dev, libx11-dev,
25+
libxcursor-dev, libxi-dev, libgl1-mesa-dev, ninja-build
26+
cmake_command: |
27+
cmake . -G Ninja \
28+
-DCMAKE_BUILD_TYPE=Debug \
29+
-DLAF_BACKEND=none
30+
- uses: ZedThree/clang-tidy-review/upload@v0.17.1
31+
id: upload-review
32+
- if: steps.review.outputs.total_comments > 0
33+
run: exit 1

0 commit comments

Comments
 (0)