android: nir: add a load/store vectorization pass
[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 "2019-11-13"
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 "2019-12-05"
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 "2019-11-22"
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-11-22"
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 script:
219 - .gitlab-ci/meson-build.sh
220
221 .scons-build:
222 extends:
223 - .build-linux
224 - .use-x86_build
225 variables:
226 SCONSFLAGS: "-j4"
227 script:
228 - .gitlab-ci/scons-build.sh
229
230 meson-testing:
231 extends:
232 - .meson-build
233 - .ci-deqp-artifacts
234 variables:
235 UNWIND: "true"
236 DRI_LOADERS: >
237 -D glx=dri
238 -D gbm=true
239 -D egl=true
240 -D platforms=x11,drm,surfaceless
241 GALLIUM_ST: >
242 -D dri3=true
243 GALLIUM_DRIVERS: "swrast"
244 VULKAN_DRIVERS: amd
245 BUILDTYPE: "debugoptimized"
246 script:
247 - .gitlab-ci/meson-build.sh
248 - .gitlab-ci/prepare-artifacts.sh
249
250 meson-main:
251 extends: .meson-build
252 variables:
253 UNWIND: "true"
254 DRI_LOADERS: >
255 -D glx=dri
256 -D gbm=true
257 -D egl=true
258 -D platforms=x11,wayland,drm,surfaceless
259 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
260 GALLIUM_ST: >
261 -D dri3=true
262 -D gallium-extra-hud=true
263 -D gallium-vdpau=true
264 -D gallium-xvmc=true
265 -D gallium-omx=bellagio
266 -D gallium-va=true
267 -D gallium-xa=true
268 -D gallium-nine=true
269 -D gallium-opencl=disabled
270 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
271 LLVM_VERSION: "7"
272 EXTRA_OPTION: >
273 -D osmesa=gallium
274 -D tools=all
275 script:
276 - .gitlab-ci/meson-build.sh
277 - .gitlab-ci/run-shader-db.sh
278
279 .meson-cross:
280 extends:
281 - .meson-build
282 variables:
283 UNWIND: "false"
284 DRI_LOADERS: >
285 -D glx=disabled
286 -D gbm=false
287 -D egl=true
288 -D platforms=surfaceless
289 -D osmesa=none
290 GALLIUM_ST: >
291 -D dri3=false
292 -D gallium-vdpau=false
293 -D gallium-xvmc=false
294 -D gallium-omx=disabled
295 -D gallium-va=false
296 -D gallium-xa=false
297 -D gallium-nine=false
298
299 .meson-arm:
300 extends:
301 - .meson-cross
302 - .use-arm_build
303 variables:
304 VULKAN_DRIVERS: freedreno
305 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
306 EXTRA_OPTION: >
307 -D I-love-half-baked-turnips=true
308 tags:
309 - aarch64
310
311 meson-armhf:
312 extends: .meson-arm
313 variables:
314 CROSS: armhf
315 LLVM_VERSION: "7"
316
317 meson-arm64:
318 extends:
319 - .meson-arm
320 - .ci-deqp-artifacts
321 variables:
322 BUILDTYPE: "debugoptimized"
323 VULKAN_DRIVERS: "freedreno,amd"
324 script:
325 - .gitlab-ci/meson-build.sh
326 - .gitlab-ci/prepare-artifacts.sh
327
328 meson-clang:
329 extends: .meson-build
330 variables:
331 UNWIND: "true"
332 DRI_LOADERS: >
333 -D glvnd=true
334 DRI_DRIVERS: "auto"
335 GALLIUM_DRIVERS: "auto"
336 VULKAN_DRIVERS: intel,amd,freedreno
337 CC: "ccache clang-8"
338 CXX: "ccache clang++-8"
339
340 .meson-windows:
341 extends:
342 - .build-windows
343 before_script:
344 - $ENV:ARCH = "x86"
345 - $ENV:VERSION = "2019\Community"
346 script:
347 - cmd /C .gitlab-ci\meson-build.bat
348
349 scons-swr:
350 extends: .scons-build
351 variables:
352 SCONS_TARGET: "swr=1"
353 SCONS_CHECK_COMMAND: "true"
354 LLVM_VERSION: "6.0"
355
356 scons-win64:
357 extends: .scons-build
358 variables:
359 SCONS_TARGET: platform=windows machine=x86_64
360 SCONS_CHECK_COMMAND: "true"
361
362 meson-clover:
363 extends: .meson-build
364 variables:
365 UNWIND: "true"
366 DRI_LOADERS: >
367 -D glx=disabled
368 -D egl=false
369 -D gbm=false
370 GALLIUM_ST: >
371 -D dri3=false
372 -D gallium-vdpau=false
373 -D gallium-xvmc=false
374 -D gallium-omx=disabled
375 -D gallium-va=false
376 -D gallium-xa=false
377 -D gallium-nine=false
378 -D gallium-opencl=icd
379 script:
380 - export GALLIUM_DRIVERS="r600,radeonsi"
381 - .gitlab-ci/meson-build.sh
382 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
383 - export GALLIUM_DRIVERS="i915,r600"
384 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
385 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
386
387 meson-clover-old-llvm:
388 extends:
389 - meson-clover
390 - .use-x86_build_old
391 variables:
392 UNWIND: "false"
393 DRI_LOADERS: >
394 -D glx=disabled
395 -D egl=false
396 -D gbm=false
397 -D platforms=drm,surfaceless
398 GALLIUM_DRIVERS: "i915,r600"
399 script:
400 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
401 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
402 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
403
404 meson-vulkan:
405 extends: .meson-build
406 variables:
407 UNWIND: "false"
408 DRI_LOADERS: >
409 -D glx=disabled
410 -D gbm=false
411 -D egl=false
412 -D platforms=x11,wayland,drm
413 -D osmesa=none
414 GALLIUM_ST: >
415 -D dri3=true
416 -D gallium-vdpau=false
417 -D gallium-xvmc=false
418 -D gallium-omx=disabled
419 -D gallium-va=false
420 -D gallium-xa=false
421 -D gallium-nine=false
422 -D gallium-opencl=disabled
423 -D b_sanitize=undefined
424 -D c_args=-fno-sanitize-recover=all
425 -D cpp_args=-fno-sanitize-recover=all
426 UBSAN_OPTIONS: "print_stacktrace=1"
427 VULKAN_DRIVERS: intel,amd,freedreno
428 LLVM_VERSION: "8"
429 EXTRA_OPTION: >
430 -D vulkan-overlay-layer=true
431
432 # While the main point of this build is testing the i386 cross build,
433 # we also use this one to test some other options that are exclusive
434 # with meson-main's choices (classic swrast and osmesa)
435 meson-i386:
436 extends: .meson-cross
437 variables:
438 CROSS: i386
439 VULKAN_DRIVERS: intel
440 DRI_DRIVERS: "swrast"
441 GALLIUM_DRIVERS: "iris"
442 EXTRA_OPTION: >
443 -D vulkan-overlay-layer=true
444 -D llvm=false
445 -D osmesa=classic
446
447 meson-mingw32-x86_64:
448 extends: .meson-build
449 variables:
450 UNWIND: "false"
451 DRI_DRIVERS: ""
452 GALLIUM_DRIVERS: "swrast"
453 EXTRA_OPTION: >
454 -Dllvm=false
455 -Dosmesa=gallium
456 --cross-file=.gitlab-ci/x86_64-w64-mingw32
457
458 scons:
459 extends: .scons-build
460 variables:
461 SCONS_TARGET: "llvm=1"
462 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
463 script:
464 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
465 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
466
467 scons-old-llvm:
468 extends:
469 - scons
470 - .use-x86_build_old
471 script:
472 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
473
474 .test:
475 extends:
476 - .ci-run-policy
477 stage: test
478 variables:
479 GIT_STRATEGY: none # testing doesn't build anything from source
480 before_script:
481 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
482 - rm -rf install
483 - tar -xf artifacts/install.tar
484 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
485 artifacts:
486 when: always
487 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
488 paths:
489 - results/
490 dependencies:
491 - meson-testing
492
493 .test-gl:
494 extends:
495 - .test
496 variables:
497 TAG: *x86_test-gl
498 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
499 needs:
500 - meson-testing
501 - x86_test-gl
502
503 .test-vk:
504 extends:
505 - .test
506 variables:
507 TAG: *x86_test-vk
508 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
509 needs:
510 - meson-testing
511 - x86_test-vk
512
513 .piglit-test:
514 extends: .test-gl
515 artifacts:
516 when: on_failure
517 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
518 paths:
519 - summary/
520 variables:
521 LIBGL_ALWAYS_SOFTWARE: 1
522 PIGLIT_NO_WINDOW: 1
523 script:
524 - artifacts/piglit/run.sh
525
526 piglit-quick_gl:
527 extends: .piglit-test
528 variables:
529 LP_NUM_THREADS: 0
530 NIR_VALIDATE: 0
531 PIGLIT_OPTIONS: >
532 --process-isolation false
533 -x arb_gpu_shader5
534 -x egl_ext_device_
535 -x egl_ext_platform_device
536 -x glx-multithread-clearbuffer
537 -x glx-multithread-shader-compile
538 -x max-texture-size
539 -x maxsize
540 PIGLIT_PROFILES: quick_gl
541
542 piglit-glslparser:
543 extends: .piglit-test
544 variables:
545 LP_NUM_THREADS: 0
546 NIR_VALIDATE: 0
547 PIGLIT_PROFILES: glslparser
548
549 piglit-quick_shader:
550 extends: .piglit-test
551 variables:
552 LP_NUM_THREADS: 1
553 NIR_VALIDATE: 0
554 PIGLIT_PROFILES: quick_shader
555
556 .deqp-test:
557 variables:
558 DEQP_SKIPS: deqp-default-skips.txt
559 script:
560 - ./artifacts/deqp-runner.sh
561
562 .deqp-test-gl:
563 extends:
564 - .test-gl
565 - .deqp-test
566
567 .deqp-test-vk:
568 extends:
569 - .test-vk
570 - .deqp-test
571 variables:
572 DEQP_VER: vk
573
574 test-llvmpipe-gles2:
575 variables:
576 DEQP_VER: gles2
577 DEQP_PARALLEL: 4
578 NIR_VALIDATE: 0
579 # Don't use threads inside llvmpipe, we've already got all 4 cores
580 # busy with DEQP_PARALLEL.
581 LP_NUM_THREADS: 0
582 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
583 LIBGL_ALWAYS_SOFTWARE: "true"
584 extends: .deqp-test-gl
585
586 test-softpipe-gles2:
587 extends: test-llvmpipe-gles2
588 variables:
589 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
590 DEQP_SKIPS: deqp-softpipe-skips.txt
591 GALLIUM_DRIVER: "softpipe"
592
593 test-softpipe-gles3:
594 parallel: 2
595 variables:
596 DEQP_VER: gles3
597 extends: test-softpipe-gles2
598
599 test-softpipe-gles31:
600 parallel: 4
601 variables:
602 DEQP_VER: gles31
603 extends: test-softpipe-gles2
604
605 arm64_a630_gles2:
606 extends:
607 - .deqp-test-gl
608 - .use-arm_test
609 variables:
610 DEQP_VER: gles2
611 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
612 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
613 NIR_VALIDATE: 0
614 DEQP_PARALLEL: 4
615 FLAKES_CHANNEL: "#freedreno-ci"
616 tags:
617 - mesa-cheza
618 dependencies:
619 - meson-arm64
620
621 arm64_a630_gles31:
622 extends: arm64_a630_gles2
623 variables:
624 DEQP_VER: gles31
625
626 arm64_a630_gles3:
627 extends: arm64_a630_gles2
628 variables:
629 DEQP_VER: gles3
630
631 arm64_a306_gles2:
632 extends: arm64_a630_gles2
633 variables:
634 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
635 DEQP_SKIPS: deqp-default-skips.txt
636 tags:
637 - db410c
638
639 # RADV CI
640 .test-radv:
641 variables:
642 VK_DRIVER: radeon
643 RADV_DEBUG: checkir
644 # Can only be triggered manually on personal branches because RADV is the only
645 # driver that does Vulkan testing at the moment.
646 rules:
647 # Never test RADV by default in the main project.
648 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
649 when: never
650 # Never test RADV by default for merge requests.
651 - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
652 when: never
653 # Otherwise, allow testing RADV if the test image for VK has been manually
654 # started.
655 - when: on_success
656
657 radv_polaris10_vkcts:
658 extends:
659 - .deqp-test-vk
660 - .test-radv
661 variables:
662 DEQP_PARALLEL: 4
663 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
664 tags:
665 - polaris10