gitlab-ci: fix ldd check for Vulkan drivers
[mesa.git] / .gitlab-ci.yml
1 variables:
2 UPSTREAM_REPO: mesa/mesa
3
4 include:
5 - project: 'wayland/ci-templates'
6 # Must be the same as in .gitlab-ci/lava-gitlab-ci.yml
7 ref: f69acac60d5dde0410124fd5674764600821b7a6
8 file: '/templates/debian.yml'
9
10 include:
11 - local: '.gitlab-ci/lava-gitlab-ci.yml'
12
13 stages:
14 - container
15 - build
16 - test
17
18
19 # When to automatically run the CI
20 .ci-run-policy:
21 only:
22 refs:
23 - branches@mesa/mesa
24 - merge_requests
25 - /^ci([-/].*)?$/
26 changes:
27 - VERSION
28 - bin/**/*
29 # GitLab CI
30 - .gitlab-ci.yml
31 - .gitlab-ci/**/*
32 # Meson
33 - meson*
34 - build-support/**/*
35 - subprojects/**/*
36 # SCons
37 - SConstruct
38 - scons/**/*
39 - common.py
40 # Source code
41 - include/**/*
42 - src/**/*
43 retry:
44 max: 2
45 when:
46 - runner_system_failure
47 # Cancel CI run if a newer commit is pushed to the same branch
48 interruptible: true
49
50 .ci-deqp-artifacts:
51 artifacts:
52 when: always
53 untracked: false
54 paths:
55 # Watch out! Artifacts are relative to the build dir.
56 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
57 - artifacts
58
59 # Build the "normal" (non-LAVA) CI docker images.
60 #
61 # DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
62 # image doesn't exist yet, the container stage job generates it.
63 #
64 # In order to generate a new image, one should generally change the tag.
65 # While removing the image from the registry would also work, that's not
66 # recommended except for ephemeral images during development: Replacing
67 # an image after a significant amount of time might pull in newer
68 # versions of gcc/clang or other packages, which might break the build
69 # with older commits using the same tag.
70 #
71 # After merging a change resulting in generating a new image to the
72 # main repository, it's recommended to remove the image from the source
73 # repository's container registry, so that the image from the main
74 # repository's registry will be used there as well.
75
76 .container:
77 stage: container
78 extends:
79 - .ci-run-policy
80 variables:
81 DEBIAN_VERSION: buster-slim
82 REPO_SUFFIX: $CI_JOB_NAME
83 DEBIAN_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
84 # no need to pull the whole repo to build the container image
85 GIT_STRATEGY: none
86
87 # Debian 10 based x86 build image
88 x86_build:
89 extends:
90 - .debian@container-ifnot-exists
91 - .container
92 variables:
93 DEBIAN_TAG: &x86_build "2019-11-13"
94
95 .use-x86_build:
96 variables:
97 TAG: *x86_build
98 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
99 needs:
100 - x86_build
101
102 # Debian 10 based x86 test image
103 x86_test:
104 extends: x86_build
105 variables:
106 DEBIAN_TAG: &x86_test "2019-11-20-2"
107
108 # Debian 9 based x86 build image (old LLVM)
109 x86_build_old:
110 extends: x86_build
111 variables:
112 DEBIAN_TAG: &x86_build_old "2019-09-18"
113 DEBIAN_VERSION: stretch-slim
114
115 .use-x86_build_old:
116 variables:
117 TAG: *x86_build_old
118 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
119 needs:
120 - x86_build_old
121
122 # Debian 10 based ARM build image
123 arm_build:
124 extends:
125 - .debian@container-ifnot-exists@arm64v8
126 - .container
127 variables:
128 DEBIAN_TAG: &arm_build "2019-11-13"
129
130 .use-arm_build:
131 variables:
132 TAG: *arm_build
133 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
134 needs:
135 - arm_build
136
137 # Debian 10 based ARM test image
138 arm_test:
139 extends: arm_build
140 variables:
141 DEBIAN_TAG: &arm_test "2019-11-12"
142
143 .use-arm_test:
144 variables:
145 TAG: *arm_test
146 image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
147 needs:
148 - meson-arm64
149 - arm_test
150
151
152 # BUILD
153
154 # Shared between windows and Linux
155 .build-common:
156 extends: .ci-run-policy
157 stage: build
158 artifacts:
159 when: always
160 paths:
161 - _build/meson-logs/*.txt
162 # scons:
163 - build/*/config.log
164 - shader-db
165
166 # Just Linux
167 .build-linux:
168 extends: .build-common
169 cache:
170 key: ${CI_JOB_NAME}
171 paths:
172 - ccache
173 variables:
174 CCACHE_COMPILERCHECK: "content"
175 # Use ccache transparently, and print stats before/after
176 before_script:
177 - export PATH="/usr/lib/ccache:$PATH"
178 - export CCACHE_BASEDIR="$PWD"
179 - export CCACHE_DIR="$PWD/ccache"
180 - ccache --max-size=1500M
181 - ccache --zero-stats || true
182 - ccache --show-stats || true
183 after_script:
184 - export CCACHE_DIR="$PWD/ccache"
185 - ccache --show-stats
186
187 .build-windows:
188 extends: .build-common
189 tags:
190 - mesa-windows
191 cache:
192 key: ${CI_JOB_NAME}
193 paths:
194 - subprojects/packagecache
195
196 .meson-build:
197 extends:
198 - .build-linux
199 - .use-x86_build
200 script:
201 - .gitlab-ci/meson-build.sh
202
203 .scons-build:
204 extends:
205 - .build-linux
206 - .use-x86_build
207 variables:
208 SCONSFLAGS: "-j4"
209 script:
210 - .gitlab-ci/scons-build.sh
211
212 meson-main:
213 extends:
214 - .meson-build
215 - .ci-deqp-artifacts
216 variables:
217 UNWIND: "true"
218 DRI_LOADERS: >
219 -D glx=dri
220 -D gbm=true
221 -D egl=true
222 -D platforms=x11,wayland,drm,surfaceless
223 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
224 GALLIUM_ST: >
225 -D dri3=true
226 -D gallium-extra-hud=true
227 -D gallium-vdpau=true
228 -D gallium-xvmc=true
229 -D gallium-omx=bellagio
230 -D gallium-va=true
231 -D gallium-xa=true
232 -D gallium-nine=true
233 -D gallium-opencl=disabled
234 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
235 LLVM_VERSION: "7"
236 EXTRA_OPTION: >
237 -D osmesa=gallium
238 -D tools=all
239 BUILDTYPE: "debugoptimized"
240 script:
241 - .gitlab-ci/meson-build.sh
242 - .gitlab-ci/run-shader-db.sh
243 - .gitlab-ci/prepare-artifacts.sh
244
245 .meson-cross:
246 extends:
247 - .meson-build
248 variables:
249 UNWIND: "false"
250 DRI_LOADERS: >
251 -D glx=disabled
252 -D gbm=false
253 -D egl=true
254 -D platforms=surfaceless
255 -D osmesa=none
256 GALLIUM_ST: >
257 -D dri3=false
258 -D gallium-vdpau=false
259 -D gallium-xvmc=false
260 -D gallium-omx=disabled
261 -D gallium-va=false
262 -D gallium-xa=false
263 -D gallium-nine=false
264
265 .meson-arm:
266 extends:
267 - .meson-cross
268 - .use-arm_build
269 variables:
270 VULKAN_DRIVERS: freedreno
271 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
272 EXTRA_OPTION: >
273 -D I-love-half-baked-turnips=true
274 tags:
275 - aarch64
276
277 meson-armhf:
278 extends: .meson-arm
279 variables:
280 CROSS: armhf
281 LLVM_VERSION: "7"
282
283 meson-arm64:
284 extends:
285 - .meson-arm
286 - .ci-deqp-artifacts
287 variables:
288 BUILDTYPE: "debugoptimized"
289 VULKAN_DRIVERS: "freedreno,amd"
290 script:
291 - .gitlab-ci/meson-build.sh
292 - .gitlab-ci/prepare-artifacts.sh
293
294 # NOTE: Building SWR is 2x (yes two) times slower than all the other
295 # gallium drivers combined.
296 # Start this early so that it doesn't limit the total run time.
297 #
298 # We also stick the glvnd build here, since we want non-glvnd in
299 # meson-main for actual driver CI.
300 meson-swr-glvnd:
301 extends: .meson-build
302 variables:
303 UNWIND: "true"
304 DRI_LOADERS: >
305 -D glvnd=true
306 -D egl=true
307 GALLIUM_ST: >
308 -D dri3=true
309 -D gallium-vdpau=false
310 -D gallium-xvmc=false
311 -D gallium-omx=disabled
312 -D gallium-va=false
313 -D gallium-xa=false
314 -D gallium-nine=false
315 -D gallium-opencl=disabled
316 GALLIUM_DRIVERS: "swr,iris"
317 LLVM_VERSION: "6.0"
318
319 meson-clang:
320 extends: .meson-build
321 variables:
322 UNWIND: "true"
323 DRI_DRIVERS: "auto"
324 GALLIUM_DRIVERS: "auto"
325 VULKAN_DRIVERS: intel,amd,freedreno
326 CC: "ccache clang-8"
327 CXX: "ccache clang++-8"
328
329 .meson-windows:
330 extends:
331 - .build-windows
332 before_script:
333 - $ENV:ARCH = "x86"
334 - $ENV:VERSION = "2019\Community"
335 script:
336 - cmd /C .gitlab-ci\meson-build.bat
337
338 scons-swr:
339 extends: .scons-build
340 variables:
341 SCONS_TARGET: "swr=1"
342 SCONS_CHECK_COMMAND: "true"
343 LLVM_VERSION: "6.0"
344
345 scons-win64:
346 extends: .scons-build
347 variables:
348 SCONS_TARGET: platform=windows machine=x86_64
349 SCONS_CHECK_COMMAND: "true"
350
351 meson-clover:
352 extends: .meson-build
353 variables:
354 UNWIND: "true"
355 DRI_LOADERS: >
356 -D glx=disabled
357 -D egl=false
358 -D gbm=false
359 GALLIUM_ST: >
360 -D dri3=false
361 -D gallium-vdpau=false
362 -D gallium-xvmc=false
363 -D gallium-omx=disabled
364 -D gallium-va=false
365 -D gallium-xa=false
366 -D gallium-nine=false
367 -D gallium-opencl=icd
368 script:
369 - export GALLIUM_DRIVERS="r600,radeonsi"
370 - .gitlab-ci/meson-build.sh
371 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
372 - export GALLIUM_DRIVERS="i915,r600"
373 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
374 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
375
376 meson-clover-old-llvm:
377 extends:
378 - meson-clover
379 - .use-x86_build_old
380 variables:
381 UNWIND: "false"
382 DRI_LOADERS: >
383 -D glx=disabled
384 -D egl=false
385 -D gbm=false
386 -D platforms=drm,surfaceless
387 GALLIUM_DRIVERS: "i915,r600"
388 script:
389 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
390 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
391 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
392
393 meson-vulkan:
394 extends: .meson-build
395 variables:
396 UNWIND: "false"
397 DRI_LOADERS: >
398 -D glx=disabled
399 -D gbm=false
400 -D egl=false
401 -D platforms=x11,wayland,drm
402 -D osmesa=none
403 GALLIUM_ST: >
404 -D dri3=true
405 -D gallium-vdpau=false
406 -D gallium-xvmc=false
407 -D gallium-omx=disabled
408 -D gallium-va=false
409 -D gallium-xa=false
410 -D gallium-nine=false
411 -D gallium-opencl=disabled
412 -D b_sanitize=undefined
413 -D c_args=-fno-sanitize-recover=all
414 -D cpp_args=-fno-sanitize-recover=all
415 UBSAN_OPTIONS: "print_stacktrace=1"
416 VULKAN_DRIVERS: intel,amd,freedreno
417 LLVM_VERSION: "8"
418 EXTRA_OPTION: >
419 -D vulkan-overlay-layer=true
420
421 # While the main point of this build is testing the i386 cross build,
422 # we also use this one to test some other options that are exclusive
423 # with meson-main's choices (classic swrast and osmesa)
424 meson-i386:
425 extends: .meson-cross
426 variables:
427 CROSS: i386
428 VULKAN_DRIVERS: intel
429 DRI_DRIVERS: "swrast"
430 GALLIUM_DRIVERS: "iris"
431 EXTRA_OPTION: >
432 -D vulkan-overlay-layer=true
433 -D llvm=false
434 -D osmesa=classic
435
436 meson-mingw32-x86_64:
437 extends: .meson-build
438 variables:
439 UNWIND: "false"
440 DRI_DRIVERS: ""
441 GALLIUM_DRIVERS: "swrast"
442 EXTRA_OPTION: >
443 -Dllvm=false
444 -Dosmesa=gallium
445 --cross-file=.gitlab-ci/x86_64-w64-mingw32
446
447 scons:
448 extends: .scons-build
449 variables:
450 SCONS_TARGET: "llvm=1"
451 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
452 script:
453 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
454 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
455 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
456 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
457
458 scons-old-llvm:
459 extends:
460 - scons
461 - .use-x86_build_old
462 script:
463 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
464 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
465 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
466
467 .test:
468 extends:
469 - .ci-run-policy
470 stage: test
471 variables:
472 GIT_STRATEGY: none # testing doesn't build anything from source
473 TAG: *x86_test
474 image: "$CI_REGISTRY_IMAGE/debian/x86_test:$TAG"
475 before_script:
476 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
477 - rm -rf install
478 - tar -xf artifacts/install.tar
479 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
480 artifacts:
481 when: on_failure
482 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
483 paths:
484 - results/
485 dependencies:
486 - meson-main
487 needs:
488 - meson-main
489 - x86_test
490
491 .piglit-test:
492 extends: .test
493 artifacts:
494 reports:
495 junit: results/results.xml
496 variables:
497 LIBGL_ALWAYS_SOFTWARE: 1
498 PIGLIT_NO_WINDOW: 1
499 script:
500 - artifacts/piglit/run.sh
501
502 piglit-quick_gl:
503 extends: .piglit-test
504 variables:
505 LP_NUM_THREADS: 0
506 PIGLIT_OPTIONS: >
507 -x arb_gpu_shader5
508 -x glx-multithread-clearbuffer
509 -x glx-multithread-shader-compile
510 -x max-texture-size
511 -x maxsize
512 PIGLIT_PROFILES: quick_gl
513
514 piglit-glslparser+quick_shader:
515 extends: .piglit-test
516 variables:
517 LP_NUM_THREADS: 1
518 PIGLIT_OPTIONS: >
519 -x spec@arb_arrays_of_arrays@execution@ubo
520 -x spec@arb_gpu_shader_int64@execution$$
521 -x spec@arb_separate_shader_objects@execution
522 -x spec@arb_separate_shader_objects@linker
523 -x spec@arb_shader_storage_buffer_object@execution
524 -x spec@glsl-1.50@execution@built-in-functions
525 PIGLIT_PROFILES: "glslparser quick_shader"
526 PIGLIT_RESULTS: "glslparser+quick_shader"
527
528 .deqp-test:
529 extends: .test
530 variables:
531 DEQP_SKIPS: deqp-default-skips.txt
532 script:
533 - ./artifacts/deqp-runner.sh
534
535 test-llvmpipe-gles2:
536 variables:
537 DEQP_VER: gles2
538 DEQP_PARALLEL: 4
539 # Don't use threads inside llvmpipe, we've already got all 4 cores
540 # busy with DEQP_PARALLEL.
541 LP_NUM_THREADS: 0
542 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
543 LIBGL_ALWAYS_SOFTWARE: "true"
544 extends: .deqp-test
545
546 test-softpipe-gles2:
547 extends: test-llvmpipe-gles2
548 variables:
549 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
550 DEQP_SKIPS: deqp-softpipe-skips.txt
551 GALLIUM_DRIVER: "softpipe"
552
553 test-softpipe-gles3:
554 parallel: 2
555 variables:
556 DEQP_VER: gles3
557 extends: test-softpipe-gles2
558
559 test-softpipe-gles31:
560 parallel: 4
561 variables:
562 DEQP_VER: gles31
563 extends: test-softpipe-gles2
564
565 arm64_a630_gles2:
566 extends:
567 - .deqp-test
568 - .use-arm_test
569 variables:
570 DEQP_VER: gles2
571 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
572 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
573 NIR_VALIDATE: 0
574 tags:
575 - mesa-cheza
576 dependencies:
577 - meson-arm64
578
579 arm64_a630_gles31:
580 extends: arm64_a630_gles2
581 parallel: 4
582 variables:
583 DEQP_VER: gles31
584
585 arm64_a630_gles3:
586 parallel: 6
587 extends: arm64_a630_gles2
588 variables:
589 DEQP_VER: gles3
590
591 arm64_a306_gles2:
592 parallel: 4
593 extends: arm64_a630_gles2
594 variables:
595 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
596 DEQP_SKIPS: deqp-default-skips.txt
597 tags:
598 - db410c