Skip to content

Commit 57661e9

Browse files
committed
Add clang-tidy check GH Actions workflow
1 parent e623180 commit 57661e9

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ on:
66
# branches: [ master ]
77

88
jobs:
9-
ci:
9+
build:
1010
name: "CI"
1111
uses: ./.github/workflows/build.yml
1212
with:
1313
git-ref: ${{ github.ref }}
1414

15+
check:
16+
name: "Clang-Tidy"
17+
uses: ./.github/workflows/clangtidy.yml
18+
with:
19+
git-ref: ${{ github.ref }}
20+

.github/workflows/clangtidy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Clang-Tidy
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
git-ref:
6+
description: A commit, branch or tag to build.
7+
type: string
8+
required: true
9+
workflow_call:
10+
inputs:
11+
git-ref:
12+
description: A commit, branch or tag to build.
13+
type: string
14+
required: true
15+
16+
jobs:
17+
check:
18+
runs-on: ubuntu-latest
19+
container: silkeh/clang
20+
21+
steps:
22+
# - name: Set up Python
23+
# uses: actions/setup-python@v5
24+
# with:
25+
# python-version: '3.13'
26+
27+
- run: apt-get install python3 python3-pip
28+
29+
- name: Set up SCons
30+
shell: bash
31+
run: |
32+
python3 -c "import sys; print(sys.version)"
33+
python3 -m pip install scons==4.7.0
34+
scons --version
35+
36+
- name: Checkout project
37+
uses: actions/checkout@v4
38+
with:
39+
submodules: recursive
40+
ref: ${{ inputs.git-ref }}
41+
42+
- name: Run Clang-Tidy
43+
shell: sh
44+
run: |
45+
./compile_debug.sh compiledb
46+
./run_clang_tidy.sh -warnings-as-errors '*'

0 commit comments

Comments
 (0)