forked from KhronosGroup/Vulkan-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
169 lines (156 loc) · 4.23 KB
/
.gitlab-ci.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
stages:
- Check
- Build
- Test
- Package
Doxygen:
stage: Check
image: khronosgroup/vulkan-samples
tags:
- linux
- docker
script:
- mkdir -p doxygen
- doxygen docs/doxygen/doxyfile
- if [ $(stat -c%s doxygen/warnings.txt) -gt 0 ]; then cat doxygen/warnings.txt; exit 1; fi
CopyrightHeaders:
stage: Check
image: khronosgroup/vulkan-samples
tags:
- linux
- docker
script:
- python3 /usr/local/bin/check_copyright_headers.py $TARGET_BRANCH
SnakeCase:
stage: Check
image: khronosgroup/vulkan-samples
tags:
- linux
- docker
script:
- python3 /usr/local/bin/snake_case.py $TARGET_BRANCH > snake-report.txt
- if [ $(grep -c '@@' snake-report.txt) -gt 0 ]; then cat snake-report.txt; exit 1; fi
allow_failure: true
ClangFormat:
stage: Check
image: khronosgroup/vulkan-samples
tags:
- linux
- docker
script:
- python3 /usr/local/bin/clang_format.py -v --diff $TARGET_BRANCH > clang-format-report.txt
- 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
ClangTidy:
stage: Check
image: khronosgroup/vulkan-samples
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- linux
- docker
script:
- cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -H. -Bbuild/clang
- 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/*
Linux:
stage: Build
image: khronosgroup/vulkan-samples
variables:
GIT_SUBMODULE_STRATEGY: recursive
artifacts:
paths:
- build/linux
expire_in: 2h
tags:
- linux
- docker
script:
- cmake -G "Unix Makefiles" -H. -Bbuild/linux -DCMAKE_BUILD_TYPE=Release -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON
- cmake --build build/linux --target vulkan_samples --config Release -- -j$(($(nproc)/2+1))
Windows:
stage: Build
variables:
GIT_SUBMODULE_STRATEGY: recursive
artifacts:
paths:
- build/windows
expire_in: 2h
tags:
- gpu
- windows
script:
- cmake -G"Visual Studio 15 2017 Win64" -H. -Bbuild/windows -DVKB_BUILD_TESTS:BOOL=ON -DVKB_BUILD_SAMPLES:BOOL=ON
- cmake --build build/windows --target vulkan_samples --config Release
Android:
stage: Build
image: khronosgroup/vulkan-samples
variables:
GIT_SUBMODULE_STRATEGY: recursive
artifacts:
paths:
- build/android
expire_in: 2h
tags:
- linux
- docker
script:
- cmake -G "Unix Makefiles" -H. -Bbuild/android -DCMAKE_TOOLCHAIN_FILE=bldsys/toolchain/android_gradle.cmake -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON
- cmake --build build/android --config Release --target vulkan_samples_package -- -j$(($(nproc)/2+1))
GenerateSample:
stage: Test
image: khronosgroup/vulkan-samples
variables:
GIT_SUBMODULE_STRATEGY: recursive
dependencies:
- Linux
tags:
- linux
- docker
script:
- cd tests/generate_sample
- python3 generate_sample_test.py
SystemTest:
stage: Test
variables:
GIT_SUBMODULE_STRATEGY: recursive
artifacts:
paths:
- tests/system_test/artifacts
expire_in: 1d
when: on_failure
dependencies:
- Windows
tags:
- gpu
- windows
script:
- cd tests/system_test
- python system_test.py -Bbuild/windows -CRelease -D -P
LinuxExternalProject:
stage: Package
image: khronosgroup/vulkan-samples
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- linux
- docker
script:
- cmake -Htests/external_project -Bbuild -DVKB_BUILD_SAMPLES=OFF
WindowsExternalProject:
stage: Package
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- gpu
- windows
script:
- cmake -Htests/external_project -Bbuild -DVKB_BUILD_SAMPLES=OFF
AndroidExternalProject:
stage: Package
image: khronosgroup/vulkan-samples
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags:
- linux
- docker
script:
- cmake -DCMAKE_TOOLCHAIN_FILE=../../bldsys/toolchain/android_gradle.cmake -Htests/external_project -Bbuild -DVKB_BUILD_SAMPLES=OFF