Fix utc_ecore_evas_pointer_xy_get timeout issue
[platform/upstream/mesa.git] / .gitlab-ci.yml
1 workflow:
2   rules:
3     # do not duplicate pipelines on merge pipelines
4     - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
5       when: never
6     # merge pipeline
7     - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
8       variables:
9         MESA_CI_PERFORMANCE_ENABLED: 1
10         VALVE_INFRA_VANGOGH_JOB_PRIORITY: ""  # Empty tags are ignored by gitlab
11     # post-merge pipeline
12     - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
13       variables:
14         JOB_PRIORITY: 40
15         VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
16     # any other pipeline
17     - if: $GITLAB_USER_LOGIN != "marge-bot"
18       variables:
19         JOB_PRIORITY: 50
20         VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
21     - when: always
22
23 variables:
24   FDO_UPSTREAM_REPO: mesa/mesa
25   MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
26   CI_PRE_CLONE_SCRIPT: |-
27           set -o xtrace
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
31           set +o xtrace
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!
45
46 default:
47   before_script:
48     - >
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
54
55   after_script:
56     # Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
57     - find -name '*.log' -exec mv {} {}.txt \;
58
59     - >
60       set +x
61
62       test -e "${CI_JOB_JWT_FILE}" &&
63       export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
64       rm "${CI_JOB_JWT_FILE}"
65
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
68   retry:
69     max: 1
70     # Ignore runner_unsupported, stale_schedule, archived_failure, or
71     # unmet_prerequisites
72     when:
73       - api_failure
74       - runner_system_failure
75       - script_failure
76       - job_execution_timeout
77       - scheduler_failure
78       - data_integrity_failure
79       - unknown_failure
80
81 stages:
82   - sanity
83   - container
84   - git-archive
85   - build-x86_64
86   - build-misc
87   - lint
88   - amd
89   - intel
90   - nouveau
91   - arm
92   - broadcom
93   - freedreno
94   - etnaviv
95   - software-renderer
96   - layered-backends
97   - deploy
98
99 include:
100   - project: 'freedesktop/ci-templates'
101     ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
102     file:
103       - '/templates/ci-fairy.yml'
104   - project: 'freedesktop/ci-templates'
105     ref: *ci-templates-commit
106     file:
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'
136
137
138 # YAML anchors for rule conditions
139 # --------------------------------
140 .rules-anchors:
141   rules:
142     # Post-merge pipeline
143     - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
144       when: on_success
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'
147       when: on_success
148     # Pre-merge pipeline
149     - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
150       when: on_success
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"'
153       when: on_success
154
155
156 .container+build-rules:
157   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
162     - if: *is-post-merge
163       changes: &all_paths
164         - VERSION
165         - bin/git_sha1_gen.py
166         - bin/install_megadrivers.py
167         - bin/symbols-check.py
168         # GitLab CI
169         - .gitlab-ci.yml
170         - .gitlab-ci/**/*
171         # Meson
172         - meson*
173         - build-support/**/*
174         - subprojects/**/*
175         # Source code
176         - include/**/*
177         - src/**/*
178       when: on_success
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
182       changes:
183         *all_paths
184       when: on_success
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
188       changes:
189         *all_paths
190       when: on_success
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
194       when: never
195     - if: *is-post-merge
196       when: never
197     # Always allow user branches etc to trigger jobs manually
198     - when: manual
199
200
201 .ci-deqp-artifacts:
202   artifacts:
203     name: "mesa_${CI_JOB_NAME}"
204     when: always
205     untracked: false
206     paths:
207       # Watch out!  Artifacts are relative to the build dir.
208       # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
209       - artifacts
210       - _build/meson-logs/*.txt
211       - _build/meson-logs/strace
212
213 # Git archive
214
215 make git archive:
216   extends:
217     - .fdo.ci-fairy
218   stage: git-archive
219   rules:
220     - !reference [.scheduled_pipeline-rules, rules]
221   # ensure we are running on packet
222   tags:
223     - packet.net
224   script:
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 .
231
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
233
234
235 # Sanity checks of MR settings and commit logs
236 sanity:
237   extends:
238     - .fdo.ci-fairy
239   stage: sanity
240   rules:
241     - if: *is-pre-merge
242       when: on_success
243     # Other cases default to never
244   variables:
245     GIT_STRATEGY: none
246   script:
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
249   artifacts:
250     when: on_failure
251     reports:
252       junit: check-*.xml
253
254
255 # Jobs that need to pass before spending hardware resources on further testing
256 .required-for-hardware-jobs:
257   needs:
258     - job: clang-format
259       optional: true
260     - job: rustfmt
261       optional: true