3 # do not duplicate pipelines on merge pipelines
4 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
7 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
9 MESA_CI_PERFORMANCE_ENABLED: 1
10 VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
12 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
15 VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
17 - if: $GITLAB_USER_LOGIN != "marge-bot"
20 VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
24 FDO_UPSTREAM_REPO: mesa/mesa
25 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
26 CI_PRE_CLONE_SCRIPT: |-
28 wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
29 bash download-git-cache.sh
30 rm download-git-cache.sh
32 CI_JOB_JWT_FILE: /minio_jwt
33 S3_HOST: s3.freedesktop.org
34 # per-pipeline artifact storage on MinIO
35 PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
36 # per-job artifact storage on MinIO
37 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
38 KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/${KERNEL_TAG}
39 # reference images stored for traces
40 PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
41 # For individual CI farm status see .ci-farms folder
42 # Disable farm with `git mv .ci-farms{,-disabled}/$farm_name`
43 # Re-enable farm with `git mv .ci-farms{-disabled,}/$farm_name`
44 # NEVER MIX FARM MAINTENANCE WITH ANY OTHER CHANGE IN THE SAME MERGE REQUEST!
49 export SCRIPTS_DIR=$(mktemp -d) &&
50 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" &&
51 . ${SCRIPTS_DIR}/setup-test-env.sh &&
52 echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
53 unset CI_JOB_JWT # Unsetting vulnerable env variables
56 # Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
57 - find -name '*.log' -exec mv {} {}.txt \;
62 test -e "${CI_JOB_JWT_FILE}" &&
63 export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
64 rm "${CI_JOB_JWT_FILE}"
66 # Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
67 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
70 # Ignore runner_unsupported, stale_schedule, archived_failure, or
74 - runner_system_failure
76 - job_execution_timeout
78 - data_integrity_failure
100 - project: 'freedesktop/ci-templates'
101 ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
103 - '/templates/ci-fairy.yml'
104 - project: 'freedesktop/ci-templates'
105 ref: *ci-templates-commit
107 - '/templates/alpine.yml'
108 - '/templates/debian.yml'
109 - '/templates/fedora.yml'
110 - local: '.gitlab-ci/image-tags.yml'
111 - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
112 - local: '.gitlab-ci/container/gitlab-ci.yml'
113 - local: '.gitlab-ci/build/gitlab-ci.yml'
114 - local: '.gitlab-ci/test/gitlab-ci.yml'
115 - local: '.gitlab-ci/farm-rules.yml'
116 - local: '.gitlab-ci/test-source-dep.yml'
117 - local: 'docs/gitlab-ci.yml'
118 - local: 'src/amd/ci/gitlab-ci.yml'
119 - local: 'src/broadcom/ci/gitlab-ci.yml'
120 - local: 'src/etnaviv/ci/gitlab-ci.yml'
121 - local: 'src/freedreno/ci/gitlab-ci.yml'
122 - local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
123 - local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
124 - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
125 - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
126 - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
127 - local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
128 - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
129 - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
130 - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
131 - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
132 - local: 'src/intel/ci/gitlab-ci.yml'
133 - local: 'src/microsoft/ci/gitlab-ci.yml'
134 - local: 'src/panfrost/ci/gitlab-ci.yml'
135 - local: 'src/virtio/ci/gitlab-ci.yml'
138 # YAML anchors for rule conditions
139 # --------------------------------
142 # Post-merge pipeline
143 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
145 # Post-merge pipeline, not for Marge Bot
146 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
149 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
151 # Pre-merge pipeline for Marge Bot
152 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
156 .container+build-rules:
158 # Run when re-enabling a disabled farm, but not when disabling it
159 - !reference [.disable-farm-mr-rules, rules]
160 # Run pipeline by default in the main project if any CI pipeline
161 # configuration files were changed, to ensure docker images are up to date
165 - bin/git_sha1_gen.py
166 - bin/install_megadrivers.py
167 - bin/symbols-check.py
179 # Run pipeline by default if it was triggered by Marge Bot, is for a
180 # merge request, and any files affecting the pipeline were changed
181 - if: *is-pre-merge-for-marge
185 # Run pipeline by default in the main project if it was not triggered by
186 # Marge Bot, and any files affecting the pipeline were changed
187 - if: *is-post-merge-not-for-marge
191 # Just skip everything for MRs which don't actually change anything in the
192 # build - the same rules as above, but without the file-change rules
193 - if: *is-pre-merge-for-marge
197 # Always allow user branches etc to trigger jobs manually
203 name: "mesa_${CI_JOB_NAME}"
207 # Watch out! Artifacts are relative to the build dir.
208 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
210 - _build/meson-logs/*.txt
211 - _build/meson-logs/strace
220 - !reference [.scheduled_pipeline-rules, rules]
221 # ensure we are running on packet
225 # Compactify the .git directory
226 - git gc --aggressive
227 # Download & cache the perfetto subproject as well.
228 - rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
229 # compress the current folder
230 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
232 - ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
235 # Sanity checks of MR settings and commit logs
243 # Other cases default to never
247 # ci-fairy check-commits --junit-xml=check-commits.xml
248 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
255 # Jobs that need to pass before spending hardware resources on further testing
256 .required-for-hardware-jobs: