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