-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (32 loc) · 1.14 KB
/
lint.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
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential liblz4-dev libzstd-dev protobuf-compiler doxygen graphviz gcovr
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_EXPORT_COMPILE_COMMANDS=on
- name: Build for linting
run: cmake --build ${{github.workspace}}/build -j3
- name: Lint CPP
uses: cpp-linter/cpp-linter-action@v2
id: cpplinter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: '' # disable clang-format checks.
tidy-checks: '' # Use .clang-tidy config file.
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
extra-args: -std=c++17
database: 'build'
ignore: 'tests'
- name: Check Lint Results
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the linting checks!"