2 FDO_UPSTREAM_REPO: mesa/mesa
3 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
4 CI_PRE_CLONE_SCRIPT: |-
6 wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
7 bash download-git-cache.sh
8 rm download-git-cache.sh
10 CI_JOB_JWT_FILE: /minio_jwt
11 MINIO_HOST: s3.freedesktop.org
12 # per-pipeline artifact storage on MinIO
13 PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
14 # per-job artifact storage on MinIO
15 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
16 # reference images stored for traces
17 PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
18 # Individual CI farm status, set to "offline" to disable jobs
19 # running on a particular CI farm (ie. for outages, etc):
21 COLLABORA_FARM: "online"
22 MICROSOFT_FARM: "online"
27 AUSTRIANCODER_FARM: "online" # only etnaviv GPUs
31 - echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
32 - echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
34 - echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
40 test -e "${CI_JOB_JWT_FILE}" &&
41 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
42 rm "${CI_JOB_JWT_FILE}"
44 # Retry build or test jobs up to twice when the gitlab-runner itself fails somehow.
48 - runner_system_failure
51 - project: 'freedesktop/ci-templates'
52 ref: ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
54 - '/templates/ci-fairy.yml'
55 - project: 'freedesktop/ci-templates'
56 ref: *ci-templates-commit
58 - '/templates/alpine.yml'
59 - '/templates/debian.yml'
60 - '/templates/fedora.yml'
61 - local: '.gitlab-ci/image-tags.yml'
62 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
63 - local: '.gitlab-ci/container/gitlab-ci.yml'
64 - local: '.gitlab-ci/build/gitlab-ci.yml'
65 - local: '.gitlab-ci/test/gitlab-ci.yml'
66 - local: '.gitlab-ci/test-source-dep.yml'
67 - local: 'src/amd/ci/gitlab-ci.yml'
68 - local: 'src/broadcom/ci/gitlab-ci.yml'
69 - local: 'src/etnaviv/ci/gitlab-ci.yml'
70 - local: 'src/freedreno/ci/gitlab-ci.yml'
71 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
72 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
73 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
74 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
75 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
76 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
77 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
78 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
79 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
80 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
81 - local: 'src/intel/ci/gitlab-ci.yml'
82 - local: 'src/microsoft/ci/gitlab-ci.yml'
83 - local: 'src/panfrost/ci/gitlab-ci.yml'
84 - local: 'src/virtio/ci/gitlab-ci.yml'
105 # YAML anchors for rule conditions
106 # --------------------------------
109 # Pipeline for forked project branch
110 - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
112 # Forked project branch / pre-merge pipeline not for Marge bot
113 - 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")'
115 # Pipeline runs for the main branch of the upstream Mesa project
116 - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
118 # Post-merge pipeline
119 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
121 # Post-merge pipeline, not for Marge Bot
122 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
125 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
127 # Pre-merge pipeline for Marge Bot
128 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
139 expose_as: 'Documentation preview'
143 - apk --no-cache add graphviz doxygen
144 - pip3 install sphinx===5.1.1 breathe===4.34.0 mako===1.2.3 sphinx_rtd_theme===1.0.0
145 - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
146 - sphinx-build -W -b $BUILDER docs public
153 - !reference [.no_scheduled_pipelines-rules, rules]
159 # Other cases default to never
163 # Cancel job if a newer commit is pushed to the same branch
168 - !reference [.no_scheduled_pipelines-rules, rules]
169 - if: *is-forked-branch
172 # Other cases default to never
183 # Other cases default to never
187 # Cancel job if a newer commit is pushed to the same branch
192 - !reference [.scheduled_pipeline-rules, rules]
197 # When to automatically run the CI for build jobs
200 - !reference [.no_scheduled_pipelines-rules, rules]
201 # If any files affecting the pipeline are changed, build/test jobs run
202 # automatically once all dependency jobs have passed
203 - changes: &all_paths
205 - bin/git_sha1_gen.py
206 - bin/install_megadrivers.py
207 - bin/meson_get_version.py
208 - bin/symbols-check.py
220 # Otherwise, build/test jobs won't run because no rule matched.
225 name: "mesa_${CI_JOB_NAME}"
229 # Watch out! Artifacts are relative to the build dir.
230 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
232 - _build/meson-logs/*.txt
233 - _build/meson-logs/strace
237 - !reference [.no_scheduled_pipelines-rules, rules]
238 # Run pipeline by default in the main project if any CI pipeline
239 # configuration files were changed, to ensure docker images are up to date
245 # Run pipeline by default if it was triggered by Marge Bot, is for a
246 # merge request, and any files affecting the pipeline were changed
247 - if: *is-pre-merge-for-marge
251 # Run pipeline by default in the main project if it was not triggered by
252 # Marge Bot, and any files affecting the pipeline were changed
253 - if: *is-post-merge-not-for-marge
257 # Allow triggering jobs manually in other cases if any files affecting the
258 # pipeline were changed
262 # Otherwise, container jobs won't run because no rule matched.
271 - !reference [.scheduled_pipeline-rules, rules]
272 # ensure we are running on packet
276 # Compactify the .git directory
277 - git gc --aggressive
278 # compress the current folder
279 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
281 - 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
284 # Sanity checks of MR settings and commit logs
292 # Other cases default to never
296 # ci-fairy check-commits --junit-xml=check-commits.xml
297 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
303 # Rules for tests that should not block merging, but should be available to
304 # optionally run with the "play" button in the UI in pre-merge non-marge
305 # pipelines. This should appear in "extends:" after any includes of
306 # test-source-dep.yml rules, so that these rules replace those.
309 - !reference [.no_scheduled_pipelines-rules, rules]
310 - if: *is-forked-branch-or-pre-merge-not-for-marge