radeonsi: fix shader disk cache key
[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-30"
18 DEBIAN_ARM64_TAG: "arm64v8-2019-10-23"
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 refs:
44 - branches@mesa/mesa
45 - merge_requests
46 - /^ci([-/].*)?$/
47 changes:
48 - VERSION
49 - bin/**/*
50 # GitLab CI
51 - .gitlab-ci.yml
52 - .gitlab-ci/**/*
53 # Meson
54 - meson*
55 - build-support/**/*
56 - subprojects/**/*
57 # SCons
58 - SConstruct
59 - scons/**/*
60 - common.py
61 # Source code
62 - include/**/*
63 - src/**/*
64 retry:
65 max: 2
66 when:
67 - runner_system_failure
68
69 .ci-deqp-artifacts:
70 artifacts:
71 when: always
72 untracked: false
73 paths:
74 # Watch out! Artifacts are relative to the build dir.
75 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
76 - artifacts
77
78 # Build the normal CI native and cross-build docker images.
79
80 .container:
81 stage: container
82 extends:
83 - .ci-run-policy
84 variables:
85 # no need to pull the whole repo to build the container image
86 GIT_STRATEGY: none
87
88 debian-10:amd64:
89 extends:
90 - .debian@container-ifnot-exists
91 - .container
92 variables:
93 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
94
95 .use-debian-10:amd64:
96 image: $DEBIAN_IMAGE
97 needs:
98 - debian-10:amd64
99
100 debian-9:amd64:
101 extends: debian-10:amd64
102 variables:
103 DEBIAN_TAG: $STRETCH_TAG
104 DEBIAN_VERSION: $STRETCH_VERSION
105 DEBIAN_IMAGE: $STRETCH_IMAGE
106 DEBIAN_EXEC: 'bash .gitlab-ci/debian-stretch-install.sh'
107
108 .use-debian-9:amd64:
109 image: $STRETCH_IMAGE
110 needs:
111 - debian-9:amd64
112
113 debian-10:arm64:
114 extends:
115 - .debian@container-ifnot-exists@arm64v8
116 - .container
117 variables:
118 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
119 DEBIAN_EXEC: 'bash .gitlab-ci/debian-arm64-install.sh'
120
121
122 # BUILD
123
124 # Shared between windows and Linux
125 .build-common:
126 extends: .ci-run-policy
127 stage: build
128 artifacts:
129 when: always
130 paths:
131 - _build/meson-logs/*.txt
132 # scons:
133 - build/*/config.log
134 - shader-db
135
136 # Just Linux
137 .build-linux:
138 extends: .build-common
139 tags:
140 - mesa-autoscale
141 cache:
142 key: ${CI_JOB_NAME}
143 paths:
144 - ccache
145 variables:
146 CCACHE_COMPILERCHECK: "content"
147 NINJA_FLAGS: "-j8" # autoscale is provisioned at 4 CPUs/job.
148 # kubernetes (the mesa-autoscale runner) always has a clean working
149 # dir, so we can't reuse the git clone, but that also means we don't
150 # need to download any extra history (normally extra history is
151 # needed so that a future fetch can find a shared parent).
152 GIT_DEPTH: 1
153 # Autoscale runners have 300GB of disk (since iops/throughput
154 # scales with disk size!), but we want to leave lots of space for
155 # container caching.
156 CCACHE_SIZE: 20G
157 # Use ccache transparently, and print stats before/after
158 before_script:
159 - export PATH="/usr/lib/ccache:$PATH"
160 - export CCACHE_BASEDIR="$PWD"
161 - ccache --max-size="$CCACHE_SIZE" || true
162 - if [ "$CCACHE_DIR" = "$CI_PROJECT_DIR/ccache" ]; then ccache --zero-stats; fi
163 - ccache --show-stats || true
164 after_script:
165 # In case the install dir is being saved as artifacts, tar it up
166 # so that symlinks and hardlinks aren't each packed separately in
167 # the zip file.
168 - if [ -d install ]; then
169 tar -cf artifacts/install.tar install;
170 fi
171 - ccache --show-stats
172
173 .build-windows:
174 extends: .build-common
175 tags:
176 - mesa-windows
177 cache:
178 key: ${CI_JOB_NAME}
179 paths:
180 - subprojects/packagecache
181
182 .meson-build:
183 extends:
184 - .build-linux
185 - .use-debian-10:amd64
186 script:
187 - .gitlab-ci/meson-build.sh
188
189 .scons-build:
190 extends:
191 - .build-linux
192 - .use-debian-10:amd64
193 variables:
194 SCONSFLAGS: "-j8"
195 script:
196 - .gitlab-ci/scons-build.sh
197
198 meson-main:
199 extends:
200 - .meson-build
201 - .ci-deqp-artifacts
202 variables:
203 UNWIND: "true"
204 DRI_LOADERS: >
205 -D glx=dri
206 -D gbm=true
207 -D egl=true
208 -D platforms=x11,wayland,drm,surfaceless
209 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
210 GALLIUM_ST: >
211 -D dri3=true
212 -D gallium-extra-hud=true
213 -D gallium-vdpau=true
214 -D gallium-xvmc=true
215 -D gallium-omx=bellagio
216 -D gallium-va=true
217 -D gallium-xa=true
218 -D gallium-nine=true
219 -D gallium-opencl=disabled
220 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
221 LLVM_VERSION: "7"
222 EXTRA_OPTION: >
223 -D osmesa=gallium
224 -D tools=all
225 MESON_SHADERDB: "true"
226 BUILDTYPE: "debugoptimized"
227
228 .meson-cross:
229 extends:
230 - .meson-build
231 variables:
232 UNWIND: "false"
233 DRI_LOADERS: >
234 -D glx=disabled
235 -D gbm=false
236 -D egl=true
237 -D platforms=surfaceless
238 -D osmesa=none
239 GALLIUM_ST: >
240 -D dri3=false
241 -D gallium-vdpau=false
242 -D gallium-xvmc=false
243 -D gallium-omx=disabled
244 -D gallium-va=false
245 -D gallium-xa=false
246 -D gallium-nine=false
247
248 .meson-arm:
249 extends: .meson-cross
250 image: $DEBIAN_ARM64_IMAGE
251 variables:
252 VULKAN_DRIVERS: freedreno
253 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
254 EXTRA_OPTION: >
255 -D I-love-half-baked-turnips=true
256 NINJA_FLAGS: "-j4"
257 CCACHE_DIR: "$CI_PROJECT_DIR/ccache"
258 CCACHE_SIZE: "1500M"
259 needs:
260 - debian-10:arm64
261 tags:
262 - aarch64
263
264 meson-armhf:
265 extends: .meson-arm
266 variables:
267 CROSS: armhf
268 LLVM_VERSION: "7"
269
270 meson-arm64:
271 extends:
272 - .meson-arm
273 - .ci-deqp-artifacts
274 variables:
275 BUILDTYPE: "debugoptimized"
276
277 # NOTE: Building SWR is 2x (yes two) times slower than all the other
278 # gallium drivers combined.
279 # Start this early so that it doesn't limit the total run time.
280 #
281 # We also stick the glvnd build here, since we want non-glvnd in
282 # meson-main for actual driver CI.
283 meson-swr-glvnd:
284 extends: .meson-build
285 variables:
286 UNWIND: "true"
287 DRI_LOADERS: >
288 -D glvnd=true
289 -D egl=true
290 GALLIUM_ST: >
291 -D dri3=true
292 -D gallium-vdpau=false
293 -D gallium-xvmc=false
294 -D gallium-omx=disabled
295 -D gallium-va=false
296 -D gallium-xa=false
297 -D gallium-nine=false
298 -D gallium-opencl=disabled
299 GALLIUM_DRIVERS: "swr,iris"
300 LLVM_VERSION: "6.0"
301
302 meson-clang:
303 extends: .meson-build
304 variables:
305 UNWIND: "true"
306 DRI_DRIVERS: "auto"
307 GALLIUM_DRIVERS: "auto"
308 VULKAN_DRIVERS: intel,amd,freedreno
309 CC: "ccache clang-8"
310 CXX: "ccache clang++-8"
311
312 .meson-windows:
313 extends:
314 - .build-windows
315 before_script:
316 - $ENV:ARCH = "x86"
317 - $ENV:VERSION = "2019\Community"
318 script:
319 - cmd /C .gitlab-ci\meson-build.bat
320
321 scons-swr:
322 extends: .scons-build
323 variables:
324 SCONS_TARGET: "swr=1"
325 SCONS_CHECK_COMMAND: "true"
326 LLVM_VERSION: "6.0"
327
328 scons-win64:
329 extends: .scons-build
330 variables:
331 SCONS_TARGET: platform=windows machine=x86_64
332 SCONS_CHECK_COMMAND: "true"
333
334 meson-clover:
335 extends: .meson-build
336 variables:
337 UNWIND: "true"
338 DRI_LOADERS: >
339 -D glx=disabled
340 -D egl=false
341 -D gbm=false
342 GALLIUM_ST: >
343 -D dri3=false
344 -D gallium-vdpau=false
345 -D gallium-xvmc=false
346 -D gallium-omx=disabled
347 -D gallium-va=false
348 -D gallium-xa=false
349 -D gallium-nine=false
350 -D gallium-opencl=icd
351 script:
352 - export GALLIUM_DRIVERS="r600,radeonsi"
353 - .gitlab-ci/meson-build.sh
354 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
355 - export GALLIUM_DRIVERS="i915,r600"
356 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
357 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
358
359 meson-clover-old-llvm:
360 extends:
361 - meson-clover
362 - .use-debian-9:amd64
363 variables:
364 UNWIND: "false"
365 DRI_LOADERS: >
366 -D glx=disabled
367 -D egl=false
368 -D gbm=false
369 -D platforms=drm,surfaceless
370 GALLIUM_DRIVERS: "i915,r600"
371 script:
372 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
373 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
374 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
375
376 meson-vulkan:
377 extends: .meson-build
378 variables:
379 UNWIND: "false"
380 DRI_LOADERS: >
381 -D glx=disabled
382 -D gbm=false
383 -D egl=false
384 -D platforms=x11,wayland,drm
385 -D osmesa=none
386 GALLIUM_ST: >
387 -D dri3=true
388 -D gallium-vdpau=false
389 -D gallium-xvmc=false
390 -D gallium-omx=disabled
391 -D gallium-va=false
392 -D gallium-xa=false
393 -D gallium-nine=false
394 -D gallium-opencl=disabled
395 -D b_sanitize=undefined
396 -D c_args=-fno-sanitize-recover=all
397 -D cpp_args=-fno-sanitize-recover=all
398 UBSAN_OPTIONS: "print_stacktrace=1"
399 VULKAN_DRIVERS: intel,amd,freedreno
400 LLVM_VERSION: "8"
401 EXTRA_OPTION: >
402 -D vulkan-overlay-layer=true
403
404 # While the main point of this build is testing the i386 cross build,
405 # we also use this one to test some other options that are exclusive
406 # with meson-main's choices (classic swrast and osmesa)
407 meson-i386:
408 extends: .meson-cross
409 variables:
410 CROSS: i386
411 VULKAN_DRIVERS: intel
412 DRI_DRIVERS: "swrast"
413 GALLIUM_DRIVERS: "iris"
414 EXTRA_OPTION: >
415 -D vulkan-overlay-layer=true
416 -D llvm=false
417 -D osmesa=classic
418
419 meson-mingw32-x86_64:
420 extends: .meson-build
421 variables:
422 UNWIND: "false"
423 DRI_DRIVERS: ""
424 GALLIUM_DRIVERS: "swrast"
425 EXTRA_OPTION: >
426 -Dllvm=false
427 -Dosmesa=gallium
428 --cross-file=.gitlab-ci/x86_64-w64-mingw32
429
430 scons:
431 extends: .scons-build
432 variables:
433 SCONS_TARGET: "llvm=1"
434 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
435 script:
436 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
437 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
438 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
439 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
440
441 scons-old-llvm:
442 extends:
443 - scons
444 - .use-debian-9:amd64
445 script:
446 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
447 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
448 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
449
450 .test:
451 extends: .ci-run-policy
452 stage: test
453 variables:
454 GIT_STRATEGY: none # testing doesn't build anything from source
455
456 .deqp-test:
457 extends:
458 - .test
459 - .use-debian-10:amd64
460 variables:
461 DEQP_SKIPS: deqp-default-skips.txt
462 script:
463 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
464 - rm -rf install
465 - tar -xf artifacts/install.tar
466 - ./artifacts/deqp-runner.sh
467 artifacts:
468 when: on_failure
469 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
470 paths:
471 - results/
472 dependencies:
473 - meson-main
474 needs:
475 - meson-main
476 - debian-10:amd64
477
478 test-llvmpipe-gles2:
479 parallel: 4
480 variables:
481 DEQP_VER: gles2
482 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
483 LIBGL_ALWAYS_SOFTWARE: "true"
484 DEQP_RENDERER_MATCH: "llvmpipe"
485 extends: .deqp-test
486
487 test-softpipe-gles2:
488 extends: test-llvmpipe-gles2
489 variables:
490 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
491 DEQP_RENDERER_MATCH: "softpipe"
492 GALLIUM_DRIVER: "softpipe"
493
494 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
495 # 25 minutes. Until we can get its runtime down, just do a partial
496 # (every 10 tests) run.
497 test-softpipe-gles3-limited:
498 variables:
499 DEQP_VER: gles3
500 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
501 LIBGL_ALWAYS_SOFTWARE: "true"
502 DEQP_RENDERER_MATCH: "softpipe"
503 GALLIUM_DRIVER: "softpipe"
504 CI_NODE_INDEX: 1
505 CI_NODE_TOTAL: 10
506 extends: .deqp-test
507
508 arm64_a630_gles2:
509 extends: .deqp-test
510 image: $DEBIAN_ARM64_IMAGE
511 variables:
512 DEQP_VER: gles2
513 DEQP_RENDERER_MATCH: "FD630"
514 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
515 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
516 NIR_VALIDATE: 0
517 tags:
518 - mesa-cheza
519 dependencies:
520 - meson-arm64
521 needs:
522 - meson-arm64
523 - debian-10:arm64
524
525 arm64_a630_gles31:
526 extends: arm64_a630_gles2
527 parallel: 4
528 variables:
529 DEQP_VER: gles31
530
531 arm64_a630_gles3:
532 parallel: 6
533 extends: arm64_a630_gles2
534 variables:
535 DEQP_VER: gles3
536
537 arm64_a306_gles2:
538 parallel: 4
539 extends: arm64_a630_gles2
540 variables:
541 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
542 DEQP_SKIPS: deqp-default-skips.txt
543 DEQP_RENDERER_MATCH: "FD307"
544 tags:
545 - db410c