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 . ${SCRIPTS_DIR}/setup-test-env.sh &&
48 echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
49 unset CI_JOB_JWT # Unsetting vulnerable env variables
55 test -e "${CI_JOB_JWT_FILE}" &&
56 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
57 rm "${CI_JOB_JWT_FILE}"
59 # Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
60 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
65 - project: 'freedesktop/ci-templates'
66 ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
68 - '/templates/ci-fairy.yml'
69 - project: 'freedesktop/ci-templates'
70 ref: *ci-templates-commit
72 - '/templates/alpine.yml'
73 - '/templates/debian.yml'
74 - '/templates/fedora.yml'
75 - local: '.gitlab-ci/image-tags.yml'
76 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
77 - local: '.gitlab-ci/container/gitlab-ci.yml'
78 - local: '.gitlab-ci/build/gitlab-ci.yml'
79 - local: '.gitlab-ci/test/gitlab-ci.yml'
80 - local: '.gitlab-ci/test-source-dep.yml'
81 - local: 'docs/gitlab-ci.yml'
82 - local: 'src/amd/ci/gitlab-ci.yml'
83 - local: 'src/broadcom/ci/gitlab-ci.yml'
84 - local: 'src/etnaviv/ci/gitlab-ci.yml'
85 - local: 'src/freedreno/ci/gitlab-ci.yml'
86 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
87 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
88 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
89 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
90 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
91 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
92 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
93 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
94 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
95 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
96 - local: 'src/intel/ci/gitlab-ci.yml'
97 - local: 'src/microsoft/ci/gitlab-ci.yml'
98 - local: 'src/panfrost/ci/gitlab-ci.yml'
99 - local: 'src/virtio/ci/gitlab-ci.yml'
120 # YAML anchors for rule conditions
121 # --------------------------------
124 # Post-merge pipeline
125 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
127 # Post-merge pipeline, not for Marge Bot
128 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
131 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
133 # Pre-merge pipeline for Marge Bot
134 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
138 # When to automatically run the CI for build jobs
141 # If any files affecting the pipeline are changed, build/test jobs run
142 # automatically once all dependency jobs have passed
143 - changes: &all_paths
145 - bin/git_sha1_gen.py
146 - bin/install_megadrivers.py
147 - bin/symbols-check.py
159 # Otherwise, build/test jobs won't run because no rule matched.
164 name: "mesa_${CI_JOB_NAME}"
168 # Watch out! Artifacts are relative to the build dir.
169 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
171 - _build/meson-logs/*.txt
172 - _build/meson-logs/strace
176 # Run pipeline by default in the main project if any CI pipeline
177 # configuration files were changed, to ensure docker images are up to date
183 # Run pipeline by default if it was triggered by Marge Bot, is for a
184 # merge request, and any files affecting the pipeline were changed
185 - if: *is-pre-merge-for-marge
189 # Run pipeline by default in the main project if it was not triggered by
190 # Marge Bot, and any files affecting the pipeline were changed
191 - if: *is-post-merge-not-for-marge
195 # Allow triggering jobs manually in other cases if any files affecting the
196 # pipeline were changed
200 # Otherwise, container jobs won't run because no rule matched.
209 - !reference [.scheduled_pipeline-rules, rules]
210 # ensure we are running on packet
214 # Compactify the .git directory
215 - git gc --aggressive
216 # compress the current folder
217 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
219 - 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
222 # Sanity checks of MR settings and commit logs
230 # Other cases default to never
234 # ci-fairy check-commits --junit-xml=check-commits.xml
235 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml