radeonsi: sdma misc fixes
[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-29"
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 cache:
140 key: ${CI_JOB_NAME}
141 paths:
142 - ccache
143 variables:
144 CCACHE_COMPILERCHECK: "content"
145 # Use ccache transparently, and print stats before/after
146 before_script:
147 - export PATH="/usr/lib/ccache:$PATH"
148 - export CCACHE_BASEDIR="$PWD"
149 - export CCACHE_DIR="$PWD/ccache"
150 - ccache --max-size=1500M
151 - ccache --zero-stats || true
152 - ccache --show-stats || true
153 after_script:
154 # In case the install dir is being saved as artifacts, tar it up
155 # so that symlinks and hardlinks aren't each packed separately in
156 # the zip file.
157 - if [ -d install ]; then
158 tar -cf artifacts/install.tar install;
159 fi
160 - export CCACHE_DIR="$PWD/ccache"
161 - ccache --show-stats
162
163 .build-windows:
164 extends: .build-common
165 tags:
166 - mesa-windows
167 cache:
168 key: ${CI_JOB_NAME}
169 paths:
170 - subprojects/packagecache
171
172 .meson-build:
173 extends:
174 - .build-linux
175 - .use-debian-10:amd64
176 script:
177 - .gitlab-ci/meson-build.sh
178
179 .scons-build:
180 extends:
181 - .build-linux
182 - .use-debian-10:amd64
183 variables:
184 SCONSFLAGS: "-j4"
185 script:
186 - .gitlab-ci/scons-build.sh
187
188 meson-main:
189 extends:
190 - .meson-build
191 - .ci-deqp-artifacts
192 variables:
193 UNWIND: "true"
194 DRI_LOADERS: >
195 -D glx=dri
196 -D gbm=true
197 -D egl=true
198 -D platforms=x11,wayland,drm,surfaceless
199 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
200 GALLIUM_ST: >
201 -D dri3=true
202 -D gallium-extra-hud=true
203 -D gallium-vdpau=true
204 -D gallium-xvmc=true
205 -D gallium-omx=bellagio
206 -D gallium-va=true
207 -D gallium-xa=true
208 -D gallium-nine=true
209 -D gallium-opencl=disabled
210 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
211 LLVM_VERSION: "7"
212 EXTRA_OPTION: >
213 -D osmesa=gallium
214 -D tools=all
215 MESON_SHADERDB: "true"
216 BUILDTYPE: "debugoptimized"
217
218 .meson-cross:
219 extends:
220 - .meson-build
221 variables:
222 UNWIND: "false"
223 DRI_LOADERS: >
224 -D glx=disabled
225 -D gbm=false
226 -D egl=true
227 -D platforms=surfaceless
228 -D osmesa=none
229 GALLIUM_ST: >
230 -D dri3=false
231 -D gallium-vdpau=false
232 -D gallium-xvmc=false
233 -D gallium-omx=disabled
234 -D gallium-va=false
235 -D gallium-xa=false
236 -D gallium-nine=false
237
238 .meson-arm:
239 extends: .meson-cross
240 image: $DEBIAN_ARM64_IMAGE
241 variables:
242 VULKAN_DRIVERS: freedreno
243 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
244 EXTRA_OPTION: >
245 -D I-love-half-baked-turnips=true
246 needs:
247 - debian-10:arm64
248 tags:
249 - aarch64
250
251 meson-armhf:
252 extends: .meson-arm
253 variables:
254 CROSS: armhf
255 LLVM_VERSION: "7"
256
257 meson-arm64:
258 extends:
259 - .meson-arm
260 - .ci-deqp-artifacts
261 variables:
262 BUILDTYPE: "debugoptimized"
263
264 # NOTE: Building SWR is 2x (yes two) times slower than all the other
265 # gallium drivers combined.
266 # Start this early so that it doesn't limit the total run time.
267 #
268 # We also stick the glvnd build here, since we want non-glvnd in
269 # meson-main for actual driver CI.
270 meson-swr-glvnd:
271 extends: .meson-build
272 variables:
273 UNWIND: "true"
274 DRI_LOADERS: >
275 -D glvnd=true
276 -D egl=true
277 GALLIUM_ST: >
278 -D dri3=true
279 -D gallium-vdpau=false
280 -D gallium-xvmc=false
281 -D gallium-omx=disabled
282 -D gallium-va=false
283 -D gallium-xa=false
284 -D gallium-nine=false
285 -D gallium-opencl=disabled
286 GALLIUM_DRIVERS: "swr,iris"
287 LLVM_VERSION: "6.0"
288
289 meson-clang:
290 extends: .meson-build
291 variables:
292 UNWIND: "true"
293 DRI_DRIVERS: "auto"
294 GALLIUM_DRIVERS: "auto"
295 VULKAN_DRIVERS: intel,amd,freedreno
296 CC: "ccache clang-8"
297 CXX: "ccache clang++-8"
298
299 .meson-windows:
300 extends:
301 - .build-windows
302 before_script:
303 - $ENV:ARCH = "x86"
304 - $ENV:VERSION = "2019\Community"
305 script:
306 - cmd /C .gitlab-ci\meson-build.bat
307
308 scons-swr:
309 extends: .scons-build
310 variables:
311 SCONS_TARGET: "swr=1"
312 SCONS_CHECK_COMMAND: "true"
313 LLVM_VERSION: "6.0"
314
315 scons-win64:
316 extends: .scons-build
317 variables:
318 SCONS_TARGET: platform=windows machine=x86_64
319 SCONS_CHECK_COMMAND: "true"
320
321 meson-clover:
322 extends: .meson-build
323 variables:
324 UNWIND: "true"
325 DRI_LOADERS: >
326 -D glx=disabled
327 -D egl=false
328 -D gbm=false
329 GALLIUM_ST: >
330 -D dri3=false
331 -D gallium-vdpau=false
332 -D gallium-xvmc=false
333 -D gallium-omx=disabled
334 -D gallium-va=false
335 -D gallium-xa=false
336 -D gallium-nine=false
337 -D gallium-opencl=icd
338 script:
339 - export GALLIUM_DRIVERS="r600,radeonsi"
340 - .gitlab-ci/meson-build.sh
341 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
342 - export GALLIUM_DRIVERS="i915,r600"
343 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
344 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
345
346 meson-clover-old-llvm:
347 extends:
348 - meson-clover
349 - .use-debian-9:amd64
350 variables:
351 UNWIND: "false"
352 DRI_LOADERS: >
353 -D glx=disabled
354 -D egl=false
355 -D gbm=false
356 -D platforms=drm,surfaceless
357 GALLIUM_DRIVERS: "i915,r600"
358 script:
359 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
360 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
361 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
362
363 meson-vulkan:
364 extends: .meson-build
365 variables:
366 UNWIND: "false"
367 DRI_LOADERS: >
368 -D glx=disabled
369 -D gbm=false
370 -D egl=false
371 -D platforms=x11,wayland,drm
372 -D osmesa=none
373 GALLIUM_ST: >
374 -D dri3=true
375 -D gallium-vdpau=false
376 -D gallium-xvmc=false
377 -D gallium-omx=disabled
378 -D gallium-va=false
379 -D gallium-xa=false
380 -D gallium-nine=false
381 -D gallium-opencl=disabled
382 -D b_sanitize=undefined
383 -D c_args=-fno-sanitize-recover=all
384 -D cpp_args=-fno-sanitize-recover=all
385 UBSAN_OPTIONS: "print_stacktrace=1"
386 VULKAN_DRIVERS: intel,amd,freedreno
387 LLVM_VERSION: "8"
388 EXTRA_OPTION: >
389 -D vulkan-overlay-layer=true
390
391 # While the main point of this build is testing the i386 cross build,
392 # we also use this one to test some other options that are exclusive
393 # with meson-main's choices (classic swrast and osmesa)
394 meson-i386:
395 extends: .meson-cross
396 variables:
397 CROSS: i386
398 VULKAN_DRIVERS: intel
399 DRI_DRIVERS: "swrast"
400 GALLIUM_DRIVERS: "iris"
401 EXTRA_OPTION: >
402 -D vulkan-overlay-layer=true
403 -D llvm=false
404 -D osmesa=classic
405
406 meson-mingw32-x86_64:
407 extends: .meson-build
408 variables:
409 UNWIND: "false"
410 DRI_DRIVERS: ""
411 GALLIUM_DRIVERS: "swrast"
412 EXTRA_OPTION: >
413 -Dllvm=false
414 -Dosmesa=gallium
415 --cross-file=.gitlab-ci/x86_64-w64-mingw32
416
417 scons:
418 extends: .scons-build
419 variables:
420 SCONS_TARGET: "llvm=1"
421 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
422 script:
423 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
424 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
425 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
426 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
427
428 scons-old-llvm:
429 extends:
430 - scons
431 - .use-debian-9:amd64
432 script:
433 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
434 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
435 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
436
437 .test:
438 extends: .ci-run-policy
439 stage: test
440 variables:
441 GIT_STRATEGY: none # testing doesn't build anything from source
442
443 .deqp-test:
444 extends:
445 - .test
446 - .use-debian-10:amd64
447 variables:
448 DEQP_SKIPS: deqp-default-skips.txt
449 script:
450 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
451 - rm -rf install
452 - tar -xf artifacts/install.tar
453 - ./artifacts/deqp-runner.sh
454 artifacts:
455 when: on_failure
456 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
457 paths:
458 - results/
459 dependencies:
460 - meson-main
461 needs:
462 - meson-main
463 - debian-10:amd64
464
465 test-llvmpipe-gles2:
466 parallel: 4
467 variables:
468 DEQP_VER: gles2
469 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
470 LIBGL_ALWAYS_SOFTWARE: "true"
471 DEQP_RENDERER_MATCH: "llvmpipe"
472 extends: .deqp-test
473
474 test-softpipe-gles2:
475 extends: test-llvmpipe-gles2
476 variables:
477 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
478 DEQP_RENDERER_MATCH: "softpipe"
479 GALLIUM_DRIVER: "softpipe"
480
481 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
482 # 25 minutes. Until we can get its runtime down, just do a partial
483 # (every 10 tests) run.
484 test-softpipe-gles3-limited:
485 variables:
486 DEQP_VER: gles3
487 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
488 LIBGL_ALWAYS_SOFTWARE: "true"
489 DEQP_RENDERER_MATCH: "softpipe"
490 GALLIUM_DRIVER: "softpipe"
491 CI_NODE_INDEX: 1
492 CI_NODE_TOTAL: 10
493 extends: .deqp-test
494
495 arm64_a630_gles2:
496 extends: .deqp-test
497 image: $DEBIAN_ARM64_IMAGE
498 variables:
499 DEQP_VER: gles2
500 DEQP_RENDERER_MATCH: "FD630"
501 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
502 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
503 NIR_VALIDATE: 0
504 tags:
505 - mesa-cheza
506 dependencies:
507 - meson-arm64
508 needs:
509 - meson-arm64
510 - debian-10:arm64
511
512 arm64_a630_gles31:
513 extends: arm64_a630_gles2
514 parallel: 4
515 variables:
516 DEQP_VER: gles31
517
518 arm64_a630_gles3:
519 parallel: 6
520 extends: arm64_a630_gles2
521 variables:
522 DEQP_VER: gles3
523
524 arm64_a306_gles2:
525 parallel: 4
526 extends: arm64_a630_gles2
527 variables:
528 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
529 DEQP_SKIPS: deqp-default-skips.txt
530 DEQP_RENDERER_MATCH: "FD307"
531 tags:
532 - db410c