-
Notifications
You must be signed in to change notification settings - Fork 101
51 lines (40 loc) · 1.43 KB
/
clang-tidy.yml
File metadata and controls
51 lines (40 loc) · 1.43 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
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: clang-tidy
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
# the man-db trigger causes package installations to stall for several minutes at times. so just drop the package.
# see https://github.com/actions/runner/issues/4030
- name: Remove man-db package
run: |
sudo apt-get update
sudo apt-get remove man-db
- name: Install missing software
run: |
sudo apt-get update
sudo apt-get install -y cmake make
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
sudo apt-get install clang-tidy-21
- name: Verify clang-tidy configuration
run: |
clang-tidy-21 --verify-config
- name: Prepare CMake
run: |
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
env:
CXX: clang-21
- name: Clang-Tidy
run: |
run-clang-tidy-21 -q -j $(nproc) -p=cmake.output