radeonsi: Add support for midstream bitrate change in encoder
[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 -D werror=true
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