forked from capstone-engine/capstone
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (41 loc) · 1.06 KB
/
clang-tidy.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Run clang-tidy
on:
push:
paths:
- '**.c'
- '**.h'
pull_request:
# Stop previous runs on the same branch on new push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
runs-on: ubuntu-24.04
name: clang-tidy
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install clang-tidy
run: |
sudo apt install clang-tidy
- name: Build
run: |
mkdir build && cd build
CC=clang cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCAPSTONE_BUILD_SHARED_LIBS=1 ..
CC=clang sudo cmake --build . --config Release
cd ..
- name: Install clang-tidy-18
run: |
sudo apt install clang-tidy-18
- name: Check for warnings
env:
base_sha: ${{ github.event.pull_request.base.sha }}
head_sha: ${{ github.event.pull_request.head.sha }}
run: |
./run-clang-tidy.sh build
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
path: ct-warnings.txt