v3d: add new flag dirty TMU cache at v3d_compiler
[mesa.git] / .gitlab-ci.yml
1 # This is the tag of the docker image used for the build jobs. If the
2 # image doesn't exist yet, the containers stage generates it.
3 #
4 # In order to generate a new image, one should generally change the tag.
5 # While removing the image from the registry would also work, that's not
6 # recommended except for ephemeral images during development: Replacing
7 # an image after a significant amount of time might pull in newer
8 # versions of gcc/clang or other packages, which might break the build
9 # with older commits using the same tag.
10 #
11 # After merging a change resulting in generating a new image to the
12 # main repository, it's recommended to remove the image from the source
13 # repository's container registry, so that the image from the main
14 # repository's registry will be used there as well.
15 variables:
16 UPSTREAM_REPO: mesa/mesa
17 DEBIAN_TAG: "2019-10-16"
18 DEBIAN_ARM64_TAG: "arm64v8-2019-08-09"
19 STRETCH_TAG: "2019-09-18"
20 DEBIAN_VERSION: buster-slim
21 STRETCH_VERSION: stretch-slim
22 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
23 DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TAG"
24 STRETCH_IMAGE: "$CI_REGISTRY_IMAGE/debian/$STRETCH_VERSION:$STRETCH_TAG"
25
26 include:
27 - project: 'wayland/ci-templates'
28 ref: 1f7f57c64ff4ebbf7292e3b7a13600518b8cb24c
29 file: '/templates/debian.yml'
30
31 include:
32 - local: '/.gitlab-ci/lava-gitlab-ci.yml'
33
34 stages:
35 - container
36 - build
37 - test
38
39
40 # When to automatically run the CI
41 .ci-run-policy:
42 only:
43 - branches@mesa/mesa
44 - merge_requests
45 - /^ci([-/].*)?$/
46 retry:
47 max: 2
48 when:
49 - runner_system_failure
50
51 .ci-deqp-artifacts:
52 artifacts:
53 when: always
54 untracked: false
55 paths:
56 # Watch out! Artifacts are relative to the build dir.
57 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
58 - artifacts
59
60 # Build the normal CI native and cross-build docker images.
61
62 .container:
63 stage: container
64 extends:
65 - .ci-run-policy
66 variables:
67 # no need to pull the whole repo to build the container image
68 GIT_STRATEGY: none
69
70 debian-10:
71 extends:
72 - .debian@container-ifnot-exists
73 - .container
74 variables:
75 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
76
77 .use-debian-10:
78 image: $DEBIAN_IMAGE
79 needs:
80 - debian-10
81
82 debian-9:
83 extends: debian-10
84 variables:
85 DEBIAN_TAG: $STRETCH_TAG
86 DEBIAN_VERSION: $STRETCH_VERSION
87 DEBIAN_IMAGE: $STRETCH_IMAGE
88 DEBIAN_EXEC: 'bash .gitlab-ci/debian-stretch-install.sh'
89
90 .use-debian-9:
91 image: $STRETCH_IMAGE
92 needs:
93 - debian-9
94
95 # Builds a Docker image with the native environment and VK-GL-CTS for testing.
96 test-container:arm64:
97 extends:
98 - .debian@container-ifnot-exists@arm64v8
99 - .container
100 variables:
101 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
102 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
103
104
105 # BUILD
106
107 .build:
108 extends: .ci-run-policy
109 stage: build
110 cache:
111 key: ${CI_JOB_NAME}
112 paths:
113 - ccache
114 artifacts:
115 when: always
116 paths:
117 - _build/meson-logs/*.txt
118 # scons:
119 - build/*/config.log
120 - shader-db
121 variables:
122 CCACHE_COMPILERCHECK: "content"
123 # Use ccache transparently, and print stats before/after
124 before_script:
125 - export PATH="/usr/lib/ccache:$PATH"
126 - export CCACHE_BASEDIR="$PWD"
127 - export CCACHE_DIR="$PWD/ccache"
128 - ccache --max-size=1500M
129 - ccache --zero-stats || true
130 - ccache --show-stats || true
131 after_script:
132 # In case the install dir is being saved as artifacts, tar it up
133 # so that symlinks and hardlinks aren't each packed separately in
134 # the zip file.
135 - if [ -d install ]; then
136 tar -cf artifacts/install.tar install;
137 fi
138 - export CCACHE_DIR="$PWD/ccache"
139 - ccache --show-stats
140
141 .meson-build:
142 extends:
143 - .build
144 - .use-debian-10
145 script:
146 - .gitlab-ci/meson-build.sh
147
148 .scons-build:
149 extends:
150 - .build
151 - .use-debian-10
152 variables:
153 SCONSFLAGS: "-j4"
154 script:
155 - .gitlab-ci/scons-build.sh
156
157 meson-main:
158 extends:
159 - .meson-build
160 - .ci-deqp-artifacts
161 variables:
162 UNWIND: "true"
163 DRI_LOADERS: >
164 -D glx=dri
165 -D gbm=true
166 -D egl=true
167 -D platforms=x11,wayland,drm,surfaceless
168 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
169 GALLIUM_ST: >
170 -D dri3=true
171 -D gallium-extra-hud=true
172 -D gallium-vdpau=true
173 -D gallium-xvmc=true
174 -D gallium-omx=bellagio
175 -D gallium-va=true
176 -D gallium-xa=true
177 -D gallium-nine=true
178 -D gallium-opencl=disabled
179 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
180 LLVM_VERSION: "7"
181 EXTRA_OPTION: >
182 -D osmesa=gallium
183 -D tools=all
184 MESON_SHADERDB: "true"
185 BUILDTYPE: "debugoptimized"
186
187 .meson-cross:
188 extends:
189 - .meson-build
190 - .ci-deqp-artifacts
191 variables:
192 UNWIND: "false"
193 DRI_LOADERS: >
194 -D glx=disabled
195 -D gbm=false
196 -D egl=true
197 -D platforms=surfaceless
198 -D osmesa=none
199 GALLIUM_ST: >
200 -D dri3=false
201 -D gallium-vdpau=false
202 -D gallium-xvmc=false
203 -D gallium-omx=disabled
204 -D gallium-va=false
205 -D gallium-xa=false
206 -D gallium-nine=false
207 -D llvm=false
208
209 meson-armhf:
210 extends: .meson-cross
211 variables:
212 CROSS: armhf
213 VULKAN_DRIVERS: freedreno
214 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
215 # Disable the tests since we're cross compiling.
216 EXTRA_OPTION: >
217 -D build-tests=false
218 -D I-love-half-baked-turnips=true
219 -D vulkan-overlay-layer=true
220
221 meson-arm64:
222 extends: meson-armhf
223 variables:
224 CROSS: arm64
225 BUILDTYPE: "debugoptimized"
226
227 # NOTE: Building SWR is 2x (yes two) times slower than all the other
228 # gallium drivers combined.
229 # Start this early so that it doesn't limit the total run time.
230 #
231 # We also stick the glvnd build here, since we want non-glvnd in
232 # meson-main for actual driver CI.
233 meson-swr-glvnd:
234 extends: .meson-build
235 variables:
236 UNWIND: "true"
237 DRI_LOADERS: >
238 -D glvnd=true
239 -D egl=true
240 GALLIUM_ST: >
241 -D dri3=true
242 -D gallium-vdpau=false
243 -D gallium-xvmc=false
244 -D gallium-omx=disabled
245 -D gallium-va=false
246 -D gallium-xa=false
247 -D gallium-nine=false
248 -D gallium-opencl=disabled
249 GALLIUM_DRIVERS: "swr,iris"
250 LLVM_VERSION: "6.0"
251
252 meson-clang:
253 extends: .meson-build
254 variables:
255 UNWIND: "true"
256 DRI_DRIVERS: "auto"
257 GALLIUM_DRIVERS: "auto"
258 VULKAN_DRIVERS: intel,amd,freedreno
259 CC: "ccache clang-8"
260 CXX: "ccache clang++-8"
261
262 scons-swr:
263 extends: .scons-build
264 variables:
265 SCONS_TARGET: "swr=1"
266 SCONS_CHECK_COMMAND: "true"
267 LLVM_VERSION: "6.0"
268
269 scons-win64:
270 extends: .scons-build
271 variables:
272 SCONS_TARGET: platform=windows machine=x86_64
273 SCONS_CHECK_COMMAND: "true"
274
275 meson-clover:
276 extends: .meson-build
277 variables:
278 UNWIND: "true"
279 DRI_LOADERS: >
280 -D glx=disabled
281 -D egl=false
282 -D gbm=false
283 GALLIUM_ST: >
284 -D dri3=false
285 -D gallium-vdpau=false
286 -D gallium-xvmc=false
287 -D gallium-omx=disabled
288 -D gallium-va=false
289 -D gallium-xa=false
290 -D gallium-nine=false
291 -D gallium-opencl=icd
292 script:
293 - export GALLIUM_DRIVERS="r600,radeonsi"
294 - .gitlab-ci/meson-build.sh
295 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
296 - export GALLIUM_DRIVERS="i915,r600"
297 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
298 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
299
300 meson-clover-old-llvm:
301 extends:
302 - meson-clover
303 - .use-debian-9
304 variables:
305 UNWIND: "false"
306 DRI_LOADERS: >
307 -D glx=disabled
308 -D egl=false
309 -D gbm=false
310 -D platforms=drm,surfaceless
311 GALLIUM_DRIVERS: "i915,r600"
312 script:
313 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
314 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
315 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
316
317 meson-vulkan:
318 extends: .meson-build
319 variables:
320 UNWIND: "false"
321 DRI_LOADERS: >
322 -D glx=disabled
323 -D gbm=false
324 -D egl=false
325 -D platforms=x11,wayland,drm
326 -D osmesa=none
327 GALLIUM_ST: >
328 -D dri3=true
329 -D gallium-vdpau=false
330 -D gallium-xvmc=false
331 -D gallium-omx=disabled
332 -D gallium-va=false
333 -D gallium-xa=false
334 -D gallium-nine=false
335 -D gallium-opencl=disabled
336 VULKAN_DRIVERS: intel,amd,freedreno
337 LLVM_VERSION: "8"
338 EXTRA_OPTION: >
339 -D vulkan-overlay-layer=true
340
341 # While the main point of this build is testing the i386 cross build,
342 # we also use this one to test some other options that are exclusive
343 # with meson-main's choices (classic swrast and osmesa)
344 meson-i386:
345 extends: .meson-cross
346 variables:
347 CROSS: i386
348 VULKAN_DRIVERS: intel
349 DRI_DRIVERS: "swrast"
350 GALLIUM_DRIVERS: "iris"
351 EXTRA_OPTION: >
352 -D vulkan-overlay-layer=true
353 -D llvm=false
354 -D osmesa=classic
355
356 meson-mingw32-x86_64:
357 extends: .meson-build
358 variables:
359 UNWIND: "false"
360 DRI_DRIVERS: ""
361 GALLIUM_DRIVERS: "swrast"
362 EXTRA_OPTION: >
363 -Dllvm=false
364 -Dosmesa=gallium
365 --cross-file=.gitlab-ci/x86_64-w64-mingw32
366
367 scons:
368 extends: .scons-build
369 variables:
370 SCONS_TARGET: "llvm=1"
371 SCONS_CHECK_COMMAND: "scons llvm=1 check"
372 script:
373 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check" .gitlab-ci/scons-build.sh
374 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
375 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
376 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
377
378 scons-old-llvm:
379 extends:
380 - scons
381 - .use-debian-9
382 script:
383 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
384 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
385 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
386
387 .test:
388 extends: .ci-run-policy
389 stage: test
390 variables:
391 GIT_STRATEGY: none # testing doesn't build anything from source
392
393 .deqp-test:
394 extends:
395 - .test
396 - .use-debian-10
397 variables:
398 DEQP_SKIPS: deqp-default-skips.txt
399 script:
400 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
401 - rm -rf install
402 - tar -xf artifacts/install.tar
403 - ./artifacts/deqp-runner.sh
404 artifacts:
405 when: on_failure
406 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
407 paths:
408 - results/
409 dependencies:
410 - meson-main
411 needs: [meson-main]
412
413 test-llvmpipe-gles2:
414 parallel: 4
415 variables:
416 DEQP_VER: gles2
417 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
418 LIBGL_ALWAYS_SOFTWARE: "true"
419 DEQP_RENDERER_MATCH: "llvmpipe"
420 extends: .deqp-test
421
422 test-softpipe-gles2:
423 extends: test-llvmpipe-gles2
424 variables:
425 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
426 DEQP_RENDERER_MATCH: "softpipe"
427 GALLIUM_DRIVER: "softpipe"
428
429 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
430 # 25 minutes. Until we can get its runtime down, just do a partial
431 # (every 10 tests) run.
432 test-softpipe-gles3-limited:
433 variables:
434 DEQP_VER: gles3
435 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
436 LIBGL_ALWAYS_SOFTWARE: "true"
437 DEQP_RENDERER_MATCH: "softpipe"
438 GALLIUM_DRIVER: "softpipe"
439 CI_NODE_INDEX: 1
440 CI_NODE_TOTAL: 10
441 extends: .deqp-test
442
443 arm64_a630_gles2:
444 extends: .deqp-test
445 image: $DEBIAN_ARM64_IMAGE
446 variables:
447 DEQP_VER: gles2
448 DEQP_RENDERER_MATCH: "FD630"
449 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
450 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
451 NIR_VALIDATE: 0
452 tags:
453 - mesa-cheza
454 dependencies:
455 - meson-arm64
456 needs:
457 - meson-arm64
458 - test-container:arm64
459
460 arm64_a630_gles31:
461 extends: arm64_a630_gles2
462 parallel: 4
463 variables:
464 DEQP_VER: gles31
465
466 arm64_a630_gles3:
467 parallel: 6
468 extends: arm64_a630_gles2
469 variables:
470 DEQP_VER: gles3
471
472 arm64_a306_gles2:
473 parallel: 4
474 extends: arm64_a630_gles2
475 variables:
476 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
477 DEQP_SKIPS: deqp-default-skips.txt
478 DEQP_RENDERER_MATCH: "FD307"
479 tags:
480 - db410c