ci: disable the freedreno farm.
[platform/upstream/mesa.git] / .gitlab-ci.yml
1 variables:
2   FDO_UPSTREAM_REPO: mesa/mesa
3   MESA_TEMPLATES_COMMIT: &ci-templates-commit 290b79e0e78eab67a83766f4e9691be554fc4afd
4   CI_PRE_CLONE_SCRIPT: |-
5           set -o xtrace
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
9           set +o xtrace
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):
20   FD_FARM: "offline"
21   COLLABORA_FARM: "online"
22   MICROSOFT_FARM: "online"
23   LIMA_FARM: "online"
24   IGALIA_FARM: "online"
25
26 default:
27   before_script:
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}"
30     - unset CI_JOB_JWT
31     - echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
32
33   after_script:
34     - >
35       set +x
36
37       test -e "${CI_JOB_JWT_FILE}" &&
38       export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
39       rm "${CI_JOB_JWT_FILE}"
40
41   # Retry build or test jobs up to twice when the gitlab-runner itself fails somehow.
42   retry:
43     max: 2
44     when:
45       - runner_system_failure
46
47 include:
48   - project: 'freedesktop/ci-templates'
49     ref: 34f4ade99434043f88e164933f570301fd18b125
50     file:
51       - '/templates/ci-fairy.yml'
52   - project: 'freedesktop/ci-templates'
53     ref: *ci-templates-commit
54     file:
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'
82
83 stages:
84   - sanity
85   - container
86   - git-archive
87   - build-x86_64
88   - build-misc
89   - amd
90   - intel
91   - nouveau
92   - arm
93   - broadcom
94   - freedreno
95   - etnaviv
96   - software-renderer
97   - layered-backends
98   - deploy
99
100
101 # YAML anchors for rule conditions
102 # --------------------------------
103 .rules-anchors:
104   rules:
105     # Pipeline for forked project branch
106     - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
107       when: manual
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")'
110       when: manual
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'
113       when: always
114     # Post-merge pipeline
115     - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
116       when: on_success
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'
119       when: on_success
120     # Pre-merge pipeline
121     - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
122       when: on_success
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"'
125       when: on_success
126
127
128 .docs-base:
129   extends:
130     - .fdo.ci-fairy
131     - .build-rules
132   script:
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
137
138 pages:
139   extends: .docs-base
140   stage: deploy
141   artifacts:
142     paths:
143     - public
144   needs: []
145   rules:
146     - !reference [.no_scheduled_pipelines-rules, rules]
147     - if: *is-mesa-main
148       changes: &docs-or-ci
149       - docs/**/*
150       - .gitlab-ci.yml
151       when: always
152     # Other cases default to never
153
154 test-docs:
155   extends: .docs-base
156   # Cancel job if a newer commit is pushed to the same branch
157   interruptible: true
158   stage: deploy
159   needs: []
160   rules:
161     - !reference [.no_scheduled_pipelines-rules, rules]
162     - if: *is-forked-branch
163       changes: *docs-or-ci
164       when: manual
165     # Other cases default to never
166
167 test-docs-mr:
168   extends:
169     - test-docs
170   needs:
171     - sanity
172   artifacts:
173     expose_as: 'Documentation preview'
174     paths:
175     - public/
176   rules:
177     - if: *is-pre-merge
178       changes: *docs-or-ci
179       when: on_success
180     # Other cases default to never
181
182 # When to automatically run the CI for build jobs
183 .build-rules:
184   rules:
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
189       - VERSION
190       - bin/git_sha1_gen.py
191       - bin/install_megadrivers.py
192       - bin/meson_get_version.py
193       - bin/symbols-check.py
194       # GitLab CI
195       - .gitlab-ci.yml
196       - .gitlab-ci/**/*
197       # Meson
198       - meson*
199       - build-support/**/*
200       - subprojects/**/*
201       # Source code
202       - include/**/*
203       - src/**/*
204       when: on_success
205     # Otherwise, build/test jobs won't run because no rule matched.
206
207
208 .ci-deqp-artifacts:
209   artifacts:
210     name: "mesa_${CI_JOB_NAME}"
211     when: always
212     untracked: false
213     paths:
214       # Watch out!  Artifacts are relative to the build dir.
215       # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
216       - artifacts
217       - _build/meson-logs/*.txt
218       - _build/meson-logs/strace
219
220 .container-rules:
221   rules:
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
225     - if: *is-post-merge
226       changes:
227       - .gitlab-ci.yml
228       - .gitlab-ci/**/*
229       when: on_success
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
233       changes:
234         *all_paths
235       when: on_success
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
239       changes:
240         *all_paths
241       when: on_success
242     # Allow triggering jobs manually in other cases if any files affecting the
243     # pipeline were changed
244     - changes:
245         *all_paths
246       when: manual
247     # Otherwise, container jobs won't run because no rule matched.
248
249 # Git archive
250
251 make git archive:
252   extends:
253     - .fdo.ci-fairy
254   stage: git-archive
255   rules:
256     - !reference [.scheduled_pipeline-rules, rules]
257   # ensure we are running on packet
258   tags:
259     - packet.net
260   script:
261     # Compactify the .git directory
262     - git gc --aggressive
263     # compress the current folder
264     - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
265
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
269
270
271 # Sanity checks of MR settings and commit logs
272 sanity:
273   extends:
274     - .fdo.ci-fairy
275   stage: sanity
276   rules:
277     - if: *is-pre-merge
278       when: on_success
279     # Other cases default to never
280   variables:
281     GIT_STRATEGY: none
282   script:
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
285   artifacts:
286     when: on_failure
287     reports:
288       junit: check-*.xml
289
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.
294 .test-manual-mr:
295   rules:
296     - !reference [.no_scheduled_pipelines-rules, rules]
297     - if: *is-forked-branch-or-pre-merge-not-for-marge
298       changes:
299         *all_paths
300       when: manual
301   variables:
302     JOB_TIMEOUT: 80
303