-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (48 loc) · 1.75 KB
/
clang-tidy-review.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
49
50
51
52
53
54
55
56
name: clang-tidy-review
on:
pull_request:
paths:
- '**.h'
- '**.hpp'
- '**.cpp'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-24.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.2
with:
version: "16.0.0"
- name: Run clang-tidy
uses: ZedThree/clang-tidy-review@v0.18.0
id: review
with:
build_dir: build
apt_packages: libxml2,libxml2-dev,libtinfo-dev,zlib1g-dev,libzstd-dev,curl
exclude: "test/*,unittests/*,benchmark/*,demos/*"
split_workflow: true
cmake_command: >
cmake . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=On || true &&
rm -rf build &&
set -x &&
mkdir micromamba &&
cd micromamba &&
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba &&
export MAMBA_ROOT_PREFIX=$GITHUB_WORKSPACE/micromamba &&
eval "$(./bin/micromamba shell hook -s posix)" &&
micromamba create -n xeus-cpp -y --log-level warning -f $GITHUB_WORKSPACE/environment-dev.yml &&
micromamba activate xeus-cpp &&
cd .. &&
git config --global --add safe.directory /github/workspace &&
cmake . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=On
- name: Upload artifacts
uses: ZedThree/clang-tidy-review/upload@v0.18.0