3 # do not duplicate pipelines on merge pipelines
4 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" && $GITLAB_USER_LOGIN == "marge-bot"
7 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
9 MESA_CI_PERFORMANCE_ENABLED: 1
10 VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
12 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
15 VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
17 - if: $GITLAB_USER_LOGIN != "marge-bot"
20 VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
24 FDO_UPSTREAM_REPO: mesa/mesa
25 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
26 CI_PRE_CLONE_SCRIPT: |-
28 wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
29 bash download-git-cache.sh
30 rm download-git-cache.sh
32 CI_JOB_JWT_FILE: /minio_jwt
33 S3_HOST: s3.freedesktop.org
34 # per-pipeline artifact storage on MinIO
35 PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
36 # per-job artifact storage on MinIO
37 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
38 KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/${KERNEL_TAG}
39 # reference images stored for traces
40 PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
41 # For individual CI farm status see .ci-farms folder
42 # Disable farm with `git mv .ci-farms{,-disabled}/$farm_name`
43 # Re-enable farm with `git mv .ci-farms{-disabled,}/$farm_name`
44 # NEVER MIX FARM MAINTENANCE WITH ANY OTHER CHANGE IN THE SAME MERGE REQUEST!
49 export SCRIPTS_DIR=$(mktemp -d) &&
50 curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
51 . ${SCRIPTS_DIR}/setup-test-env.sh &&
52 echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
53 unset CI_JOB_JWT # Unsetting vulnerable env variables
56 # Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
57 - find -name '*.log' -exec mv {} {}.txt \;
62 test -e "${CI_JOB_JWT_FILE}" &&
63 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
64 rm "${CI_JOB_JWT_FILE}"
66 # Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
67 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
70 # Ignore runner_unsupported, stale_schedule, archived_failure, or
74 - runner_system_failure
76 - job_execution_timeout
78 - data_integrity_failure
82 - project: 'freedesktop/ci-templates'
83 ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
85 - '/templates/ci-fairy.yml'
86 - project: 'freedesktop/ci-templates'
87 ref: *ci-templates-commit
89 - '/templates/alpine.yml'
90 - '/templates/debian.yml'
91 - '/templates/fedora.yml'
92 - local: '.gitlab-ci/image-tags.yml'
93 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
94 - local: '.gitlab-ci/container/gitlab-ci.yml'
95 - local: '.gitlab-ci/build/gitlab-ci.yml'
96 - local: '.gitlab-ci/test/gitlab-ci.yml'
97 - local: '.gitlab-ci/farm-rules.yml'
98 - local: '.gitlab-ci/test-source-dep.yml'
99 - local: 'docs/gitlab-ci.yml'
100 - local: 'src/amd/ci/gitlab-ci.yml'
101 - local: 'src/broadcom/ci/gitlab-ci.yml'
102 - local: 'src/etnaviv/ci/gitlab-ci.yml'
103 - local: 'src/freedreno/ci/gitlab-ci.yml'
104 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
105 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
106 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
107 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
108 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
109 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
110 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
111 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
112 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
113 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
114 - local: 'src/intel/ci/gitlab-ci.yml'
115 - local: 'src/microsoft/ci/gitlab-ci.yml'
116 - local: 'src/panfrost/ci/gitlab-ci.yml'
117 - local: 'src/virtio/ci/gitlab-ci.yml'
138 # YAML anchors for rule conditions
139 # --------------------------------
142 # Post-merge pipeline
143 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
145 # Post-merge pipeline, not for Marge Bot
146 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
149 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
151 # Pre-merge pipeline for Marge Bot
152 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
156 # When to automatically run the CI for build jobs
159 # If any files affecting the pipeline are changed, build/test jobs run
160 # automatically once all dependency jobs have passed
161 - changes: &all_paths
163 - bin/git_sha1_gen.py
164 - bin/install_megadrivers.py
165 - bin/symbols-check.py
178 # Otherwise, build/test jobs won't run because no rule matched.
183 name: "mesa_${CI_JOB_NAME}"
187 # Watch out! Artifacts are relative to the build dir.
188 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
190 - _build/meson-logs/*.txt
191 - _build/meson-logs/strace
195 # Run pipeline by default in the main project if any CI pipeline
196 # configuration files were changed, to ensure docker images are up to date
202 # Run pipeline by default if it was triggered by Marge Bot, is for a
203 # merge request, and any files affecting the pipeline were changed
204 - if: *is-pre-merge-for-marge
208 # Run pipeline by default in the main project if it was not triggered by
209 # Marge Bot, and any files affecting the pipeline were changed
210 - if: *is-post-merge-not-for-marge
214 # Allow triggering jobs manually in other cases if any files affecting the
215 # pipeline were changed
219 # Otherwise, container jobs won't run because no rule matched.
228 - !reference [.scheduled_pipeline-rules, rules]
229 # ensure we are running on packet
233 # Compactify the .git directory
234 - git gc --aggressive
235 # Download & cache the perfetto subproject as well.
236 - rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
237 # compress the current folder
238 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
240 - 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
243 # Sanity checks of MR settings and commit logs
251 # Other cases default to never
255 # ci-fairy check-commits --junit-xml=check-commits.xml
256 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
263 # Jobs that need to pass before spending hardware resources on further testing
264 .required-for-hardware-jobs: