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"
29 - echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
30 - echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
32 - echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
38 test -e "${CI_JOB_JWT_FILE}" &&
39 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
40 rm "${CI_JOB_JWT_FILE}"
42 # Retry build or test jobs up to twice when the gitlab-runner itself fails somehow.
46 - runner_system_failure
49 - project: 'freedesktop/ci-templates'
50 ref: ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
52 - '/templates/ci-fairy.yml'
53 - project: 'freedesktop/ci-templates'
54 ref: *ci-templates-commit
56 - '/templates/debian.yml'
57 - '/templates/fedora.yml'
58 - local: '.gitlab-ci/image-tags.yml'
59 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
60 - local: '.gitlab-ci/container/gitlab-ci.yml'
61 - local: '.gitlab-ci/build/gitlab-ci.yml'
62 - local: '.gitlab-ci/test/gitlab-ci.yml'
63 - local: '.gitlab-ci/test-source-dep.yml'
64 - local: 'src/amd/ci/gitlab-ci.yml'
65 - local: 'src/broadcom/ci/gitlab-ci.yml'
66 - local: 'src/etnaviv/ci/gitlab-ci.yml'
67 - local: 'src/freedreno/ci/gitlab-ci.yml'
68 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
69 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
70 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
71 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
72 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
73 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
74 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
75 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
76 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
77 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
78 - local: 'src/intel/ci/gitlab-ci.yml'
79 - local: 'src/microsoft/ci/gitlab-ci.yml'
80 - local: 'src/panfrost/ci/gitlab-ci.yml'
81 - local: 'src/virtio/ci/gitlab-ci.yml'
102 # YAML anchors for rule conditions
103 # --------------------------------
106 # Pipeline for forked project branch
107 - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
109 # Forked project branch / pre-merge pipeline not for Marge bot
110 - 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")'
112 # Pipeline runs for the main branch of the upstream Mesa project
113 - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
115 # Post-merge pipeline
116 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
118 # Post-merge pipeline, not for Marge Bot
119 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
122 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
124 # Pre-merge pipeline for Marge Bot
125 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
134 - apk --no-cache add graphviz doxygen
135 - pip3 install sphinx===5.1.1 breathe===4.34.0 mako===1.2.3 sphinx_rtd_theme===1.0.0
136 - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
137 - sphinx-build -W -b html docs public
147 - !reference [.no_scheduled_pipelines-rules, rules]
153 # Other cases default to never
157 # Cancel job if a newer commit is pushed to the same branch
162 - !reference [.no_scheduled_pipelines-rules, rules]
163 - if: *is-forked-branch
166 # Other cases default to never
174 expose_as: 'Documentation preview'
181 # Other cases default to never
183 # When to automatically run the CI for build jobs
186 - !reference [.no_scheduled_pipelines-rules, rules]
187 # If any files affecting the pipeline are changed, build/test jobs run
188 # automatically once all dependency jobs have passed
189 - changes: &all_paths
191 - bin/git_sha1_gen.py
192 - bin/install_megadrivers.py
193 - bin/meson_get_version.py
194 - bin/symbols-check.py
206 # Otherwise, build/test jobs won't run because no rule matched.
211 name: "mesa_${CI_JOB_NAME}"
215 # Watch out! Artifacts are relative to the build dir.
216 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
218 - _build/meson-logs/*.txt
219 - _build/meson-logs/strace
223 - !reference [.no_scheduled_pipelines-rules, rules]
224 # Run pipeline by default in the main project if any CI pipeline
225 # configuration files were changed, to ensure docker images are up to date
231 # Run pipeline by default if it was triggered by Marge Bot, is for a
232 # merge request, and any files affecting the pipeline were changed
233 - if: *is-pre-merge-for-marge
237 # Run pipeline by default in the main project if it was not triggered by
238 # Marge Bot, and any files affecting the pipeline were changed
239 - if: *is-post-merge-not-for-marge
243 # Allow triggering jobs manually in other cases if any files affecting the
244 # pipeline were changed
248 # Otherwise, container jobs won't run because no rule matched.
257 - !reference [.scheduled_pipeline-rules, rules]
258 # ensure we are running on packet
262 # Compactify the .git directory
263 - git gc --aggressive
264 # compress the current folder
265 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
267 - 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
270 # Sanity checks of MR settings and commit logs
278 # Other cases default to never
282 # ci-fairy check-commits --junit-xml=check-commits.xml
283 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
289 # Rules for tests that should not block merging, but should be available to
290 # optionally run with the "play" button in the UI in pre-merge non-marge
291 # pipelines. This should appear in "extends:" after any includes of
292 # test-source-dep.yml rules, so that these rules replace those.
295 - !reference [.no_scheduled_pipelines-rules, rules]
296 - if: *is-forked-branch-or-pre-merge-not-for-marge