3 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
5 MESA_CI_PERFORMANCE_ENABLED: 1
9 FDO_UPSTREAM_REPO: mesa/mesa
10 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
11 CI_PRE_CLONE_SCRIPT: |-
13 wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
14 bash download-git-cache.sh
15 rm download-git-cache.sh
17 CI_JOB_JWT_FILE: /minio_jwt
18 MINIO_HOST: s3.freedesktop.org
19 # per-pipeline artifact storage on MinIO
20 PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
21 # per-job artifact storage on MinIO
22 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
23 # reference images stored for traces
24 PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
25 # Individual CI farm status, set to "offline" to disable jobs
26 # running on a particular CI farm (ie. for outages, etc):
28 COLLABORA_FARM: "online"
29 MICROSOFT_FARM: "online"
34 AUSTRIANCODER_FARM: "online" # only etnaviv GPUs
39 export SCRIPTS_DIR=$(mktemp -d) &&
40 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" &&
41 chmod +x ${SCRIPTS_DIR}/setup-test-env.sh &&
42 . ${SCRIPTS_DIR}/setup-test-env.sh &&
43 echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
44 unset CI_JOB_JWT # Unsetting vulnerable env variables
50 test -e "${CI_JOB_JWT_FILE}" &&
51 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
52 rm "${CI_JOB_JWT_FILE}"
54 # Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
55 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
60 - project: 'freedesktop/ci-templates'
61 ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
63 - '/templates/ci-fairy.yml'
64 - project: 'freedesktop/ci-templates'
65 ref: *ci-templates-commit
67 - '/templates/alpine.yml'
68 - '/templates/debian.yml'
69 - '/templates/fedora.yml'
70 - local: '.gitlab-ci/image-tags.yml'
71 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
72 - local: '.gitlab-ci/container/gitlab-ci.yml'
73 - local: '.gitlab-ci/build/gitlab-ci.yml'
74 - local: '.gitlab-ci/test/gitlab-ci.yml'
75 - local: '.gitlab-ci/test-source-dep.yml'
76 - local: 'src/amd/ci/gitlab-ci.yml'
77 - local: 'src/broadcom/ci/gitlab-ci.yml'
78 - local: 'src/etnaviv/ci/gitlab-ci.yml'
79 - local: 'src/freedreno/ci/gitlab-ci.yml'
80 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
81 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
82 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
83 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
84 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
85 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
86 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
87 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
88 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
89 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
90 - local: 'src/intel/ci/gitlab-ci.yml'
91 - local: 'src/microsoft/ci/gitlab-ci.yml'
92 - local: 'src/panfrost/ci/gitlab-ci.yml'
93 - local: 'src/virtio/ci/gitlab-ci.yml'
114 # YAML anchors for rule conditions
115 # --------------------------------
118 # Pipeline for forked project branch
119 - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
121 # Forked project branch / pre-merge pipeline not for Marge bot
122 - 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")'
124 # Pipeline runs for the main branch of the upstream Mesa project
125 - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
127 # Post-merge pipeline
128 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
130 # Post-merge pipeline, not for Marge Bot
131 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
134 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
136 # Pre-merge pipeline for Marge Bot
137 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
148 expose_as: 'Documentation preview'
152 - apk --no-cache add graphviz doxygen
153 - pip3 install sphinx===5.1.1 breathe===4.34.0 mako===1.2.3 sphinx_rtd_theme===1.0.0
154 - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
155 - sphinx-build -W -b $BUILDER docs public
162 - !reference [.no_scheduled_pipelines-rules, rules]
168 # Other cases default to never
172 # Cancel job if a newer commit is pushed to the same branch
177 - !reference [.no_scheduled_pipelines-rules, rules]
178 - if: *is-forked-branch
181 # Other cases default to never
192 # Other cases default to never
196 # Cancel job if a newer commit is pushed to the same branch
201 - !reference [.scheduled_pipeline-rules, rules]
206 # When to automatically run the CI for build jobs
209 # If any files affecting the pipeline are changed, build/test jobs run
210 # automatically once all dependency jobs have passed
211 - changes: &all_paths
213 - bin/git_sha1_gen.py
214 - bin/install_megadrivers.py
215 - bin/symbols-check.py
227 # Otherwise, build/test jobs won't run because no rule matched.
232 name: "mesa_${CI_JOB_NAME}"
236 # Watch out! Artifacts are relative to the build dir.
237 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
239 - _build/meson-logs/*.txt
240 - _build/meson-logs/strace
244 # Run pipeline by default in the main project if any CI pipeline
245 # configuration files were changed, to ensure docker images are up to date
251 # Run pipeline by default if it was triggered by Marge Bot, is for a
252 # merge request, and any files affecting the pipeline were changed
253 - if: *is-pre-merge-for-marge
257 # Run pipeline by default in the main project if it was not triggered by
258 # Marge Bot, and any files affecting the pipeline were changed
259 - if: *is-post-merge-not-for-marge
263 # Allow triggering jobs manually in other cases if any files affecting the
264 # pipeline were changed
268 # Otherwise, container jobs won't run because no rule matched.
277 - !reference [.scheduled_pipeline-rules, rules]
278 # ensure we are running on packet
282 # Compactify the .git directory
283 - git gc --aggressive
284 # compress the current folder
285 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
287 - ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
290 # Sanity checks of MR settings and commit logs
298 # Other cases default to never
302 # ci-fairy check-commits --junit-xml=check-commits.xml
303 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
309 # Temporary rules for tests that should not block merging, but should be
310 # available to optionally run with the "play" button in the UI in pre-merge
311 # non-marge pipelines. This should appear in "extends:" after any includes of
312 # test-source-dep.yml rules, so that these rules replace those.
314 # If a job is going to be manual for a long period of time, then please use a
315 # driver-specific manual rules set from test-source-dep (see
316 # freedreno-manual-rules, for example)
319 - !reference [.no_scheduled_pipelines-rules, rules]
320 - if: *is-forked-branch-or-pre-merge-not-for-marge