mesa: correctly allocate space for converted primtives
[platform/upstream/mesa.git] / .gitlab-ci.yml
1 workflow:
2   rules:
3     - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
4       variables:
5         MESA_CI_PERFORMANCE_ENABLED: 1
6     - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH
7       variables:
8         LAVA_JOB_PRIORITY: 40
9     - if: $GITLAB_USER_LOGIN != "marge-bot"
10       variables:
11         LAVA_JOB_PRIORITY: 50
12     - when: always
13
14 variables:
15   FDO_UPSTREAM_REPO: mesa/mesa
16   MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
17   CI_PRE_CLONE_SCRIPT: |-
18           set -o xtrace
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
22           set +o xtrace
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):
33   FD_FARM: "online"
34   COLLABORA_FARM: "online"
35   MICROSOFT_FARM: "online"
36   LIMA_FARM: "online"
37   IGALIA_FARM: "online"
38   ANHOLT_FARM: "online"
39   VALVE_FARM: "online"
40   AUSTRIANCODER_FARM: "online"  # only etnaviv GPUs
41
42 default:
43   before_script:
44     - >
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
51
52   after_script:
53     - >
54       set +x
55
56       test -e "${CI_JOB_JWT_FILE}" &&
57       export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
58       rm "${CI_JOB_JWT_FILE}"
59
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
62   retry:
63     max: 1
64
65 include:
66   - project: 'freedesktop/ci-templates'
67     ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
68     file:
69       - '/templates/ci-fairy.yml'
70   - project: 'freedesktop/ci-templates'
71     ref: *ci-templates-commit
72     file:
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'
101
102 stages:
103   - sanity
104   - container
105   - git-archive
106   - build-x86_64
107   - build-misc
108   - lint
109   - amd
110   - intel
111   - nouveau
112   - arm
113   - broadcom
114   - freedreno
115   - etnaviv
116   - software-renderer
117   - layered-backends
118   - deploy
119
120
121 # YAML anchors for rule conditions
122 # --------------------------------
123 .rules-anchors:
124   rules:
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")'
127       when: manual
128     # Post-merge pipeline
129     - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
130       when: on_success
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'
133       when: on_success
134     # Pre-merge pipeline
135     - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
136       when: on_success
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"'
139       when: on_success
140
141
142 # When to automatically run the CI for build jobs
143 .build-rules:
144   rules:
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
148       - VERSION
149       - bin/git_sha1_gen.py
150       - bin/install_megadrivers.py
151       - bin/symbols-check.py
152       # GitLab CI
153       - .gitlab-ci.yml
154       - .gitlab-ci/**/*
155       # Meson
156       - meson*
157       - build-support/**/*
158       - subprojects/**/*
159       # Source code
160       - include/**/*
161       - src/**/*
162       when: on_success
163     # Otherwise, build/test jobs won't run because no rule matched.
164
165
166 .ci-deqp-artifacts:
167   artifacts:
168     name: "mesa_${CI_JOB_NAME}"
169     when: always
170     untracked: false
171     paths:
172       # Watch out!  Artifacts are relative to the build dir.
173       # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
174       - artifacts
175       - _build/meson-logs/*.txt
176       - _build/meson-logs/strace
177
178 .container-rules:
179   rules:
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
182     - if: *is-post-merge
183       changes:
184       - .gitlab-ci.yml
185       - .gitlab-ci/**/*
186       when: on_success
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
190       changes:
191         *all_paths
192       when: on_success
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
196       changes:
197         *all_paths
198       when: on_success
199     # Allow triggering jobs manually in other cases if any files affecting the
200     # pipeline were changed
201     - changes:
202         *all_paths
203       when: manual
204     # Otherwise, container jobs won't run because no rule matched.
205
206 # Git archive
207
208 make git archive:
209   extends:
210     - .fdo.ci-fairy
211   stage: git-archive
212   rules:
213     - !reference [.scheduled_pipeline-rules, rules]
214   # ensure we are running on packet
215   tags:
216     - packet.net
217   script:
218     # Compactify the .git directory
219     - git gc --aggressive
220     # compress the current folder
221     - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
222
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
224
225
226 # Sanity checks of MR settings and commit logs
227 sanity:
228   extends:
229     - .fdo.ci-fairy
230   stage: sanity
231   rules:
232     - if: *is-pre-merge
233       when: on_success
234     # Other cases default to never
235   variables:
236     GIT_STRATEGY: none
237   script:
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
240   artifacts:
241     when: on_failure
242     reports:
243       junit: check-*.xml
244
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.
249 #
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)
253 .test-manual-mr:
254   rules:
255     - !reference [.no_scheduled_pipelines-rules, rules]
256     - if: *is-forked-branch-or-pre-merge-not-for-marge
257       changes:
258         *all_paths
259       when: manual
260   variables:
261     JOB_TIMEOUT: 80
262