2 DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa
3 DRM_CI_COMMIT_SHA: &drm-ci-commit-sha edfbf74df1d4d6ce54ffe24566108be0e1a98c3d
5 UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
6 TARGET_BRANCH: drm-next
8 IGT_VERSION: d2af13d9f5be5ce23d996e4afd3e45990f5ab977
10 DEQP_RUNNER_GIT_URL: https://gitlab.freedesktop.org/anholt/deqp-runner.git
11 DEQP_RUNNER_GIT_TAG: v0.15.0
13 FDO_UPSTREAM_REPO: helen.fornazier/linux # The repo where the git-archive daily runs
14 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
15 DRM_CI_PROJECT_URL: https://gitlab.freedesktop.org/${DRM_CI_PROJECT_PATH}
16 CI_PRE_CLONE_SCRIPT: |-
18 curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s ${DRM_CI_PROJECT_URL}/-/raw/${DRM_CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh -o download-git-cache.sh
19 bash download-git-cache.sh
20 rm download-git-cache.sh
22 S3_HOST: s3.freedesktop.org
23 # per-pipeline artifact storage on MinIO
24 PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
25 # per-job artifact storage on MinIO
26 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
27 # default kernel for rootfs before injecting the current kernel tree
28 KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/v6.4.12-for-mesa-ci-f6b4ad45f48d
29 LAVA_TAGS: subset-1-gfx
34 - export SCRIPTS_DIR=$(mktemp -d)
35 - curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${DRM_CI_PROJECT_URL}/-/raw/${DRM_CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh"
36 - source ${SCRIPTS_DIR}/setup-test-env.sh
37 - echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
38 - export CI_JOB_JWT_FILE="${CI_JOB_JWT_FILE:-$(mktemp)}"
39 - echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
41 - echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
43 - echo -e "\e[0Ksection_start:$(date +%s):drm_ci_download_section[collapsed=true]\r\e[0KDownloading mesa from $DRM_CI_PROJECT_URL/-/archive/$DRM_CI_COMMIT_SHA/mesa-$DRM_CI_COMMIT_SHA.tar.gz"
45 - curl --output - $DRM_CI_PROJECT_URL/-/archive/$DRM_CI_COMMIT_SHA/mesa-$DRM_CI_COMMIT_SHA.tar.gz | tar -xz
46 - mv mesa-$DRM_CI_COMMIT_SHA/.gitlab-ci* .
47 - rm -rf mesa-$DRM_CI_COMMIT_SHA/
48 - echo -e "\e[0Ksection_end:$(date +%s):drm_ci_download_section\r\e[0K"
54 test -e "${CI_JOB_JWT_FILE}" &&
55 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
56 rm "${CI_JOB_JWT_FILE}"
59 - project: 'freedesktop/ci-templates'
60 ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
62 - '/templates/ci-fairy.yml'
63 - project: 'freedesktop/ci-templates'
64 ref: *ci-templates-commit
66 - '/templates/alpine.yml'
67 - '/templates/debian.yml'
68 - '/templates/fedora.yml'
69 - project: *drm-ci-project-path
70 ref: *drm-ci-commit-sha
72 - '/.gitlab-ci/farm-rules.yml'
73 - '/.gitlab-ci/test-source-dep.yml'
74 - '/.gitlab-ci/container/gitlab-ci.yml'
75 - '/.gitlab-ci/test/gitlab-ci.yml'
76 - '/.gitlab-ci/lava/lava-gitlab-ci.yml'
77 - '/src/microsoft/ci/gitlab-ci-inc.yml'
78 - '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'
79 - '/src/gallium/drivers/crocus/ci/gitlab-ci-inc.yml'
80 - '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'
81 - '/src/gallium/drivers/llvmpipe/ci/gitlab-ci-inc.yml'
82 - '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'
83 - '/src/gallium/drivers/nouveau/ci/gitlab-ci-inc.yml'
84 - '/src/gallium/frontends/lavapipe/ci/gitlab-ci-inc.yml'
85 - '/src/intel/ci/gitlab-ci-inc.yml'
86 - '/src/freedreno/ci/gitlab-ci-inc.yml'
87 - '/src/amd/ci/gitlab-ci-inc.yml'
88 - drivers/gpu/drm/ci/image-tags.yml
89 - drivers/gpu/drm/ci/container.yml
90 - drivers/gpu/drm/ci/static-checks.yml
91 - drivers/gpu/drm/ci/build.yml
92 - drivers/gpu/drm/ci/test.yml
93 - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
110 # YAML anchors for rule conditions
111 # --------------------------------
114 # Pipeline for forked project branch
115 - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
117 # Forked project branch / pre-merge pipeline not for Marge bot
118 - if: &is-forked-branch-or-pre-merge-not-for-marge '$CI_PROJECT_NAMESPACE != "mesa" || ($GITLAB_USER_LOGIN != "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event")'
120 # Pipeline runs for the main branch of the upstream Mesa project
121 - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
123 # Post-merge pipeline
124 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
126 # Post-merge pipeline, not for Marge Bot
127 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
130 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
132 # Pre-merge pipeline for Marge Bot
133 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
136 # Rule to filter for only scheduled pipelines.
137 .scheduled_pipeline-rules:
139 - if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
142 # Generic rule to not run the job during scheduled pipelines. Jobs that aren't
143 # something like a nightly run should include this rule.
144 .no_scheduled_pipelines-rules:
146 - if: *is-scheduled-pipeline
149 # When to automatically run the CI for build jobs
152 - !reference [.no_scheduled_pipelines-rules, rules]
153 # Run automatically once all dependency jobs have passed
156 # When to automatically run the CI for container jobs
157 .container+build-rules:
159 - !reference [.no_scheduled_pipelines-rules, rules]
164 name: "mesa_${CI_JOB_NAME}"
168 # Watch out! Artifacts are relative to the build dir.
169 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
171 - _build/meson-logs/*.txt
172 - _build/meson-logs/strace
177 - !reference [.no_scheduled_pipelines-rules, rules]
178 # Run pipeline by default in the main project if any CI pipeline
179 # configuration files were changed, to ensure docker images are up to date
182 - drivers/gpu/drm/ci/**/*
184 # Run pipeline by default if it was triggered by Marge Bot, is for a
185 # merge request, and any files affecting the pipeline were changed
186 - if: *is-pre-merge-for-marge
188 # Run pipeline by default in the main project if it was not triggered by
189 # Marge Bot, and any files affecting the pipeline were changed
190 - if: *is-post-merge-not-for-marge
192 # Allow triggering jobs manually in other cases
204 - !reference [.scheduled_pipeline-rules, rules]
205 # ensure we are running on packet
209 # Remove drm-ci files we just added
210 - rm -rf .gitlab-ci.*
212 # Compactify the .git directory
213 - git gc --aggressive
214 # compress the current folder
215 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
217 # login with the JWT token file
218 - ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
221 # Sanity checks of MR settings and commit logs
229 # Other cases default to never
233 # ci-fairy check-commits --junit-xml=check-commits.xml
234 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
240 # Rules for tests that should not block merging, but should be available to
241 # optionally run with the "play" button in the UI in pre-merge non-marge
242 # pipelines. This should appear in "extends:" after any includes of
243 # test-source-dep.yml rules, so that these rules replace those.
246 - !reference [.no_scheduled_pipelines-rules, rules]
247 - if: *is-forked-branch-or-pre-merge-not-for-marge
253 # Jobs that need to pass before spending hardware resources on further testing
254 .required-for-hardware-jobs: