+ # Cancel CI run if a newer commit is pushed to the same branch
+ interruptible: true
+
+.ci-deqp-artifacts:
+ artifacts:
+ when: always
+ untracked: false
+ paths:
+ # Watch out! Artifacts are relative to the build dir.
+ # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
+ - artifacts
+
+# Build the "normal" (non-LAVA) CI docker images.
+#
+# DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
+# image doesn't exist yet, the container stage job generates it.
+#
+# In order to generate a new image, one should generally change the tag.
+# While removing the image from the registry would also work, that's not
+# recommended except for ephemeral images during development: Replacing
+# an image after a significant amount of time might pull in newer
+# versions of gcc/clang or other packages, which might break the build
+# with older commits using the same tag.
+#
+# After merging a change resulting in generating a new image to the
+# main repository, it's recommended to remove the image from the source
+# repository's container registry, so that the image from the main
+# repository's registry will be used there as well.
+
+.container:
+ stage: container
+ extends:
+ - .ci-run-policy
+ variables:
+ DEBIAN_VERSION: buster-slim
+ REPO_SUFFIX: $CI_JOB_NAME
+ DEBIAN_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
+ # no need to pull the whole repo to build the container image
+ GIT_STRATEGY: none
+
+# Debian 10 based x86 build image
+x86_build:
+ extends:
+ - .debian@container-ifnot-exists
+ - .container
+ variables:
+ DEBIAN_TAG: &x86_build "2019-11-13"
+
+.use-x86_build:
+ variables:
+ TAG: *x86_build
+ image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
+ needs:
+ - x86_build
+
+# Debian 10 based x86 test image
+x86_test:
+ extends: x86_build
+ variables:
+ DEBIAN_TAG: &x86_test "2019-11-15"
+
+# Debian 9 based x86 build image (old LLVM)
+x86_build_old:
+ extends: x86_build
+ variables:
+ DEBIAN_TAG: &x86_build_old "2019-09-18"
+ DEBIAN_VERSION: stretch-slim
+
+.use-x86_build_old:
+ variables:
+ TAG: *x86_build_old
+ image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
+ needs:
+ - x86_build_old
+
+# Debian 10 based ARM build image
+arm_build:
+ extends:
+ - .debian@container-ifnot-exists@arm64v8
+ - .container
+ variables:
+ DEBIAN_TAG: &arm_build "2019-11-13"