vulkan: add vk_x11_strict_image_count option
[mesa.git] / .gitlab-ci.yml
1 # This is the tag of the docker image used for the build jobs. If the
2 # image doesn't exist yet, the containers stage generates it.
3 #
4 # In order to generate a new image, one should generally change the tag.
5 # While removing the image from the registry would also work, that's not
6 # recommended except for ephemeral images during development: Replacing
7 # an image after a significant amount of time might pull in newer
8 # versions of gcc/clang or other packages, which might break the build
9 # with older commits using the same tag.
10 #
11 # After merging a change resulting in generating a new image to the
12 # main repository, it's recommended to remove the image from the source
13 # repository's container registry, so that the image from the main
14 # repository's registry will be used there as well.
15 variables:
16 UPSTREAM_REPO: mesa/mesa
17 DEBIAN_TAG: "2019-09-11"
18 DEBIAN_ARM64_TAG: "arm64v8-2019-08-09"
19 DEBIAN_VERSION: stretch-slim
20 DEBIAN_ARM64_VERSION: buster-slim
21 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
22 DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_ARM64_VERSION:$DEBIAN_ARM64_TAG"
23
24 include:
25 - project: 'wayland/ci-templates'
26 ref: 1f7f57c6
27 file: '/templates/debian.yml'
28
29 stages:
30 - containers
31 - build
32 - test
33
34
35 # When to automatically run the CI
36 .ci-run-policy: &ci-run-policy
37 only:
38 - branches@mesa/mesa
39 - merge_requests
40 - /^ci([-/].*)?$/
41 retry:
42 max: 2
43 when:
44 - runner_system_failure
45
46 .ci-deqp-artifacts: &ci-deqp-artifacts
47 artifacts:
48 when: always
49 untracked: false
50 paths:
51 # Watch out! Artifacts are relative to the build dir.
52 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
53 - artifacts
54
55 # Builds the normal CI native and cross-build docker image.
56 debian:
57 extends: .debian@container-ifnot-exists
58 stage: containers
59 <<: *ci-run-policy
60 variables:
61 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
62 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
63
64 # Builds a Docker image with the native environment and VK-GL-CTS for testing.
65 test-container:arm64:
66 extends: .debian@container-ifnot-exists@arm64v8
67 <<: *ci-run-policy
68 stage: containers
69 variables:
70 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
71 DEBIAN_VERSION: "$DEBIAN_ARM64_VERSION"
72 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
73 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
74
75 # BUILD
76
77 .build:
78 <<: *ci-run-policy
79 image: $DEBIAN_IMAGE
80 stage: build
81 cache:
82 paths:
83 - ccache
84 artifacts:
85 when: always
86 paths:
87 - _build/meson-logs/*.txt
88 # scons:
89 - build/*/config.log
90 - shader-db
91 variables:
92 CCACHE_COMPILERCHECK: "content"
93 # Use ccache transparently, and print stats before/after
94 before_script:
95 - export PATH="/usr/lib/ccache:$PATH"
96 - export CCACHE_BASEDIR="$PWD"
97 - export CCACHE_DIR="$PWD/ccache"
98 - ccache --zero-stats || true
99 - ccache --show-stats || true
100 after_script:
101 # In case the install dir is being saved as artifacts, tar it up
102 # so that symlinks and hardlinks aren't each packed separately in
103 # the zip file.
104 - if [ -d install ]; then
105 tar -cf artifacts/install.tar install;
106 fi
107 - export CCACHE_DIR="$PWD/ccache"
108 - ccache --show-stats
109
110 .meson-build:
111 extends: .build
112 script:
113 - .gitlab-ci/meson-build.sh
114
115 .scons-build:
116 extends: .build
117 variables:
118 SCONSFLAGS: "-j4"
119 script:
120 - if test -n "$LLVM_VERSION"; then
121 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
122 fi
123 - scons $SCONS_TARGET
124 - eval $SCONS_CHECK_COMMAND
125
126 meson-main:
127 extends: .meson-build
128 variables:
129 UNWIND: "true"
130 DRI_LOADERS: >
131 -D glx=dri
132 -D gbm=true
133 -D egl=true
134 -D platforms=x11,wayland,drm,surfaceless
135 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
136 GALLIUM_ST: >
137 -D dri3=true
138 -D gallium-extra-hud=true
139 -D gallium-vdpau=true
140 -D gallium-xvmc=true
141 -D gallium-omx=bellagio
142 -D gallium-va=true
143 -D gallium-xa=true
144 -D gallium-nine=true
145 -D gallium-opencl=disabled
146 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
147 LLVM_VERSION: "7"
148 EXTRA_OPTION: >
149 -D osmesa=gallium
150 -D tools=all
151 MESON_SHADERDB: "true"
152 BUILDTYPE: "debugoptimized"
153 <<: *ci-deqp-artifacts
154
155 # NOTE: Building SWR is 2x (yes two) times slower than all the other
156 # gallium drivers combined.
157 # Start this early so that it doesn't limit the total run time.
158 #
159 # We also stick the glvnd build here, since we want non-glvnd in
160 # meson-main for actual driver CI.
161 meson-swr-glvnd:
162 extends: .meson-build
163 variables:
164 UNWIND: "true"
165 DRI_LOADERS: >
166 -D glvnd=true
167 -D egl=true
168 GALLIUM_ST: >
169 -D dri3=true
170 -D gallium-vdpau=false
171 -D gallium-xvmc=false
172 -D gallium-omx=disabled
173 -D gallium-va=false
174 -D gallium-xa=false
175 -D gallium-nine=false
176 -D gallium-opencl=disabled
177 GALLIUM_DRIVERS: "swr,iris"
178 LLVM_VERSION: "6.0"
179
180 meson-clang:
181 extends: .meson-build
182 variables:
183 UNWIND: "true"
184 DRI_DRIVERS: "auto"
185 GALLIUM_DRIVERS: "auto"
186 VULKAN_DRIVERS: intel,amd,freedreno
187 CC: "ccache clang-8"
188 CXX: "ccache clang++-8"
189 before_script:
190 - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache"
191 - ccache --zero-stats --show-stats || true
192 # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so
193 - apt-get remove -y libgcc-8-dev
194
195 scons-swr:
196 extends: .scons-build
197 variables:
198 SCONS_TARGET: "swr=1"
199 SCONS_CHECK_COMMAND: "true"
200 LLVM_VERSION: "6.0"
201
202 scons-win64:
203 extends: .scons-build
204 variables:
205 SCONS_TARGET: platform=windows machine=x86_64
206 SCONS_CHECK_COMMAND: "true"
207
208 meson-clover:
209 extends: .meson-build
210 variables:
211 UNWIND: "true"
212 DRI_LOADERS: >
213 -D glx=disabled
214 -D egl=false
215 -D gbm=false
216 GALLIUM_ST: >
217 -D dri3=false
218 -D gallium-vdpau=false
219 -D gallium-xvmc=false
220 -D gallium-omx=disabled
221 -D gallium-va=false
222 -D gallium-xa=false
223 -D gallium-nine=false
224 -D gallium-opencl=icd
225 script:
226 - export GALLIUM_DRIVERS="r600,radeonsi"
227 - .gitlab-ci/meson-build.sh
228 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
229 - export GALLIUM_DRIVERS="i915,r600"
230 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
231 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
232 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
233 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
234 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
235
236 meson-vulkan:
237 extends: .meson-build
238 variables:
239 UNWIND: "false"
240 DRI_LOADERS: >
241 -D glx=disabled
242 -D gbm=false
243 -D egl=false
244 -D platforms=x11,wayland,drm
245 -D osmesa=none
246 GALLIUM_ST: >
247 -D dri3=true
248 -D gallium-vdpau=false
249 -D gallium-xvmc=false
250 -D gallium-omx=disabled
251 -D gallium-va=false
252 -D gallium-xa=false
253 -D gallium-nine=false
254 -D gallium-opencl=disabled
255 VULKAN_DRIVERS: intel,amd,freedreno
256 LLVM_VERSION: "8"
257 EXTRA_OPTION: >
258 -D vulkan-overlay-layer=true
259
260 .meson-cross:
261 extends: .meson-build
262 variables:
263 UNWIND: "false"
264 DRI_LOADERS: >
265 -D glx=disabled
266 -D gbm=false
267 -D egl=true
268 -D platforms=surfaceless
269 -D osmesa=none
270 GALLIUM_ST: >
271 -D dri3=false
272 -D gallium-vdpau=false
273 -D gallium-xvmc=false
274 -D gallium-omx=disabled
275 -D gallium-va=false
276 -D gallium-xa=false
277 -D gallium-nine=false
278 -D llvm=false
279 <<: *ci-deqp-artifacts
280 script:
281 - .gitlab-ci/meson-build.sh
282
283 meson-armhf:
284 extends: .meson-cross
285 variables:
286 CROSS: armhf
287 VULKAN_DRIVERS: freedreno
288 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
289 # Disable the tests since we're cross compiling.
290 EXTRA_OPTION: >
291 -D build-tests=false
292 -D I-love-half-baked-turnips=true
293 -D vulkan-overlay-layer=true
294
295 meson-arm64:
296 extends: .meson-cross
297 variables:
298 CROSS: arm64
299 VULKAN_DRIVERS: freedreno
300 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
301 # Disable the tests since we're cross compiling.
302 EXTRA_OPTION: >
303 -D build-tests=false
304 -D I-love-half-baked-turnips=true
305 -D vulkan-overlay-layer=true
306 BUILDTYPE: "debugoptimized"
307
308 # While the main point of this build is testing the i386 cross build,
309 # we also use this one to test some other options that are exclusive
310 # with meson-main's choices (classic swrast and osmesa)
311 meson-i386:
312 extends: .meson-cross
313 variables:
314 CROSS: i386
315 VULKAN_DRIVERS: intel
316 DRI_DRIVERS: "swrast"
317 GALLIUM_DRIVERS: "iris"
318 # Disable i386 tests, because u_format_tests gets precision
319 # failures in dxtn unpacking
320 EXTRA_OPTION: >
321 -D build-tests=false
322 -D vulkan-overlay-layer=true
323 -D llvm=false
324 -D osmesa=classic
325
326 scons-nollvm:
327 extends: .scons-build
328 variables:
329 SCONS_TARGET: "llvm=0"
330 SCONS_CHECK_COMMAND: "scons llvm=0 check"
331
332 scons-llvm:
333 extends: .scons-build
334 variables:
335 SCONS_TARGET: "llvm=1"
336 SCONS_CHECK_COMMAND: "scons llvm=1 check"
337 LLVM_VERSION: "3.9"
338
339 .deqp-test:
340 <<: *ci-run-policy
341 stage: test
342 image: $DEBIAN_IMAGE
343 variables:
344 GIT_STRATEGY: none # testing doesn't build anything from source
345 DEQP_SKIPS: deqp-default-skips.txt
346 script:
347 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
348 - rm -rf install
349 - tar -xf artifacts/install.tar
350 - ./artifacts/deqp-runner.sh
351 artifacts:
352 when: on_failure
353 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
354 paths:
355 - results/
356
357 test-llvmpipe-gles2:
358 parallel: 4
359 variables:
360 DEQP_VER: gles2
361 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
362 LIBGL_ALWAYS_SOFTWARE: "true"
363 DEQP_RENDERER_MATCH: "llvmpipe"
364 extends: .deqp-test
365 dependencies:
366 - meson-main
367 needs: [meson-main]
368
369 test-softpipe-gles2:
370 parallel: 4
371 variables:
372 DEQP_VER: gles2
373 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
374 LIBGL_ALWAYS_SOFTWARE: "true"
375 DEQP_RENDERER_MATCH: "softpipe"
376 GALLIUM_DRIVER: "softpipe"
377 extends: .deqp-test
378 dependencies:
379 - meson-main
380 needs: [meson-main]
381
382 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
383 # 25 minutes. Until we can get its runtime down, just do a partial
384 # (every 10 tests) run.
385 test-softpipe-gles3-limited:
386 variables:
387 DEQP_VER: gles3
388 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
389 LIBGL_ALWAYS_SOFTWARE: "true"
390 DEQP_RENDERER_MATCH: "softpipe"
391 GALLIUM_DRIVER: "softpipe"
392 CI_NODE_INDEX: 1
393 CI_NODE_TOTAL: 10
394 extends: .deqp-test
395 dependencies:
396 - meson-main
397 needs: [meson-main]
398
399 arm64_a306_gles2:
400 extends: .deqp-test
401 parallel: 4
402 image: $DEBIAN_ARM64_IMAGE
403 variables:
404 DEQP_VER: gles2
405 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
406 NIR_VALIDATE: 0
407 DEQP_RENDERER_MATCH: "FD307"
408 tags:
409 - db410c
410 dependencies:
411 - meson-arm64
412
413 .cheza-test:
414 image: $DEBIAN_ARM64_IMAGE
415 extends: .deqp-test
416 variables:
417 DEQP_RENDERER_MATCH: "FD630"
418 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
419 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
420 NIR_VALIDATE: 0
421 tags:
422 - mesa-cheza
423 dependencies:
424 - meson-arm64
425 needs: [ meson-arm64 ]
426
427 arm64_a630_gles2:
428 extends: .cheza-test
429 variables:
430 DEQP_VER: gles2
431
432 arm64_a630_gles3:
433 parallel: 6
434 extends: .cheza-test
435 variables:
436 DEQP_VER: gles3
437
438 arm64_a630_gles31:
439 parallel: 4
440 extends: .cheza-test
441 variables:
442 DEQP_VER: gles31