]> git.lizzy.rs Git - minetest.git/blob - .github/workflows/cpp_lint.yml
Sort out some issues with our CI setup
[minetest.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
28 #  clang_format:
29 #    runs-on: ubuntu-20.04
30 #    steps:
31 #      - uses: actions/checkout@v3
32 #      - name: Install clang-format
33 #        run: |
34 #          sudo apt-get update
35 #          sudo apt-get install -y clang-format-9
36 #
37 #      - name: Run clang-format
38 #        run: |
39 #          source ./util/ci/clang-format.sh
40 #          check_format
41 #        env:
42 #          CLANG_FORMAT: clang-format-9
43
44   clang_tidy:
45     runs-on: ubuntu-20.04
46     steps:
47     - uses: actions/checkout@v3
48     - name: Install deps
49       run: |
50         source ./util/ci/common.sh
51         install_linux_deps clang-tidy-9
52
53     - name: Run clang-tidy
54       run: |
55         ./util/ci/clang-tidy.sh