forked from KhronosGroup/Vulkan-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 2.22 KB
/
check.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Quality Checks
on:
pull_request:
branches: [master]
env:
TARGET_BRANCH: master
jobs:
doxygen:
name: Doxygen Syntax Check
container: ghcr.io/khronosgroup/vulkan-samples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: mkdir -p doxygen
- run: doxygen docs/doxygen/doxyfile
- run: if [ $(stat -c%s doxygen/warnings.txt) -gt 0 ]; then cat doxygen/warnings.txt; exit 1; fi
copyright_headers:
name: Copyright Headers Check
container: ghcr.io/khronosgroup/vulkan-samples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch origin $TARGET_BRANCH:$TARGET_BRANCH
- run: python3 /usr/local/bin/check_copyright_headers.py $TARGET_BRANCH
snake_case_check:
name: Snake Case Check
container: ghcr.io/khronosgroup/vulkan-samples
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- run: python3 /usr/local/bin/snake_case.py $TARGET_BRANCH > snake-report.txt
- run: if [ $(grep -c '@@' snake-report.txt) -gt 0 ]; then cat snake-report.txt; exit 1; fi
clang_format:
name: Clang Format Check
container: ghcr.io/khronosgroup/vulkan-samples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git config clangFormat.binary "clang-format-10"
- run: git fetch origin $TARGET_BRANCH:$TARGET_BRANCH
- run: python3 /usr/local/bin/clang_format.py -v --diff $TARGET_BRANCH > clang-format-report.txt
- run: if [ $(grep -c 'clang-format did not modify any files' clang-format-report.txt) -eq 0 ] && [ $(grep -c 'no modified files to format' clang-format-report.txt) -eq 0 ]; then cat clang-format-report.txt; exit 1; fi
clang_tidy:
name: Clang Tidy Check
container: ghcr.io/khronosgroup/vulkan-samples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -H. -Bbuild/clang
- run: python3 /usr/local/bin/run-clang-tidy.py -j $(($(nproc)/2+1)) -p build/clang -clang-tidy-binary=clang-tidy-10 -header-filter=framework,samples,vulkan_samples -checks=-*,google-*,-google-runtime-references -quiet framework/* samples/* vulkan_samples/* tests/*