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