Skip to content

Commit 6f51971

Browse files
committed
Script: add lint check
1 parent f3450ea commit 6f51971

7 files changed

Lines changed: 711 additions & 182 deletions

File tree

.github/workflows/clang-tidy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: clang-tidy-review
2+
3+
on:
4+
pull_request:
5+
6+
env:
7+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
8+
9+
jobs:
10+
clang-tidy-review:
11+
strategy:
12+
matrix:
13+
BUILD_TYPE: [Release]
14+
15+
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
16+
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
17+
# See: https://github.com/actions/runner-images/
18+
runs-on: ubuntu-latest
19+
20+
env:
21+
BUILD_TYPE: ${{matrix.BUILD_TYPE}}
22+
BUILD_DIR: ${{github.workspace}}/build
23+
SOURCE_DIR: ${{github.workspace}}/.cache/source
24+
TOOLS_DIR: ${{github.workspace}}/.cache/tools
25+
INSTALL_DIR: ${{github.workspace}}/.cache/install
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@v6
30+
with:
31+
submodules: recursive
32+
33+
- name: Make directories
34+
run: |
35+
cmake -E make_directory ${{env.BUILD_DIR}}
36+
cmake -E make_directory ${{env.SOURCE_DIR}}
37+
cmake -E make_directory ${{env.TOOLS_DIR}}
38+
cmake -E make_directory ${{env.INSTALL_DIR}}
39+
40+
- name: Cache installed
41+
uses: actions/cache@v5
42+
id: cache-installed
43+
with:
44+
path: |
45+
${{env.INSTALL_DIR}}
46+
key: install_ubuntu_${{matrix.BUILD_TYPE}}
47+
48+
# Run clang-tidy
49+
- uses: ZedThree/clang-tidy-review@v0.23.1
50+
env:
51+
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
52+
id: review
53+
with:
54+
split_workflow: true
55+
clang_tidy_checks: ''
56+
lgtm_comment_body: 'clang-tidy review says "All clean, LGTM! 👍"'
57+
# CMake command to run in order to generate compile_commands.json
58+
build_dir: ${{env.BUILD_DIR}}
59+
cmake_command: |
60+
./Script/build_linux.sh --lint
61+
62+
# Uploads an artefact containing clang_fixes.json
63+
- uses: ZedThree/clang-tidy-review/upload@v0.19.0
64+
id: upload-review

.github/workflows/clang-tidy.yml.bak

Lines changed: 0 additions & 171 deletions
This file was deleted.

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
name: ${{ env.artifact_name }}
3030

3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333
with:
3434
submodules: true
3535

0 commit comments

Comments
 (0)