-
Notifications
You must be signed in to change notification settings - Fork 301
50 lines (47 loc) · 1.44 KB
/
style-check.yml
File metadata and controls
50 lines (47 loc) · 1.44 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
name: style check
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
jobs:
formatting-check:
name: Format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: sudo apt install clang-format
- run: |
git fetch origin ${{ github.event.pull_request.base.sha }}
git clang-format --diff ${{ github.event.pull_request.base.sha }} | tee diff.patch
! grep -q '^diff ' diff.patch
inlining-check:
runs-on: ubuntu-latest
name: Check inline keyword usage
steps:
- uses: actions/checkout@v6
- run: sudo apt install clang-tools
- run: sh ./test/check_inline_specifier.sh .
include-check:
runs-on: ubuntu-latest
name: Check unused standard includes
steps:
- uses: actions/checkout@v6
- run: pip install diskarzhan
- run: diskarzhan `find -name '*.[ch]pp'`
clang-tidy-check:
name: Clang-tidy check (x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: sudo apt install clang-tidy
- name: Configure
run: cmake -B _build
-DCMAKE_CXX_COMPILER=clang++
-DBUILD_TESTS=ON
-DDOWNLOAD_DOCTEST=ON
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_CXX_FLAGS='-march=tigerlake'
.
- name: Check
run: run-clang-tidy -p _build