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'
31 - apk --no-cache add py3-pip
32 - pip3 install sphinx sphinx_rtd_theme
33 - sphinx-build -b html docs public
57 # When to automatically run the CI
60 # If any files affecting the pipeline are changed, build/test jobs run
61 # automatically once all dependency jobs have passed
65 - bin/install_megadrivers.py
66 - bin/meson_get_version.py
67 - bin/symbols-check.py
83 # Otherwise, build/test jobs won't run
88 - runner_system_failure
89 # Cancel CI run if a newer commit is pushed to the same branch
94 image: debian:stable-slim
103 - echo "Dummy job to make sure every merge request pipeline runs at least one job"
108 name: "mesa_${CI_JOB_NAME}"
112 # Watch out! Artifacts are relative to the build dir.
113 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
116 # Build the CI docker images.
118 # FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
119 # image doesn't exist yet, the container stage job generates it.
121 # In order to generate a new image, one should generally change the tag.
122 # While removing the image from the registry would also work, that's not
123 # recommended except for ephemeral images during development: Replacing
124 # an image after a significant amount of time might pull in newer
125 # versions of gcc/clang or other packages, which might break the build
126 # with older commits using the same tag.
128 # After merging a change resulting in generating a new image to the
129 # main repository, it's recommended to remove the image from the source
130 # repository's container registry, so that the image from the main
131 # repository's registry will be used there as well.
138 # Run pipeline by default in the main project if any CI pipeline
139 # configuration files were changed, to ensure docker images are up to date
140 - if: '$CI_PROJECT_PATH == "mesa/mesa"'
145 # Run pipeline by default if it was triggered by Marge Bot, is for a
146 # merge request, and any files affecting the pipeline were changed
147 - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
151 # Run pipeline by default in the main project if it was not triggered by
152 # Marge Bot, and any files affecting the pipeline were changed
153 - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
157 # Allow triggering jobs manually in other cases if any files affecting the
158 # pipeline were changed
162 # Otherwise, container jobs won't run
165 FDO_DISTRIBUTION_VERSION: buster-slim
166 FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
167 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
168 # no need to pull the whole repo to build the container image
171 # Debian 10 based x86 build image base
174 - .fdo.container-build@debian
177 FDO_DISTRIBUTION_TAG: &x86_build-base "2020-06-12"
185 BASE_TAG: *x86_build-base
186 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
190 # Debian 10 based x86 main build image
193 - .use-x86_build-base
195 FDO_DISTRIBUTION_TAG: &x86_build "2020-06-02"
200 image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
205 # Debian 10 based i386 cross-build image
208 - .use-x86_build-base
210 FDO_DISTRIBUTION_TAG: &i386_build "2020-06-02"
215 image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
220 # Debian 10 based ppc64el cross-build image
223 - .use-x86_build-base
225 FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-06-02"
230 image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
235 # Debian 10 based s390x cross-build image
238 - .use-x86_build-base
240 FDO_DISTRIBUTION_TAG: &s390x_build "2020-06-02"
245 image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
250 # Debian 10 based x86 test image base
252 extends: x86_build-base
254 FDO_DISTRIBUTION_TAG: &x86_test-base "2020-06-02"
262 BASE_TAG: *x86_test-base
263 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
267 # Debian 10 based x86 test image for GL
269 extends: .use-x86_test-base
271 FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-06-23-virgl"
273 # Debian 10 based x86 test image for VK
275 extends: .use-x86_test-base
277 FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-06-18-vkcts"
279 # Debian 9 based x86 build image (old LLVM)
281 extends: x86_build-base
283 FDO_DISTRIBUTION_TAG: &x86_build_old "2020-06-12"
284 FDO_DISTRIBUTION_VERSION: stretch-slim
289 image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
293 # Debian 10 based ARM build image
296 - .fdo.container-build@debian@arm64v8
299 FDO_DISTRIBUTION_TAG: &arm_build "2020-06-22-tracie"
304 image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
308 # Debian 10 based x86 baremetal image base
311 - .fdo.container-build@debian
314 FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-22-tracie"
322 BASE_TAG: *arm_test-base
323 FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
327 # x86 image with ARM64 rootfs for baremetal testing.
332 FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-25-kernelfix"
337 image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
342 # Native Windows docker builds
344 # Unlike the above Linux-based builds - including MinGW/SCons builds which
345 # cross-compile for Windows - which use the freedesktop ci-templates, we
346 # cannot use the same scheme here. As Windows lacks support for
347 # Docker-in-Docker, and Podman does not run natively on Windows, we have
348 # to open-code much of the same ourselves.
350 # This is achieved by first running in a native Windows shell instance
351 # (host PowerShell) in the container stage to build and push the image,
352 # then in the build stage by executing inside Docker.
354 .windows-docker-vs2019:
356 WINDOWS_TAG: "2020-05-05-llvm"
357 WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
358 WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
360 windows_build_vs2019:
363 - .windows-docker-vs2019
366 GIT_STRATEGY: fetch # we do actually need the full repository though
367 timeout: 4h # LLVM takes ages
374 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
376 .use-windows_build_vs2019:
377 extends: .windows-docker-vs2019
378 image: "$WINDOWS_IMAGE"
380 - windows_build_vs2019
384 # Shared between windows and Linux
386 extends: .ci-run-policy
388 name: "mesa_${CI_JOB_NAME}"
391 - _build/meson-logs/*.txt
398 extends: .build-common
400 CCACHE_COMPILERCHECK: "content"
401 CCACHE_COMPRESS: "true"
402 CCACHE_DIR: /cache/mesa/ccache
403 # Use ccache transparently, and print stats before/after
405 - export PATH="/usr/lib/ccache:$PATH"
406 - export CCACHE_BASEDIR="$PWD"
407 - ccache --show-stats
409 - ccache --show-stats
412 extends: .build-common
421 - subprojects/packagecache
431 - .gitlab-ci/meson-build.sh
441 - .gitlab-ci/scons-build.sh
453 -D platforms=x11,drm,surfaceless
456 GALLIUM_DRIVERS: "swrast,virgl"
458 BUILDTYPE: "debugoptimized"
462 - .gitlab-ci/meson-build.sh
463 - .gitlab-ci/prepare-artifacts.sh
466 extends: .meson-build
473 -D platforms=x11,wayland,drm,surfaceless
476 -D gallium-extra-hud=true
477 -D gallium-vdpau=enabled
478 -D gallium-xvmc=enabled
479 -D gallium-omx=bellagio
480 -D gallium-va=enabled
481 -D gallium-xa=enabled
483 -D gallium-opencl=disabled
484 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
489 - .gitlab-ci/meson-build.sh
490 - .gitlab-ci/run-shader-db.sh
493 extends: .meson-build
500 -D platforms=x11,wayland,drm,surfaceless
516 -D platforms=surfaceless
520 -D gallium-vdpau=disabled
521 -D gallium-xvmc=disabled
522 -D gallium-omx=disabled
523 -D gallium-va=disabled
524 -D gallium-xa=disabled
525 -D gallium-nine=false
533 VULKAN_DRIVERS: freedreno
534 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
535 BUILDTYPE: "debugoptimized"
549 - .gitlab-ci/meson-build.sh
550 - .gitlab-ci/prepare-artifacts.sh
557 VULKAN_DRIVERS: "freedreno"
561 - .gitlab-ci/meson-build.sh
562 - .gitlab-ci/prepare-artifacts.sh
564 meson-arm64-build-test:
569 VULKAN_DRIVERS: "amd"
571 - .gitlab-ci/meson-build.sh
574 extends: .meson-build
580 GALLIUM_DRIVERS: "auto"
581 VULKAN_DRIVERS: intel,amd,freedreno
583 CXX: "ccache clang++-9"
585 meson-windows-vs2019:
588 - .use-windows_build_vs2019
591 - . .\.gitlab-ci\windows\mesa_build.ps1
594 extends: .scons-build
596 SCONS_TARGET: platform=windows machine=x86_64 debug=1
597 SCONS_CHECK_COMMAND: "true"
601 extends: .meson-build
608 GALLIUM_DRIVERS: "r600,radeonsi"
611 -D gallium-vdpau=disabled
612 -D gallium-xvmc=disabled
613 -D gallium-omx=disabled
614 -D gallium-va=disabled
615 -D gallium-xa=disabled
616 -D gallium-nine=false
617 -D gallium-opencl=icd
619 - .gitlab-ci/meson-build.sh
620 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
622 meson-clover-old-llvm:
632 -D platforms=drm,surfaceless
633 GALLIUM_DRIVERS: "i915,r600"
635 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
636 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
637 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
638 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
639 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
642 extends: .meson-build
649 -D platforms=x11,wayland,drm
653 -D gallium-vdpau=disabled
654 -D gallium-xvmc=disabled
655 -D gallium-omx=disabled
656 -D gallium-va=disabled
657 -D gallium-xa=disabled
658 -D gallium-nine=false
659 -D gallium-opencl=disabled
660 -D b_sanitize=undefined
661 -D c_args=-fno-sanitize-recover=all
662 -D cpp_args=-fno-sanitize-recover=all
663 UBSAN_OPTIONS: "print_stacktrace=1"
664 VULKAN_DRIVERS: intel,amd,freedreno
666 -D vulkan-overlay-layer=true
675 VULKAN_DRIVERS: intel,amd
676 GALLIUM_DRIVERS: "iris,r300,radeonsi,swrast,virgl"
678 -D vulkan-overlay-layer=true
691 GALLIUM_DRIVERS: "swrast"
700 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl"
701 VULKAN_DRIVERS: "amd"
703 meson-mingw32-x86_64:
704 extends: .meson-build
709 GALLIUM_DRIVERS: "swrast"
713 --cross-file=.gitlab-ci/x86_64-w64-mingw32
719 GIT_STRATEGY: none # testing doesn't build anything from source
721 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
723 - tar -xf artifacts/install.tar
724 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
727 name: "mesa_${CI_JOB_NAME}"
736 image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
751 image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
767 name: "mesa_${CI_JOB_NAME}"
771 LIBGL_ALWAYS_SOFTWARE: 1
774 - install/piglit/run.sh
777 extends: .piglit-test
782 --process-isolation false
785 -x egl_ext_platform_device
786 -x ext_timer_query@time-elapsed
787 -x glx-multithread-clearbuffer
788 -x glx-multithread-shader-compile
791 PIGLIT_PROFILES: quick_gl
794 extends: .piglit-test
798 PIGLIT_PROFILES: glslparser
801 extends: .piglit-test
805 PIGLIT_PROFILES: quick_shader
809 DEQP_SKIPS: deqp-default-skips.txt
811 - ./install/deqp-runner.sh
828 - ./install/fossilize-runner.sh
831 name: "mesa_${CI_JOB_NAME}"
840 # Don't use threads inside llvmpipe, we've already got all 4 cores
841 # busy with DEQP_PARALLEL.
843 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
844 LIBGL_ALWAYS_SOFTWARE: "true"
845 DEQP_EXPECTED_RENDERER: llvmpipe
855 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
856 DEQP_SKIPS: deqp-softpipe-skips.txt
857 GALLIUM_DRIVER: "softpipe"
858 DEQP_EXPECTED_RENDERER: softpipe
864 extends: softpipe-gles2
870 extends: softpipe-gles2
877 DEQP_NO_SAVE_RESULTS: 1
878 # Don't use threads inside llvmpipe, we've already got all 4 cores
879 # busy with DEQP_PARALLEL.
881 DEQP_EXPECTED_FAILS: deqp-virgl-gl-fails.txt
882 DEQP_OPTIONS: "--deqp-log-images=disable"
883 LIBGL_ALWAYS_SOFTWARE: "true"
884 GALLIUM_DRIVER: "virpipe"
885 DEQP_EXPECTED_RENDERER: virgl
894 DEQP_RUNNER_OPTIONS: "--timeout 180"
895 extends: virgl-gles2-on-gl
901 MESA_GLES_VERSION_OVERRIDE: "3.1"
902 MESA_GLSL_VERSION_OVERRIDE: "310"
903 MESA_EXTENSION_OVERRIDE: "-GL_OES_tessellation_shader"
904 extends: virgl-gles3-on-gl
909 extends: virgl-gles2-on-gl
914 extends: virgl-gles2-on-gl
919 extends: virgl-gles2-on-gl
921 # Rules for tests that should not be present in MRs or the main
922 # project's pipeline (don't block marge or report red on
923 # mesa/mesamaster) but should be present on pipelines in personal
924 # branches (so you can opt in to running the flaky test when you want
928 - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
937 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
945 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
950 virgl-gles31-on-gles:
953 DEQP_EXPECTED_FAILS: deqp-virgl-gles-fails.txt
962 BM_KERNEL: /lava-files/cheza-kernel
963 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init"
964 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
965 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
967 DEQP_EXPECTED_RENDERER: FD630
968 DEQP_NO_SAVE_RESULTS: ""
970 - google-freedreno-cheza
972 - ./install/bare-metal/cros-servo.sh
975 extends: arm64_a630_gles2
978 # gles31 is about 12 minutes with validation enabled.
982 extends: arm64_a630_gles2
985 # gles3 is about 15 minutes with validation enabled.
988 # We almost always manage to lower UBOs back to constant uploads in
989 # the test suite, so get a little testing for it here.
991 extends: arm64_a630_gles31
994 IR3_SHADER_DEBUG: nouboopt
995 DEQP_CASELIST_FILTER: "functional.*ubo"
997 # The driver does some guessing as to whether to render using gmem
998 # or bypass, and some GLES3.1 features interact with either one.
999 # Do a little testing with gmem and bypass forced.
1001 extends: arm64_a630_gles31
1005 FD_MESA_DEBUG: nogmem
1006 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1012 BARE_METAL_TEST_SCRIPT: "/install/tracie-runner-gl.sh"
1013 DEVICE_NAME: "freedreno-a630"
1014 TRACIE_NO_UNIT_TESTS: 1
1015 # This lets us run several more traces which don't use any features we're
1017 MESA_GLSL_VERSION_OVERRIDE: "460"
1018 MESA_GL_VERSION_OVERRIDE: "4.6"
1020 # Along with checking gmem path, check that we don't get obvious nir
1021 # validation failures (though it's too expensive to have it on for the
1024 extends: arm64_a630_gles31
1028 FD_MESA_DEBUG: nobypass
1032 extends: arm64_a630_gles2
1037 VK_DRIVER: freedreno
1038 # Force binning in the main run, which makes sure we render at
1039 # least 2 bins. This is the path that impacts the most different
1040 # features. However, we end up with flaky results in
1041 # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex.
1044 # Do a separate sysmem pass over the testcases that really affect sysmem
1045 # rendering. This is currently very flaky, leave it as an option for devs
1046 # to click play on in their branches.
1047 arm64_a630_vk_sysmem:
1053 DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*"
1054 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-bypass-fails.txt
1064 name: "mesa_${CI_JOB_NAME}"
1075 BM_KERNEL: /lava-files/Image.gz
1076 BM_DTB: /lava-files/apq8016-sbc.dtb
1077 BM_ROOTFS: /lava-files/rootfs-arm64
1078 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8"
1079 FLAKES_CHANNEL: "#freedreno-ci"
1080 BARE_METAL_TEST_SCRIPT: "/install/deqp-runner.sh"
1081 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
1082 DEQP_SKIPS: deqp-freedreno-a307-skips.txt
1085 DEQP_EXPECTED_RENDERER: FD307
1086 # Since we can't get artifacts back yet, skip making them.
1087 DEQP_NO_SAVE_RESULTS: 1
1088 # NIR_VALIDATE=0 left intentionally unset as a3xx is fast enough at its small testsuite.
1090 - ./install/bare-metal/fastboot.sh
1097 - google-freedreno-db410c
1099 # Fractional run, single threaded, due to flaky results
1110 # Fractional runs with debug options. Note that since we're not
1111 # hitting the iommu faults, we can run in parallel (derive from gles2, not gles3).
1112 arm64_a306_gles3_options:
1113 extends: arm64_a306_gles2
1117 # Check that the non-constbuf UBO case works.
1118 - DEQP_RUN_SUFFIX=-nouboopt IR3_SHADER_DEBUG=nouboopt DEQP_CASELIST_FILTER="functional.*ubo" ./install/bare-metal/fastboot.sh
1124 BM_KERNEL: /lava-files/db820c-kernel
1125 BM_DTB: /lava-files/db820c.dtb
1126 # Disable SMP because only CPU 0 is at a freq higher than 19mhz on
1127 # current upstream kernel.
1128 BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 nosmp"
1129 DEQP_EXPECTED_FAILS: deqp-freedreno-a530-fails.txt
1130 DEQP_SKIPS: deqp-freedreno-a530-skips.txt
1131 DEQP_EXPECTED_RENDERER: FD530
1134 - google-freedreno-db820c
1155 extends: .radv-rules
1159 ACO_DEBUG: validateir,validatera
1161 # Can only be triggered manually on personal branches because RADV is the only
1162 # driver that does Vulkan testing at the moment.
1163 radv_polaris10_vkcts:
1169 DEQP_SKIPS: deqp-radv-polaris10-skips.txt
1179 - export RADV_FORCE_FAMILY="pitcairn"
1180 - ./install/fossilize-runner.sh
1182 - export RADV_FORCE_FAMILY="bonaire"
1183 - ./install/fossilize-runner.sh
1185 - export RADV_FORCE_FAMILY="polaris10"
1186 - ./install/fossilize-runner.sh
1188 - export RADV_FORCE_FAMILY="gfx900"
1189 - ./install/fossilize-runner.sh
1191 - export RADV_FORCE_FAMILY="gfx1010"
1192 - ./install/fossilize-runner.sh
1206 - ./install/tracie-runner-gl.sh
1213 - ./install/tracie-runner-vk.sh
1220 LIBGL_ALWAYS_SOFTWARE: "true"
1221 GALLIUM_DRIVER: "llvmpipe"
1222 DEVICE_NAME: "gl-vmware-llvmpipe"
1224 radv-polaris10-traces:
1230 DEVICE_NAME: "vk-amd-polaris10"
1239 LIBGL_ALWAYS_SOFTWARE: "true"
1240 GALLIUM_DRIVER: "virpipe"
1241 DEVICE_NAME: "gl-virgl"
1242 MESA_GLES_VERSION_OVERRIDE: "3.1"
1243 MESA_GLSL_VERSION_OVERRIDE: "310"