2 FDO_UPSTREAM_REPO: mesa/mesa
5 - project: 'freedesktop/ci-templates'
6 ref: 59de540b620c45739871d1a073d76d5521989d11
7 file: '/templates/debian.yml'
8 - local: '.gitlab-ci/lava-gitlab-ci.yml'
9 - local: '.gitlab-ci/test-source-dep.yml'
28 extends: .ci-run-policy
31 - apk --no-cache add py3-pip
32 - pip3 install sphinx sphinx_rtd_theme
33 - sphinx-build -b html docs public
42 - if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"'
47 # Other cases default to never
53 - if: '$CI_PROJECT_NAMESPACE == "mesa"'
55 - if: '$GITLAB_USER_LOGIN == "marge-bot"'
58 - changes: *docs-or-ci
60 # Other cases default to never
62 # When to automatically run the CI
65 # If any files affecting the pipeline are changed, build/test jobs run
66 # automatically once all dependency jobs have passed
70 - bin/install_megadrivers.py
71 - bin/meson_get_version.py
72 - bin/symbols-check.py
88 # Otherwise, build/test jobs won't run
93 - runner_system_failure
94 # Cancel CI run if a newer commit is pushed to the same branch
99 image: debian:stable-slim
108 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
113 name: "mesa_${CI_JOB_NAME}"
117 # Watch out! Artifacts are relative to the build dir.
118 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
121 # Build the CI docker images.
123 # FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
124 # image doesn't exist yet, the container stage job generates it.
126 # In order to generate a new image, one should generally change the tag.
127 # While removing the image from the registry would also work, that's not
128 # recommended except for ephemeral images during development: Replacing
129 # an image after a significant amount of time might pull in newer
130 # versions of gcc/clang or other packages, which might break the build
131 # with older commits using the same tag.
133 # After merging a change resulting in generating a new image to the
134 # main repository, it's recommended to remove the image from the source
135 # repository's container registry, so that the image from the main
136 # repository's registry will be used there as well.
139 stage: container+docs
143 # Run pipeline by default in the main project if any CI pipeline
144 # configuration files were changed, to ensure docker images are up to date
145 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
150 # Run pipeline by default if it was triggered by Marge Bot, is for a
151 # merge request, and any files affecting the pipeline were changed
152 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
156 # Run pipeline by default in the main project if it was not triggered by
157 # Marge Bot, and any files affecting the pipeline were changed
158 - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
162 # Allow triggering jobs manually in other cases if any files affecting the
163 # pipeline were changed
167 # Otherwise, container jobs won't run
170 FDO_DISTRIBUTION_VERSION: buster-slim
171 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
172 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
173 # no need to pull the whole repo to build the container image
176 # Debian 10 based x86 build image base
179 - .fdo.container-build@debian
182 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-12"
190 BASE_TAG: *x86_build-base
191 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
195 # Debian 10 based x86 main build image
198 - .use-x86_build-base
200 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
205 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
210 # Debian 10 based i386 cross-build image
213 - .use-x86_build-base
215 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
220 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
225 # Debian 10 based ppc64el cross-build image
228 - .use-x86_build-base
230 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
235 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
240 # Debian 10 based s390x cross-build image
243 - .use-x86_build-base
245 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
250 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
255 # Debian 10 based x86 test image base
257 extends: x86_build-base
259 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
267 BASE_TAG: *x86_test-base
268 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
272 # Debian 10 based x86 test image for GL
274 extends: .use-x86_test-base
276 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-23-virgl"
278 # Debian 10 based x86 test image for VK
280 extends: .use-x86_test-base
282 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
284 # Debian 9 based x86 build image (old LLVM)
286 extends: x86_build-base
288 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-12"
289 FDO_DISTRIBUTION_VERSION: stretch-slim
294 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
298 # Debian 10 based ARM build image
301 - .fdo.container-build@debian@arm64v8
304 FDO_DISTRIBUTION_TAG: &arm_build "2020-06-22-tracie"
309 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
313 # Debian 10 based x86 baremetal image base
316 - .fdo.container-build@debian
319 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-22-tracie"
327 BASE_TAG: *arm_test-base
328 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
332 # x86 image with ARM64 rootfs for baremetal testing.
337 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
342 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
347 # Native Windows docker builds
349 # Unlike the above Linux-based builds - including MinGW/SCons builds which
350 # cross-compile for Windows - which use the freedesktop ci-templates, we
351 # cannot use the same scheme here. As Windows lacks support for
352 # Docker-in-Docker, and Podman does not run natively on Windows, we have
353 # to open-code much of the same ourselves.
355 # This is achieved by first running in a native Windows shell instance
356 # (host PowerShell) in the container stage to build and push the image,
357 # then in the build stage by executing inside Docker.
359 .windows-docker-vs2019:
361 WINDOWS_TAG: "2020-05-05-llvm"
362 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
363 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
365 windows_build_vs2019:
368 - .windows-docker-vs2019
369 stage: container+docs
371 GIT_STRATEGY: fetch # we do actually need the full repository though
372 timeout: 4h # LLVM takes ages
379 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
381 .use-windows_build_vs2019:
382 extends: .windows-docker-vs2019
383 image: "$WINDOWS_IMAGE"
385 - windows_build_vs2019
389 # Shared between windows and Linux
391 extends: .ci-run-policy
393 name: "mesa_${CI_JOB_NAME}"
396 - _build/meson-logs/*.txt
403 extends: .build-common
405 CCACHE_COMPILERCHECK: "content"
406 CCACHE_COMPRESS: "true"
407 CCACHE_DIR: /cache/mesa/ccache
408 # Use ccache transparently, and print stats before/after
410 - export PATH="/usr/lib/ccache:$PATH"
411 - export CCACHE_BASEDIR="$PWD"
412 - ccache --show-stats
414 - ccache --show-stats
417 extends: .build-common
426 - subprojects/packagecache
436 - .gitlab-ci/meson-build.sh
446 - .gitlab-ci/scons-build.sh
458 -D platforms=x11,drm,surfaceless
461 GALLIUM_DRIVERS: "swrast,virgl"
463 BUILDTYPE: "debugoptimized"
467 - .gitlab-ci/meson-build.sh
468 - .gitlab-ci/prepare-artifacts.sh
471 extends: .meson-build
478 -D platforms=x11,wayland,drm,surfaceless
481 -D gallium-extra-hud=true
482 -D gallium-vdpau=enabled
483 -D gallium-xvmc=enabled
484 -D gallium-omx=bellagio
485 -D gallium-va=enabled
486 -D gallium-xa=enabled
488 -D gallium-opencl=disabled
489 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
494 - .gitlab-ci/meson-build.sh
495 - .gitlab-ci/run-shader-db.sh
498 extends: .meson-build
505 -D platforms=x11,wayland,drm,surfaceless
521 -D platforms=surfaceless
525 -D gallium-vdpau=disabled
526 -D gallium-xvmc=disabled
527 -D gallium-omx=disabled
528 -D gallium-va=disabled
529 -D gallium-xa=disabled
530 -D gallium-nine=false
538 VULKAN_DRIVERS: freedreno
539 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
540 BUILDTYPE: "debugoptimized"
554 - .gitlab-ci/meson-build.sh
555 - .gitlab-ci/prepare-artifacts.sh
562 VULKAN_DRIVERS: "freedreno"
566 - .gitlab-ci/meson-build.sh
567 - .gitlab-ci/prepare-artifacts.sh
569 meson-arm64-build-test:
574 VULKAN_DRIVERS: "amd"
576 - .gitlab-ci/meson-build.sh
579 extends: .meson-build
585 GALLIUM_DRIVERS: "auto"
586 VULKAN_DRIVERS: intel,amd,freedreno
588 CXX: "ccache clang++-9"
590 meson-windows-vs2019:
593 - .use-windows_build_vs2019
596 - . .\.gitlab-ci\windows\mesa_build.ps1
599 extends: .scons-build
601 SCONS_TARGET: platform=windows machine=x86_64 debug=1
602 SCONS_CHECK_COMMAND: "true"
606 extends: .meson-build
613 GALLIUM_DRIVERS: "r600,radeonsi"
616 -D gallium-vdpau=disabled
617 -D gallium-xvmc=disabled
618 -D gallium-omx=disabled
619 -D gallium-va=disabled
620 -D gallium-xa=disabled
621 -D gallium-nine=false
622 -D gallium-opencl=icd
624 - .gitlab-ci/meson-build.sh
625 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
627 meson-clover-old-llvm:
637 -D platforms=drm,surfaceless
638 GALLIUM_DRIVERS: "i915,r600"
640 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
641 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
642 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
643 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
644 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
647 extends: .meson-build
654 -D platforms=x11,wayland,drm
658 -D gallium-vdpau=disabled
659 -D gallium-xvmc=disabled
660 -D gallium-omx=disabled
661 -D gallium-va=disabled
662 -D gallium-xa=disabled
663 -D gallium-nine=false
664 -D gallium-opencl=disabled
665 -D b_sanitize=undefined
666 -D c_args=-fno-sanitize-recover=all
667 -D cpp_args=-fno-sanitize-recover=all
668 UBSAN_OPTIONS: "print_stacktrace=1"
669 VULKAN_DRIVERS: intel,amd,freedreno
671 -D vulkan-overlay-layer=true
680 VULKAN_DRIVERS: intel,amd
681 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
683 -D vulkan-overlay-layer=true
696 GALLIUM_DRIVERS: "swrast"
705 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
706 VULKAN_DRIVERS: "amd"
708 meson-mingw32-x86_64:
709 extends: .meson-build
714 GALLIUM_DRIVERS: "swrast"
718 --cross-file=.gitlab-ci/x86_64-w64-mingw32
724 GIT_STRATEGY: none # testing doesn't build anything from source
726 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
728 - tar -xf artifacts/install.tar
729 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
732 name: "mesa_${CI_JOB_NAME}"
741 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
756 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
772 name: "mesa_${CI_JOB_NAME}"
776 LIBGL_ALWAYS_SOFTWARE: 1
779 - install/piglit/run.sh
782 extends: .piglit-test
787 --process-isolation false
790 -x egl_ext_platform_device
791 -x ext_timer_query@time-elapsed
792 -x glx-multithread-clearbuffer
793 -x glx-multithread-shader-compile
796 PIGLIT_PROFILES: quick_gl
799 extends: .piglit-test
803 PIGLIT_PROFILES: glslparser
806 extends: .piglit-test
810 PIGLIT_PROFILES: quick_shader
814 DEQP_SKIPS: deqp-default-skips.txt
816 - ./install/deqp-runner.sh
833 - ./install/fossilize-runner.sh
836 name: "mesa_${CI_JOB_NAME}"
845 # Don't use threads inside llvmpipe, we've already got all 4 cores
846 # busy with DEQP_PARALLEL.
848 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
849 LIBGL_ALWAYS_SOFTWARE: "true"
850 DEQP_EXPECTED_RENDERER: llvmpipe
860 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
861 DEQP_SKIPS: deqp-softpipe-skips.txt
862 GALLIUM_DRIVER: "softpipe"
863 DEQP_EXPECTED_RENDERER: softpipe
869 extends: softpipe-gles2
875 extends: softpipe-gles2
882 DEQP_NO_SAVE_RESULTS: 1
883 # Don't use threads inside llvmpipe, we've already got all 4 cores
884 # busy with DEQP_PARALLEL.
886 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
887 DEQP_OPTIONS: "--deqp-log-images=disable"
888 LIBGL_ALWAYS_SOFTWARE: "true"
889 GALLIUM_DRIVER: "virpipe"
890 DEQP_EXPECTED_RENDERER: virgl
899 DEQP_RUNNER_OPTIONS: "--timeout 180"
900 extends: virgl-gles2-on-gl
906 MESA_GLES_VERSION_OVERRIDE: "3.1"
907 MESA_GLSL_VERSION_OVERRIDE: "310"
908 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
909 extends: virgl-gles3-on-gl
914 extends: virgl-gles2-on-gl
919 extends: virgl-gles2-on-gl
924 extends: virgl-gles2-on-gl
926 # Rules for tests that should not be present in MRs or the main
927 # project's pipeline (don't block marge or report red on
928 # mesa/mesamaster) but should be present on pipelines in personal
929 # branches (so you can opt in to running the flaky test when you want
933 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
942 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
950 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
955 virgl-gles31-on-gles:
958 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
967 BM_KERNEL: /lava-files/cheza-kernel
968 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
969 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
970 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
972 DEQP_EXPECTED_RENDERER: FD630
973 DEQP_NO_SAVE_RESULTS: ""
975 - google-freedreno-cheza
977 - ./install/bare-metal/cros-servo.sh
980 extends: arm64_a630_gles2
983 # gles31 is about 12 minutes with validation enabled.
987 extends: arm64_a630_gles2
990 # gles3 is about 15 minutes with validation enabled.
993 # We almost always manage to lower UBOs back to constant uploads in
994 # the test suite, so get a little testing for it here.
996 extends: arm64_a630_gles31
999 IR3_SHADER_DEBUG: nouboopt
1000 DEQP_CASELIST_FILTER: "functional.*ubo"
1002 # The driver does some guessing as to whether to render using gmem
1003 # or bypass, and some GLES3.1 features interact with either one.
1004 # Do a little testing with gmem and bypass forced.
1006 extends: arm64_a630_gles31
1010 FD_MESA_DEBUG: nogmem
1011 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1017 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
1018 DEVICE_NAME: "freedreno-a630"
1019 TRACIE_NO_UNIT_TESTS: 1
1020 # This lets us run several more traces which don't use any features we're
1022 MESA_GLSL_VERSION_OVERRIDE: "460"
1023 MESA_GL_VERSION_OVERRIDE: "4.6"
1025 # Along with checking gmem path, check that we don't get obvious nir
1026 # validation failures (though it's too expensive to have it on for the
1029 extends: arm64_a630_gles31
1033 FD_MESA_DEBUG: nobypass
1037 extends: arm64_a630_gles2
1042 VK_DRIVER: freedreno
1043 # Force binning in the main run, which makes sure we render at
1044 # least 2 bins. This is the path that impacts the most different
1045 # features. However, we end up with flaky results in
1046 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1049 # Do a separate sysmem pass over the testcases that really affect sysmem
1050 # rendering. This is currently very flaky, leave it as an option for devs
1051 # to click play on in their branches.
1052 arm64_a630_vk_sysmem:
1058 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1059 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1069 name: "mesa_${CI_JOB_NAME}"
1080 BM_KERNEL: /lava-files/Image.gz
1081 BM_DTB: /lava-files/apq8016-sbc.dtb
1082 BM_ROOTFS: /lava-files/rootfs-arm64
1083 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1084 FLAKES_CHANNEL: "#freedreno-ci"
1085 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1086 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1087 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1090 DEQP_EXPECTED_RENDERER: FD307
1091 # Since we can't get artifacts back yet, skip making them.
1092 DEQP_NO_SAVE_RESULTS: 1
1093 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1095 - ./install/bare-metal/fastboot.sh
1102 - google-freedreno-db410c
1104 # Fractional run, single threaded, due to flaky results
1115 # Fractional runs with debug options. Note that since we're not
1116 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1117 arm64_a306_gles3_options:
1118 extends: arm64_a306_gles2
1122 # Check that the non-constbuf UBO case works.
1123 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1129 BM_KERNEL: /lava-files/db820c-kernel
1130 BM_DTB: /lava-files/db820c.dtb
1131 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1132 # current upstream kernel.
1133 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1134 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1135 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1136 DEQP_EXPECTED_RENDERER: FD530
1139 - google-freedreno-db820c
1160 extends: .radv-rules
1164 ACO_DEBUG: validateir,validatera
1166 # Can only be triggered manually on personal branches because RADV is the only
1167 # driver that does Vulkan testing at the moment.
1168 radv_polaris10_vkcts:
1174 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1184 - export RADV_FORCE_FAMILY="pitcairn"
1185 - ./install/fossilize-runner.sh
1187 - export RADV_FORCE_FAMILY="bonaire"
1188 - ./install/fossilize-runner.sh
1190 - export RADV_FORCE_FAMILY="polaris10"
1191 - ./install/fossilize-runner.sh
1193 - export RADV_FORCE_FAMILY="gfx900"
1194 - ./install/fossilize-runner.sh
1196 - export RADV_FORCE_FAMILY="gfx1010"
1197 - ./install/fossilize-runner.sh
1211 - ./install/tracie-runner-gl.sh
1218 - ./install/tracie-runner-vk.sh
1225 LIBGL_ALWAYS_SOFTWARE: "true"
1226 GALLIUM_DRIVER: "llvmpipe"
1227 DEVICE_NAME: "gl-vmware-llvmpipe"
1229 radv-polaris10-traces:
1235 DEVICE_NAME: "vk-amd-polaris10"
1244 LIBGL_ALWAYS_SOFTWARE: "true"
1245 GALLIUM_DRIVER: "virpipe"
1246 DEVICE_NAME: "gl-virgl"
1247 MESA_GLES_VERSION_OVERRIDE: "3.1"
1248 MESA_GLSL_VERSION_OVERRIDE: "310"