gitlab-ci: build RADV in meson-testing
[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
120 # Debian 9 based x86 build image (old LLVM)
121 x86_build_old:
122 extends: x86_build
123 variables:
124 DEBIAN_TAG: &x86_build_old "2019-09-18"
125 DEBIAN_VERSION: stretch-slim
126
127 .use-x86_build_old:
128 variables:
129 TAG: *x86_build_old
130 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
131 needs:
132 - x86_build_old
133
134 # Debian 10 based ARM build image
135 arm_build:
136 extends:
137 - .debian@container-ifnot-exists@arm64v8
138 - .container
139 variables:
140 DEBIAN_TAG: &arm_build "2019-11-13"
141
142 .use-arm_build:
143 variables:
144 TAG: *arm_build
145 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
146 needs:
147 - arm_build
148
149 # Debian 10 based ARM test image
150 arm_test:
151 extends: arm_build
152 variables:
153 DEBIAN_TAG: &arm_test "2019-11-22"
154
155 .use-arm_test:
156 variables:
157 TAG: *arm_test
158 image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
159 needs:
160 - meson-arm64
161 - arm_test
162
163
164 # BUILD
165
166 # Shared between windows and Linux
167 .build-common:
168 extends: .ci-run-policy
169 stage: build
170 artifacts:
171 when: always
172 paths:
173 - _build/meson-logs/*.txt
174 # scons:
175 - build/*/config.log
176 - shader-db
177
178 # Just Linux
179 .build-linux:
180 extends: .build-common
181 variables:
182 CCACHE_COMPILERCHECK: "content"
183 CCACHE_COMPRESS: "true"
184 CCACHE_DIR: /cache/mesa/ccache
185 # Use ccache transparently, and print stats before/after
186 before_script:
187 - export PATH="/usr/lib/ccache:$PATH"
188 - export CCACHE_BASEDIR="$PWD"
189 - ccache --show-stats
190 after_script:
191 - ccache --show-stats
192
193 .build-windows:
194 extends: .build-common
195 tags:
196 - mesa-windows
197 cache:
198 key: ${CI_JOB_NAME}
199 paths:
200 - subprojects/packagecache
201
202 .meson-build:
203 extends:
204 - .build-linux
205 - .use-x86_build
206 script:
207 - .gitlab-ci/meson-build.sh
208
209 .scons-build:
210 extends:
211 - .build-linux
212 - .use-x86_build
213 variables:
214 SCONSFLAGS: "-j4"
215 script:
216 - .gitlab-ci/scons-build.sh
217
218 meson-testing:
219 extends:
220 - .meson-build
221 - .ci-deqp-artifacts
222 variables:
223 UNWIND: "true"
224 DRI_LOADERS: >
225 -D glx=dri
226 -D gbm=true
227 -D egl=true
228 -D platforms=x11,drm,surfaceless
229 GALLIUM_ST: >
230 -D dri3=true
231 GALLIUM_DRIVERS: "swrast"
232 VULKAN_DRIVERS: amd
233 BUILDTYPE: "debugoptimized"
234 script:
235 - .gitlab-ci/meson-build.sh
236 - .gitlab-ci/prepare-artifacts.sh
237
238 meson-main:
239 extends: .meson-build
240 variables:
241 UNWIND: "true"
242 DRI_LOADERS: >
243 -D glx=dri
244 -D gbm=true
245 -D egl=true
246 -D platforms=x11,wayland,drm,surfaceless
247 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
248 GALLIUM_ST: >
249 -D dri3=true
250 -D gallium-extra-hud=true
251 -D gallium-vdpau=true
252 -D gallium-xvmc=true
253 -D gallium-omx=bellagio
254 -D gallium-va=true
255 -D gallium-xa=true
256 -D gallium-nine=true
257 -D gallium-opencl=disabled
258 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
259 LLVM_VERSION: "7"
260 EXTRA_OPTION: >
261 -D osmesa=gallium
262 -D tools=all
263 script:
264 - .gitlab-ci/meson-build.sh
265 - .gitlab-ci/run-shader-db.sh
266
267 .meson-cross:
268 extends:
269 - .meson-build
270 variables:
271 UNWIND: "false"
272 DRI_LOADERS: >
273 -D glx=disabled
274 -D gbm=false
275 -D egl=true
276 -D platforms=surfaceless
277 -D osmesa=none
278 GALLIUM_ST: >
279 -D dri3=false
280 -D gallium-vdpau=false
281 -D gallium-xvmc=false
282 -D gallium-omx=disabled
283 -D gallium-va=false
284 -D gallium-xa=false
285 -D gallium-nine=false
286
287 .meson-arm:
288 extends:
289 - .meson-cross
290 - .use-arm_build
291 variables:
292 VULKAN_DRIVERS: freedreno
293 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
294 EXTRA_OPTION: >
295 -D I-love-half-baked-turnips=true
296 tags:
297 - aarch64
298
299 meson-armhf:
300 extends: .meson-arm
301 variables:
302 CROSS: armhf
303 LLVM_VERSION: "7"
304
305 meson-arm64:
306 extends:
307 - .meson-arm
308 - .ci-deqp-artifacts
309 variables:
310 BUILDTYPE: "debugoptimized"
311 VULKAN_DRIVERS: "freedreno,amd"
312 script:
313 - .gitlab-ci/meson-build.sh
314 - .gitlab-ci/prepare-artifacts.sh
315
316 meson-clang:
317 extends: .meson-build
318 variables:
319 UNWIND: "true"
320 DRI_LOADERS: >
321 -D glvnd=true
322 DRI_DRIVERS: "auto"
323 GALLIUM_DRIVERS: "auto"
324 VULKAN_DRIVERS: intel,amd,freedreno
325 CC: "ccache clang-8"
326 CXX: "ccache clang++-8"
327
328 .meson-windows:
329 extends:
330 - .build-windows
331 before_script:
332 - $ENV:ARCH = "x86"
333 - $ENV:VERSION = "2019\Community"
334 script:
335 - cmd /C .gitlab-ci\meson-build.bat
336
337 scons-swr:
338 extends: .scons-build
339 variables:
340 SCONS_TARGET: "swr=1"
341 SCONS_CHECK_COMMAND: "true"
342 LLVM_VERSION: "6.0"
343
344 scons-win64:
345 extends: .scons-build
346 variables:
347 SCONS_TARGET: platform=windows machine=x86_64
348 SCONS_CHECK_COMMAND: "true"
349
350 meson-clover:
351 extends: .meson-build
352 variables:
353 UNWIND: "true"
354 DRI_LOADERS: >
355 -D glx=disabled
356 -D egl=false
357 -D gbm=false
358 GALLIUM_ST: >
359 -D dri3=false
360 -D gallium-vdpau=false
361 -D gallium-xvmc=false
362 -D gallium-omx=disabled
363 -D gallium-va=false
364 -D gallium-xa=false
365 -D gallium-nine=false
366 -D gallium-opencl=icd
367 script:
368 - export GALLIUM_DRIVERS="r600,radeonsi"
369 - .gitlab-ci/meson-build.sh
370 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
371 - export GALLIUM_DRIVERS="i915,r600"
372 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
373 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
374
375 meson-clover-old-llvm:
376 extends:
377 - meson-clover
378 - .use-x86_build_old
379 variables:
380 UNWIND: "false"
381 DRI_LOADERS: >
382 -D glx=disabled
383 -D egl=false
384 -D gbm=false
385 -D platforms=drm,surfaceless
386 GALLIUM_DRIVERS: "i915,r600"
387 script:
388 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
389 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
390 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
391
392 meson-vulkan:
393 extends: .meson-build
394 variables:
395 UNWIND: "false"
396 DRI_LOADERS: >
397 -D glx=disabled
398 -D gbm=false
399 -D egl=false
400 -D platforms=x11,wayland,drm
401 -D osmesa=none
402 GALLIUM_ST: >
403 -D dri3=true
404 -D gallium-vdpau=false
405 -D gallium-xvmc=false
406 -D gallium-omx=disabled
407 -D gallium-va=false
408 -D gallium-xa=false
409 -D gallium-nine=false
410 -D gallium-opencl=disabled
411 -D b_sanitize=undefined
412 -D c_args=-fno-sanitize-recover=all
413 -D cpp_args=-fno-sanitize-recover=all
414 UBSAN_OPTIONS: "print_stacktrace=1"
415 VULKAN_DRIVERS: intel,amd,freedreno
416 LLVM_VERSION: "8"
417 EXTRA_OPTION: >
418 -D vulkan-overlay-layer=true
419
420 # While the main point of this build is testing the i386 cross build,
421 # we also use this one to test some other options that are exclusive
422 # with meson-main's choices (classic swrast and osmesa)
423 meson-i386:
424 extends: .meson-cross
425 variables:
426 CROSS: i386
427 VULKAN_DRIVERS: intel
428 DRI_DRIVERS: "swrast"
429 GALLIUM_DRIVERS: "iris"
430 EXTRA_OPTION: >
431 -D vulkan-overlay-layer=true
432 -D llvm=false
433 -D osmesa=classic
434
435 meson-mingw32-x86_64:
436 extends: .meson-build
437 variables:
438 UNWIND: "false"
439 DRI_DRIVERS: ""
440 GALLIUM_DRIVERS: "swrast"
441 EXTRA_OPTION: >
442 -Dllvm=false
443 -Dosmesa=gallium
444 --cross-file=.gitlab-ci/x86_64-w64-mingw32
445
446 scons:
447 extends: .scons-build
448 variables:
449 SCONS_TARGET: "llvm=1"
450 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
451 script:
452 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
453 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
454
455 scons-old-llvm:
456 extends:
457 - scons
458 - .use-x86_build_old
459 script:
460 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
461
462 .test:
463 extends:
464 - .ci-run-policy
465 stage: test
466 variables:
467 GIT_STRATEGY: none # testing doesn't build anything from source
468 before_script:
469 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
470 - rm -rf install
471 - tar -xf artifacts/install.tar
472 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
473 artifacts:
474 when: always
475 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
476 paths:
477 - results/
478 dependencies:
479 - meson-testing
480
481 .test-gl:
482 extends:
483 - .test
484 variables:
485 TAG: *x86_test-gl
486 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
487 needs:
488 - meson-testing
489 - x86_test-gl
490
491 .test-vk:
492 extends:
493 - .test
494 variables:
495 TAG: *x86_test-vk
496 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
497 needs:
498 - meson-testing
499 - x86_test-vk
500
501 .piglit-test:
502 extends: .test-gl
503 artifacts:
504 when: on_failure
505 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
506 paths:
507 - summary/
508 variables:
509 LIBGL_ALWAYS_SOFTWARE: 1
510 PIGLIT_NO_WINDOW: 1
511 script:
512 - artifacts/piglit/run.sh
513
514 piglit-quick_gl:
515 extends: .piglit-test
516 variables:
517 LP_NUM_THREADS: 0
518 PIGLIT_OPTIONS: >
519 --process-isolation false
520 -x arb_gpu_shader5
521 -x egl_ext_device_
522 -x egl_ext_platform_device
523 -x glx-multithread-clearbuffer
524 -x glx-multithread-shader-compile
525 -x max-texture-size
526 -x maxsize
527 PIGLIT_PROFILES: quick_gl
528
529 piglit-glslparser:
530 extends: .piglit-test
531 variables:
532 LP_NUM_THREADS: 0
533 PIGLIT_PROFILES: glslparser
534
535 piglit-quick_shader:
536 extends: .piglit-test
537 variables:
538 LP_NUM_THREADS: 1
539 PIGLIT_OPTIONS: >
540 -x spec@arb_arrays_of_arrays@execution@ubo
541 -x spec@arb_gpu_shader_int64@execution$$
542 -x spec@arb_separate_shader_objects@execution
543 -x spec@arb_separate_shader_objects@linker
544 -x spec@arb_shader_storage_buffer_object@execution
545 -x spec@glsl-1.50@execution@built-in-functions
546 PIGLIT_PROFILES: quick_shader
547
548 .deqp-test:
549 variables:
550 DEQP_SKIPS: deqp-default-skips.txt
551 script:
552 - ./artifacts/deqp-runner.sh
553
554 .deqp-test-gl:
555 extends:
556 - .test-gl
557 - .deqp-test
558
559 .deqp-test-vk:
560 extends:
561 - .test-vk
562 - .deqp-test
563 variables:
564 DEQP_VER: vk
565
566 test-llvmpipe-gles2:
567 variables:
568 DEQP_VER: gles2
569 DEQP_PARALLEL: 4
570 # Don't use threads inside llvmpipe, we've already got all 4 cores
571 # busy with DEQP_PARALLEL.
572 LP_NUM_THREADS: 0
573 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
574 LIBGL_ALWAYS_SOFTWARE: "true"
575 extends: .deqp-test-gl
576
577 test-softpipe-gles2:
578 extends: test-llvmpipe-gles2
579 variables:
580 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
581 DEQP_SKIPS: deqp-softpipe-skips.txt
582 GALLIUM_DRIVER: "softpipe"
583
584 test-softpipe-gles3:
585 parallel: 2
586 variables:
587 DEQP_VER: gles3
588 extends: test-softpipe-gles2
589
590 test-softpipe-gles31:
591 parallel: 4
592 variables:
593 DEQP_VER: gles31
594 extends: test-softpipe-gles2
595
596 arm64_a630_gles2:
597 extends:
598 - .deqp-test-gl
599 - .use-arm_test
600 variables:
601 DEQP_VER: gles2
602 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
603 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
604 NIR_VALIDATE: 0
605 DEQP_PARALLEL: 4
606 FLAKES_CHANNEL: "#freedreno-ci"
607 tags:
608 - mesa-cheza
609 dependencies:
610 - meson-arm64
611
612 arm64_a630_gles31:
613 extends: arm64_a630_gles2
614 variables:
615 DEQP_VER: gles31
616
617 arm64_a630_gles3:
618 extends: arm64_a630_gles2
619 variables:
620 DEQP_VER: gles3
621
622 arm64_a306_gles2:
623 extends: arm64_a630_gles2
624 variables:
625 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
626 DEQP_SKIPS: deqp-default-skips.txt
627 tags:
628 - db410c