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