gitlab-ci: build Fossilize in the test image for VK
[mesa.git] / .gitlab-ci.yml
1 variables:
2 UPSTREAM_REPO: mesa/mesa
3
4 include:
5 - project: 'wayland/ci-templates'
6 ref: b7030c2cd0d6ccc5f6d4f8299bafa4daa9240d71
7 file: '/templates/debian.yml'
8 - local: '.gitlab-ci/lava-gitlab-ci.yml'
9
10 stages:
11 - container
12 - meson-x86_64
13 - scons
14 - meson-misc
15 - llvmpipe
16 - softpipe
17 - freedreno
18 - panfrost
19 - misc-tests
20 - success
21
22
23 # When to automatically run the CI
24 .ci-run-policy:
25 rules:
26 # Run pipeline by default for merge requests changing files affecting it
27 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
28 changes: &paths
29 - VERSION
30 - bin/**/*
31 # GitLab CI
32 - .gitlab-ci.yml
33 - .gitlab-ci/**/*
34 # Meson
35 - meson*
36 - build-support/**/*
37 - subprojects/**/*
38 # SCons
39 - SConstruct
40 - scons/**/*
41 - common.py
42 # Source code
43 - include/**/*
44 - src/**/*
45 when: on_success
46 # Run pipeline by default in the main project if files affecting it were
47 # changed
48 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
49 changes:
50 *paths
51 when: on_success
52 # Allow triggering jobs manually on branches of forked projects
53 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
54 when: manual
55 # Otherwise, most jobs won't run
56 - when: never
57 retry:
58 max: 2
59 when:
60 - runner_system_failure
61 # Cancel CI run if a newer commit is pushed to the same branch
62 interruptible: true
63
64 success:
65 stage: success
66 image: debian:stable-slim
67 only:
68 - merge_requests
69 except:
70 changes:
71 *paths
72 variables:
73 GIT_STRATEGY: none
74 script:
75 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
76
77
78 .ci-deqp-artifacts:
79 artifacts:
80 when: always
81 untracked: false
82 paths:
83 # Watch out! Artifacts are relative to the build dir.
84 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
85 - artifacts
86
87 # Build the CI docker images.
88 #
89 # DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
90 # image doesn't exist yet, the container stage job generates it.
91 #
92 # In order to generate a new image, one should generally change the tag.
93 # While removing the image from the registry would also work, that's not
94 # recommended except for ephemeral images during development: Replacing
95 # an image after a significant amount of time might pull in newer
96 # versions of gcc/clang or other packages, which might break the build
97 # with older commits using the same tag.
98 #
99 # After merging a change resulting in generating a new image to the
100 # main repository, it's recommended to remove the image from the source
101 # repository's container registry, so that the image from the main
102 # repository's registry will be used there as well.
103
104 .container:
105 stage: container
106 extends:
107 - .ci-run-policy
108 variables:
109 DEBIAN_VERSION: buster-slim
110 REPO_SUFFIX: $CI_JOB_NAME
111 DEBIAN_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
112 # no need to pull the whole repo to build the container image
113 GIT_STRATEGY: none
114
115 # Debian 10 based x86 build image
116 x86_build:
117 extends:
118 - .debian@container-ifnot-exists
119 - .container
120 variables:
121 DEBIAN_TAG: &x86_build "2020-02-15"
122
123 .use-x86_build:
124 variables:
125 TAG: *x86_build
126 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
127 needs:
128 - x86_build
129
130 # Debian 10 based x86 test image for GL
131 x86_test-gl:
132 extends: x86_build
133 variables:
134 DEBIAN_TAG: &x86_test-gl "2020-02-14"
135
136 # Debian 10 based x86 test image for VK
137 x86_test-vk:
138 extends: x86_build
139 variables:
140 DEBIAN_TAG: &x86_test-vk "2020-03-05"
141 # Can only be triggered manually on personal branches because RADV is the only
142 # driver that does Vulkan testing at the moment.
143 rules:
144 # Never build the test image for VK by default in the main project.
145 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
146 when: never
147 # Never build the test image for VK by default for merge requests.
148 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
149 when: never
150 # Otherwise, allow building it manually for personal branches.
151 - when: manual
152
153
154 # Debian 9 based x86 build image (old LLVM)
155 x86_build_old:
156 extends: x86_build
157 variables:
158 DEBIAN_TAG: &x86_build_old "2019-09-18"
159 DEBIAN_VERSION: stretch-slim
160
161 .use-x86_build_old:
162 variables:
163 TAG: *x86_build_old
164 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
165 needs:
166 - x86_build_old
167
168 # Debian 10 based ARM build image
169 arm_build:
170 extends:
171 - .debian@container-ifnot-exists@arm64v8
172 - .container
173 variables:
174 DEBIAN_TAG: &arm_build "2020-02-26"
175
176 .use-arm_build:
177 variables:
178 TAG: *arm_build
179 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
180 needs:
181 - arm_build
182
183 # Debian 10 based ARM test image
184 arm_test:
185 extends: arm_build
186 variables:
187 DEBIAN_TAG: &arm_test "2020-01-30"
188
189 .use-arm_test:
190 variables:
191 TAG: *arm_test
192 image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
193 needs:
194 - meson-arm64
195 - arm_test
196
197
198 # BUILD
199
200 # Shared between windows and Linux
201 .build-common:
202 extends: .ci-run-policy
203 artifacts:
204 when: always
205 paths:
206 - _build/meson-logs/*.txt
207 # scons:
208 - build/*/config.log
209 - shader-db
210
211 # Just Linux
212 .build-linux:
213 extends: .build-common
214 variables:
215 CCACHE_COMPILERCHECK: "content"
216 CCACHE_COMPRESS: "true"
217 CCACHE_DIR: /cache/mesa/ccache
218 # Use ccache transparently, and print stats before/after
219 before_script:
220 - export PATH="/usr/lib/ccache:$PATH"
221 - export CCACHE_BASEDIR="$PWD"
222 - ccache --show-stats
223 after_script:
224 - ccache --show-stats
225
226 .build-windows:
227 extends: .build-common
228 tags:
229 - mesa-windows
230 cache:
231 key: ${CI_JOB_NAME}
232 paths:
233 - subprojects/packagecache
234
235 .meson-build:
236 extends:
237 - .build-linux
238 - .use-x86_build
239 stage: meson-x86_64
240 variables:
241 LLVM_VERSION: 9
242 script:
243 - .gitlab-ci/meson-build.sh
244
245 .scons-build:
246 extends:
247 - .build-linux
248 - .use-x86_build
249 stage: scons
250 variables:
251 SCONSFLAGS: "-j4"
252 script:
253 - .gitlab-ci/scons-build.sh
254
255 meson-testing:
256 extends:
257 - .meson-build
258 - .ci-deqp-artifacts
259 variables:
260 UNWIND: "true"
261 DRI_LOADERS: >
262 -D glx=dri
263 -D gbm=true
264 -D egl=true
265 -D platforms=x11,drm,surfaceless
266 GALLIUM_ST: >
267 -D dri3=true
268 GALLIUM_DRIVERS: "swrast"
269 VULKAN_DRIVERS: amd
270 BUILDTYPE: "debugoptimized"
271 EXTRA_OPTION: >
272 -D werror=true
273 script:
274 - .gitlab-ci/meson-build.sh
275 - .gitlab-ci/prepare-artifacts.sh
276
277 meson-main:
278 extends: .meson-build
279 variables:
280 UNWIND: "true"
281 DRI_LOADERS: >
282 -D glx=dri
283 -D gbm=true
284 -D egl=true
285 -D platforms=x11,wayland,drm,surfaceless
286 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
287 GALLIUM_ST: >
288 -D dri3=true
289 -D gallium-extra-hud=true
290 -D gallium-vdpau=true
291 -D gallium-xvmc=true
292 -D gallium-omx=bellagio
293 -D gallium-va=true
294 -D gallium-xa=true
295 -D gallium-nine=true
296 -D gallium-opencl=disabled
297 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
298 EXTRA_OPTION: >
299 -D osmesa=gallium
300 -D tools=all
301 script:
302 - .gitlab-ci/meson-build.sh
303 - .gitlab-ci/run-shader-db.sh
304
305 .meson-cross:
306 extends:
307 - .meson-build
308 stage: meson-misc
309 variables:
310 UNWIND: "false"
311 DRI_LOADERS: >
312 -D glx=disabled
313 -D gbm=false
314 -D egl=true
315 -D platforms=surfaceless
316 -D osmesa=none
317 GALLIUM_ST: >
318 -D dri3=false
319 -D gallium-vdpau=false
320 -D gallium-xvmc=false
321 -D gallium-omx=disabled
322 -D gallium-va=false
323 -D gallium-xa=false
324 -D gallium-nine=false
325 LLVM_VERSION: "8"
326
327 .meson-arm:
328 extends:
329 - .meson-cross
330 - .use-arm_build
331 variables:
332 VULKAN_DRIVERS: freedreno
333 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
334 BUILDTYPE: "debugoptimized"
335 tags:
336 - aarch64
337
338 meson-armhf:
339 extends:
340 - .meson-arm
341 - .ci-deqp-artifacts
342 variables:
343 CROSS: armhf
344 LLVM_VERSION: "7"
345 EXTRA_OPTION: >
346 -D llvm=false
347 script:
348 - .gitlab-ci/meson-build.sh
349 - .gitlab-ci/prepare-artifacts.sh
350
351 meson-arm64:
352 extends:
353 - .meson-arm
354 - .ci-deqp-artifacts
355 variables:
356 VULKAN_DRIVERS: "freedreno"
357 EXTRA_OPTION: >
358 -D llvm=false
359 script:
360 - .gitlab-ci/meson-build.sh
361 - .gitlab-ci/prepare-artifacts.sh
362
363 meson-arm64-build-test:
364 extends:
365 - .meson-arm
366 - .ci-deqp-artifacts
367 variables:
368 VULKAN_DRIVERS: "amd"
369 script:
370 - .gitlab-ci/meson-build.sh
371
372 meson-clang:
373 extends: .meson-build
374 variables:
375 UNWIND: "true"
376 DRI_LOADERS: >
377 -D glvnd=true
378 DRI_DRIVERS: "auto"
379 GALLIUM_DRIVERS: "auto"
380 VULKAN_DRIVERS: intel,amd,freedreno
381 CC: "ccache clang-9"
382 CXX: "ccache clang++-9"
383
384 .meson-windows:
385 extends:
386 - .build-windows
387 stage: meson-misc
388 before_script:
389 - $ENV:ARCH = "x86"
390 - $ENV:VERSION = "2019\Community"
391 script:
392 - cmd /C .gitlab-ci\meson-build.bat
393
394 scons-swr:
395 extends: .scons-build
396 variables:
397 SCONS_TARGET: "swr=1"
398 SCONS_CHECK_COMMAND: "true"
399 LLVM_VERSION: "6.0"
400
401 scons-win64:
402 extends: .scons-build
403 variables:
404 SCONS_TARGET: platform=windows machine=x86_64
405 SCONS_CHECK_COMMAND: "true"
406
407 meson-clover:
408 extends: .meson-build
409 variables:
410 UNWIND: "true"
411 DRI_LOADERS: >
412 -D glx=disabled
413 -D egl=false
414 -D gbm=false
415 GALLIUM_ST: >
416 -D dri3=false
417 -D gallium-vdpau=false
418 -D gallium-xvmc=false
419 -D gallium-omx=disabled
420 -D gallium-va=false
421 -D gallium-xa=false
422 -D gallium-nine=false
423 -D gallium-opencl=icd
424 script:
425 - export GALLIUM_DRIVERS="r600,radeonsi"
426 - .gitlab-ci/meson-build.sh
427 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
428 - export GALLIUM_DRIVERS="i915,r600"
429 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
430 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
431
432 meson-clover-old-llvm:
433 extends:
434 - meson-clover
435 - .use-x86_build_old
436 variables:
437 UNWIND: "false"
438 DRI_LOADERS: >
439 -D glx=disabled
440 -D egl=false
441 -D gbm=false
442 -D platforms=drm,surfaceless
443 GALLIUM_DRIVERS: "i915,r600"
444 script:
445 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
446 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
447 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
448
449 meson-vulkan:
450 extends: .meson-build
451 variables:
452 UNWIND: "false"
453 DRI_LOADERS: >
454 -D glx=disabled
455 -D gbm=false
456 -D egl=false
457 -D platforms=x11,wayland,drm
458 -D osmesa=none
459 GALLIUM_ST: >
460 -D dri3=true
461 -D gallium-vdpau=false
462 -D gallium-xvmc=false
463 -D gallium-omx=disabled
464 -D gallium-va=false
465 -D gallium-xa=false
466 -D gallium-nine=false
467 -D gallium-opencl=disabled
468 -D b_sanitize=undefined
469 -D c_args=-fno-sanitize-recover=all
470 -D cpp_args=-fno-sanitize-recover=all
471 UBSAN_OPTIONS: "print_stacktrace=1"
472 VULKAN_DRIVERS: intel,amd,freedreno
473 EXTRA_OPTION: >
474 -D vulkan-overlay-layer=true
475 -D werror=true
476
477 # While the main point of this build is testing the i386 cross build,
478 # we also use this one to test some other options that are exclusive
479 # with meson-main's choices (classic swrast and osmesa)
480 meson-i386:
481 extends: .meson-cross
482 variables:
483 CROSS: i386
484 VULKAN_DRIVERS: intel
485 DRI_DRIVERS: "swrast"
486 GALLIUM_DRIVERS: "iris"
487 EXTRA_OPTION: >
488 -D vulkan-overlay-layer=true
489 -D llvm=false
490 -D osmesa=classic
491 -D werror=true
492
493 meson-s390x:
494 extends:
495 - .meson-cross
496 tags:
497 - gstreamer
498 variables:
499 CROSS: s390x
500 GALLIUM_DRIVERS: "swrast"
501 script:
502 - dpkg -i /var/cache/apt/archives/$CROSS/*.deb
503 - .gitlab-ci/meson-build.sh
504
505 meson-ppc64el:
506 extends:
507 - meson-s390x
508 variables:
509 CROSS: ppc64el
510 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
511 VULKAN_DRIVERS: "amd"
512
513 meson-mingw32-x86_64:
514 extends: .meson-build
515 stage: meson-misc
516 variables:
517 UNWIND: "false"
518 DRI_DRIVERS: ""
519 GALLIUM_DRIVERS: "swrast"
520 EXTRA_OPTION: >
521 -Dllvm=false
522 -Dosmesa=gallium
523 --cross-file=.gitlab-ci/x86_64-w64-mingw32
524
525 scons:
526 extends: .scons-build
527 variables:
528 SCONS_TARGET: "llvm=1"
529 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
530 script:
531 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
532 - LLVM_VERSION=9 .gitlab-ci/scons-build.sh
533
534 scons-old-llvm:
535 extends:
536 - scons
537 - .use-x86_build_old
538 script:
539 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
540
541 .test:
542 extends:
543 - .ci-run-policy
544 variables:
545 GIT_STRATEGY: none # testing doesn't build anything from source
546 before_script:
547 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
548 - rm -rf install
549 - tar -xf artifacts/install.tar
550 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
551 artifacts:
552 when: always
553 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
554 paths:
555 - results/
556 dependencies:
557 - meson-testing
558
559 .test-gl:
560 extends:
561 - .test
562 variables:
563 TAG: *x86_test-gl
564 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
565 needs:
566 - meson-testing
567 - x86_test-gl
568
569 .test-vk:
570 extends:
571 - .test
572 variables:
573 TAG: *x86_test-vk
574 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
575 needs:
576 - meson-testing
577 - x86_test-vk
578
579 .piglit-test:
580 extends: .test-gl
581 stage: llvmpipe
582 artifacts:
583 when: on_failure
584 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
585 paths:
586 - summary/
587 variables:
588 LIBGL_ALWAYS_SOFTWARE: 1
589 PIGLIT_NO_WINDOW: 1
590 script:
591 - artifacts/piglit/run.sh
592
593 piglit-quick_gl:
594 extends: .piglit-test
595 variables:
596 LP_NUM_THREADS: 0
597 NIR_VALIDATE: 0
598 PIGLIT_OPTIONS: >
599 --process-isolation false
600 -x arb_gpu_shader5
601 -x egl_ext_device_
602 -x egl_ext_platform_device
603 -x ext_timer_query@time-elapsed
604 -x glx-multithread-clearbuffer
605 -x glx-multithread-shader-compile
606 -x max-texture-size
607 -x maxsize
608 PIGLIT_PROFILES: quick_gl
609
610 piglit-glslparser:
611 extends: .piglit-test
612 variables:
613 LP_NUM_THREADS: 0
614 NIR_VALIDATE: 0
615 PIGLIT_PROFILES: glslparser
616
617 piglit-quick_shader:
618 extends: .piglit-test
619 variables:
620 LP_NUM_THREADS: 1
621 NIR_VALIDATE: 0
622 PIGLIT_PROFILES: quick_shader
623
624 .deqp-test:
625 variables:
626 DEQP_SKIPS: deqp-default-skips.txt
627 script:
628 - ./artifacts/deqp-runner.sh
629
630 .deqp-test-gl:
631 extends:
632 - .test-gl
633 - .deqp-test
634
635 .deqp-test-vk:
636 extends:
637 - .test-vk
638 - .deqp-test
639 variables:
640 DEQP_VER: vk
641
642 llvmpipe-gles2:
643 variables:
644 DEQP_VER: gles2
645 DEQP_PARALLEL: 4
646 NIR_VALIDATE: 0
647 # Don't use threads inside llvmpipe, we've already got all 4 cores
648 # busy with DEQP_PARALLEL.
649 LP_NUM_THREADS: 0
650 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
651 LIBGL_ALWAYS_SOFTWARE: "true"
652 extends: .deqp-test-gl
653 stage: llvmpipe
654
655 softpipe-gles2:
656 extends: llvmpipe-gles2
657 stage: softpipe
658 variables:
659 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
660 DEQP_SKIPS: deqp-softpipe-skips.txt
661 GALLIUM_DRIVER: "softpipe"
662
663 softpipe-gles3:
664 parallel: 2
665 variables:
666 DEQP_VER: gles3
667 extends: softpipe-gles2
668
669 softpipe-gles31:
670 parallel: 4
671 variables:
672 DEQP_VER: gles31
673 extends: softpipe-gles2
674
675 arm64_a630_gles2:
676 extends:
677 - .deqp-test-gl
678 - .use-arm_test
679 stage: freedreno
680 variables:
681 DEQP_VER: gles2
682 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
683 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
684 NIR_VALIDATE: 0
685 DEQP_PARALLEL: 4
686 FLAKES_CHANNEL: "#freedreno-ci"
687 tags:
688 - mesa-cheza
689 dependencies:
690 - meson-arm64
691
692 arm64_a630_gles31:
693 extends: arm64_a630_gles2
694 variables:
695 DEQP_VER: gles31
696
697 arm64_a630_gles3:
698 extends: arm64_a630_gles2
699 variables:
700 DEQP_VER: gles3
701
702 arm64_a306_gles2:
703 extends: arm64_a630_gles2
704 variables:
705 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
706 DEQP_SKIPS: deqp-default-skips.txt
707 tags:
708 - db410c
709
710 # RADV CI
711 .test-radv:
712 stage: misc-tests
713 variables:
714 VK_DRIVER: radeon
715 RADV_DEBUG: checkir
716 # Can only be triggered manually on personal branches because RADV is the only
717 # driver that does Vulkan testing at the moment.
718 rules:
719 # Never test RADV by default in the main project.
720 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
721 when: never
722 # Never test RADV by default for merge requests.
723 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
724 when: never
725 # Otherwise, allow testing RADV if the test image for VK has been manually
726 # started.
727 - when: on_success
728
729 radv_polaris10_vkcts:
730 extends:
731 - .deqp-test-vk
732 - .test-radv
733 variables:
734 DEQP_PARALLEL: 4
735 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
736 tags:
737 - polaris10
738
739 # Traces CI
740 .traces-test:
741 stage: misc-tests
742 cache:
743 key: ${CI_JOB_NAME}
744 paths:
745 - .git-lfs-storage/
746
747 .traces-test-gl:
748 extends:
749 - .test-gl
750 - .traces-test
751 script:
752 - ./artifacts/tracie-runner-gl.sh
753
754 .traces-test-vk:
755 extends:
756 - .test-vk
757 - .traces-test
758 script:
759 - ./artifacts/tracie-runner-vk.sh
760
761 llvmpipe-traces:
762 extends: .traces-test-gl
763 variables:
764 LIBGL_ALWAYS_SOFTWARE: "true"
765 GALLIUM_DRIVER: "llvmpipe"
766 DEVICE_NAME: "gl-vmware-llvmpipe"
767
768 radv-polaris10-traces:
769 extends:
770 - .traces-test-vk
771 - .test-radv
772 variables:
773 DEVICE_NAME: "vk-amd-polaris10"
774 tags:
775 - polaris10