]> git.lizzy.rs Git - dragonfireclient.git/blob - .github/workflows/cpp_lint.yml
EntityESP, EntityTracers, PlayerESP, PlayerTracers
[dragonfireclient.git] / .github / workflows / cpp_lint.yml
1 name: cpp_lint
2
3 # lint on c/cpp changes or workflow changes
4 on:
5   push:
6     paths:
7       - 'lib/**.[ch]'
8       - 'lib/**.cpp'
9       - 'src/**.[ch]'
10       - 'src/**.cpp'
11       - '**/CMakeLists.txt'
12       - 'cmake/Modules/**'
13       - 'util/ci/**'
14       - '.github/workflows/**.yml'
15   pull_request:
16     paths:
17       - 'lib/**.[ch]'
18       - 'lib/**.cpp'
19       - 'src/**.[ch]'
20       - 'src/**.cpp'
21       - '**/CMakeLists.txt'
22       - 'cmake/Modules/**'
23       - 'util/ci/**'
24       - '.github/workflows/**.yml'
25
26 jobs:
27   clang_format:
28     runs-on: ubuntu-18.04
29     steps:
30       - uses: actions/checkout@v2
31       - name: Install clang-format
32         run: |
33           sudo apt-get install clang-format-9 -qyy
34
35       - name: Run clang-format
36         run: |
37           source ./util/ci/lint.sh
38           perform_lint
39         env:
40           CLANG_FORMAT: clang-format-9
41
42   clang_tidy:
43     runs-on: ubuntu-18.04
44     steps:
45     - uses: actions/checkout@v2
46     - name: Install deps
47       run: |
48         sudo apt-get install clang-tidy-9 -qyy
49         source ./util/ci/common.sh
50         install_linux_deps
51
52     - name: Run clang-tidy
53       run: |
54         ./util/ci/clang-tidy.sh