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