2 FDO_UPSTREAM_REPO: mesa/mesa
3 MESA_TEMPLATES_COMMIT: &ci-templates-commit 290b79e0e78eab67a83766f4e9691be554fc4afd
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: minio-packet.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"
28 - echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
29 - echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
31 - echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
37 test -e "${CI_JOB_JWT_FILE}" &&
38 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
39 rm "${CI_JOB_JWT_FILE}"
41 # Retry build or test jobs up to twice when the gitlab-runner itself fails somehow.
45 - runner_system_failure
48 - project: 'freedesktop/ci-templates'
49 ref: 34f4ade99434043f88e164933f570301fd18b125
51 - '/templates/ci-fairy.yml'
52 - project: 'freedesktop/ci-templates'
53 ref: *ci-templates-commit
55 - '/templates/debian.yml'
56 - '/templates/fedora.yml'
57 - local: '.gitlab-ci/image-tags.yml'
58 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
59 - local: '.gitlab-ci/container/gitlab-ci.yml'
60 - local: '.gitlab-ci/build/gitlab-ci.yml'
61 - local: '.gitlab-ci/test/gitlab-ci.yml'
62 - local: '.gitlab-ci/test-source-dep.yml'
63 - local: 'src/amd/ci/gitlab-ci.yml'
64 - local: 'src/broadcom/ci/gitlab-ci.yml'
65 - local: 'src/etnaviv/ci/gitlab-ci.yml'
66 - local: 'src/freedreno/ci/gitlab-ci.yml'
67 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
68 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
69 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
70 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
71 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
72 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
73 - local: 'src/gallium/drivers/radeonsi/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'
101 # YAML anchors for rule conditions
102 # --------------------------------
105 # Pipeline for forked project branch
106 - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
108 # Forked project branch / pre-merge pipeline not for Marge bot
109 - 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")'
111 # Pipeline runs for the main branch of the upstream Mesa project
112 - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
114 # Post-merge pipeline
115 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
117 # Post-merge pipeline, not for Marge Bot
118 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
121 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
123 # Pre-merge pipeline for Marge Bot
124 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
133 - apk --no-cache add graphviz doxygen
134 - pip3 install sphinx breathe mako sphinx_rtd_theme
135 - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
136 - sphinx-build -W -b html docs public
146 - !reference [.no_scheduled_pipelines-rules, rules]
152 # Other cases default to never
156 # Cancel job if a newer commit is pushed to the same branch
161 - !reference [.no_scheduled_pipelines-rules, rules]
162 - if: *is-forked-branch
165 # Other cases default to never
173 expose_as: 'Documentation preview'
180 # Other cases default to never
182 # When to automatically run the CI for build jobs
185 - !reference [.no_scheduled_pipelines-rules, rules]
186 # If any files affecting the pipeline are changed, build/test jobs run
187 # automatically once all dependency jobs have passed
188 - changes: &all_paths
190 - bin/git_sha1_gen.py
191 - bin/install_megadrivers.py
192 - bin/meson_get_version.py
193 - bin/symbols-check.py
205 # Otherwise, build/test jobs won't run because no rule matched.
210 name: "mesa_${CI_JOB_NAME}"
214 # Watch out! Artifacts are relative to the build dir.
215 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
217 - _build/meson-logs/*.txt
218 - _build/meson-logs/strace
222 - !reference [.no_scheduled_pipelines-rules, rules]
223 # Run pipeline by default in the main project if any CI pipeline
224 # configuration files were changed, to ensure docker images are up to date
230 # Run pipeline by default if it was triggered by Marge Bot, is for a
231 # merge request, and any files affecting the pipeline were changed
232 - if: *is-pre-merge-for-marge
236 # Run pipeline by default in the main project if it was not triggered by
237 # Marge Bot, and any files affecting the pipeline were changed
238 - if: *is-post-merge-not-for-marge
242 # Allow triggering jobs manually in other cases if any files affecting the
243 # pipeline were changed
247 # Otherwise, container jobs won't run because no rule matched.
256 - !reference [.scheduled_pipeline-rules, rules]
257 # ensure we are running on packet
261 # Compactify the .git directory
262 - git gc --aggressive
263 # compress the current folder
264 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
266 # login with the JWT token file
267 - ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
268 - ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
271 # Sanity checks of MR settings and commit logs
279 # Other cases default to never
283 # ci-fairy check-commits --junit-xml=check-commits.xml
284 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
290 # Rules for tests that should not block merging, but should be available to
291 # optionally run with the "play" button in the UI in pre-merge non-marge
292 # pipelines. This should appear in "extends:" after any includes of
293 # test-source-dep.yml rules, so that these rules replace those.
296 - !reference [.no_scheduled_pipelines-rules, rules]
297 - if: *is-forked-branch-or-pre-merge-not-for-marge