forked from compiler-research/CppInterOp
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.42 KB
/
Copy pathclang-tidy-review.yml
File metadata and controls
52 lines (44 loc) · 1.42 KB
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
49
50
51
52
name: clang-tidy-review
on:
pull_request:
paths:
- '**.h'
- '**.cpp'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-22.04
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2.0.3
with:
version: "17.0.6"
- name: install lit
run: pip install lit
- name: Run clang-tidy
uses: ZedThree/clang-tidy-review@v0.21.0
id: review
with:
build_dir: build
apt_packages: cmake,libxml2,libxml2-dev,libtinfo-dev,zlib1g-dev,libzstd-dev
split_workflow: true
config_file: .clang-tidy
cmake_command: >
cmake . -B build -DCMAKE_BUILD_TYPE="Release"
-DCMAKE_C_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang"
-DCMAKE_CXX_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang++"
-DLLVM_DIR="$GITHUB_WORKSPACE/llvm"
-DBUILD_SHARED_LIBS=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON &&
cd build &&
cmake --build . --target googletest --parallel $(nproc --all)
- name: Upload artifacts
uses: ZedThree/clang-tidy-review/upload@v0.21.0