3 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
5 MESA_CI_PERFORMANCE_ENABLED: 1
6 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
9 - if: $GITLAB_USER_LOGIN != "marge-bot"
15 FDO_UPSTREAM_REPO: mesa/mesa
16 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
17 CI_PRE_CLONE_SCRIPT: |-
19 wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
20 bash download-git-cache.sh
21 rm download-git-cache.sh
23 CI_JOB_JWT_FILE: /minio_jwt
24 MINIO_HOST: s3.freedesktop.org
25 # per-pipeline artifact storage on MinIO
26 PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
27 # per-job artifact storage on MinIO
28 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
29 # reference images stored for traces
30 PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
31 # Individual CI farm status, set to "offline" to disable jobs
32 # running on a particular CI farm (ie. for outages, etc):
34 COLLABORA_FARM: "online"
35 MICROSOFT_FARM: "online"
40 AUSTRIANCODER_FARM: "online" # only etnaviv GPUs
45 export SCRIPTS_DIR=$(mktemp -d) &&
46 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" &&
47 chmod +x ${SCRIPTS_DIR}/setup-test-env.sh &&
48 . ${SCRIPTS_DIR}/setup-test-env.sh &&
49 echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
50 unset CI_JOB_JWT # Unsetting vulnerable env variables
56 test -e "${CI_JOB_JWT_FILE}" &&
57 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
58 rm "${CI_JOB_JWT_FILE}"
60 # Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
61 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
66 - project: 'freedesktop/ci-templates'
67 ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
69 - '/templates/ci-fairy.yml'
70 - project: 'freedesktop/ci-templates'
71 ref: *ci-templates-commit
73 - '/templates/alpine.yml'
74 - '/templates/debian.yml'
75 - '/templates/fedora.yml'
76 - local: '.gitlab-ci/image-tags.yml'
77 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
78 - local: '.gitlab-ci/container/gitlab-ci.yml'
79 - local: '.gitlab-ci/build/gitlab-ci.yml'
80 - local: '.gitlab-ci/test/gitlab-ci.yml'
81 - local: '.gitlab-ci/test-source-dep.yml'
82 - local: 'docs/gitlab-ci.yml'
83 - local: 'src/amd/ci/gitlab-ci.yml'
84 - local: 'src/broadcom/ci/gitlab-ci.yml'
85 - local: 'src/etnaviv/ci/gitlab-ci.yml'
86 - local: 'src/freedreno/ci/gitlab-ci.yml'
87 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
88 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
89 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
90 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
91 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
92 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
93 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
94 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
95 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
96 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
97 - local: 'src/intel/ci/gitlab-ci.yml'
98 - local: 'src/microsoft/ci/gitlab-ci.yml'
99 - local: 'src/panfrost/ci/gitlab-ci.yml'
100 - local: 'src/virtio/ci/gitlab-ci.yml'
121 # YAML anchors for rule conditions
122 # --------------------------------
125 # Forked project branch / pre-merge pipeline not for Marge bot
126 - 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")'
128 # Post-merge pipeline
129 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
131 # Post-merge pipeline, not for Marge Bot
132 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
135 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
137 # Pre-merge pipeline for Marge Bot
138 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
142 # When to automatically run the CI for build jobs
145 # If any files affecting the pipeline are changed, build/test jobs run
146 # automatically once all dependency jobs have passed
147 - changes: &all_paths
149 - bin/git_sha1_gen.py
150 - bin/install_megadrivers.py
151 - bin/symbols-check.py
163 # Otherwise, build/test jobs won't run because no rule matched.
168 name: "mesa_${CI_JOB_NAME}"
172 # Watch out! Artifacts are relative to the build dir.
173 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
175 - _build/meson-logs/*.txt
176 - _build/meson-logs/strace
180 # Run pipeline by default in the main project if any CI pipeline
181 # configuration files were changed, to ensure docker images are up to date
187 # Run pipeline by default if it was triggered by Marge Bot, is for a
188 # merge request, and any files affecting the pipeline were changed
189 - if: *is-pre-merge-for-marge
193 # Run pipeline by default in the main project if it was not triggered by
194 # Marge Bot, and any files affecting the pipeline were changed
195 - if: *is-post-merge-not-for-marge
199 # Allow triggering jobs manually in other cases if any files affecting the
200 # pipeline were changed
204 # Otherwise, container jobs won't run because no rule matched.
213 - !reference [.scheduled_pipeline-rules, rules]
214 # ensure we are running on packet
218 # Compactify the .git directory
219 - git gc --aggressive
220 # compress the current folder
221 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
223 - 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
226 # Sanity checks of MR settings and commit logs
234 # Other cases default to never
238 # ci-fairy check-commits --junit-xml=check-commits.xml
239 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
245 # Temporary rules for tests that should not block merging, but should be
246 # available to optionally run with the "play" button in the UI in pre-merge
247 # non-marge pipelines. This should appear in "extends:" after any includes of
248 # test-source-dep.yml rules, so that these rules replace those.
250 # If a job is going to be manual for a long period of time, then please use a
251 # driver-specific manual rules set from test-source-dep (see
252 # freedreno-manual-rules, for example)
255 - !reference [.no_scheduled_pipelines-rules, rules]
256 - if: *is-forked-branch-or-pre-merge-not-for-marge