panfrost: Multiply offset_units by 2
[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: "amd64-2019-11-13-2"
18 DEBIAN_TEST_TAG: "amd64-test-2019-11-15"
19 DEBIAN_ARM64_TAG: "arm64v8-2019-11-13"
20 DEBIAN_ARM64_TEST_TAG: "arm64v8-test-2019-11-12-2"
21 STRETCH_TAG: "2019-09-18"
22 DEBIAN_VERSION: buster-slim
23 STRETCH_VERSION: stretch-slim
24 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
25 DEBIAN_TEST_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TEST_TAG"
26 DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TAG"
27 DEBIAN_ARM64_TEST_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TEST_TAG"
28 STRETCH_IMAGE: "$CI_REGISTRY_IMAGE/debian/$STRETCH_VERSION:$STRETCH_TAG"
29
30 include:
31 - project: 'wayland/ci-templates'
32 ref: 1f7f57c64ff4ebbf7292e3b7a13600518b8cb24c
33 file: '/templates/debian.yml'
34
35 include:
36 - local: '.gitlab-ci/lava-gitlab-ci.yml'
37
38 stages:
39 - container
40 - build
41 - test
42
43
44 # When to automatically run the CI
45 .ci-run-policy:
46 only:
47 refs:
48 - branches@mesa/mesa
49 - merge_requests
50 - /^ci([-/].*)?$/
51 changes:
52 - VERSION
53 - bin/**/*
54 # GitLab CI
55 - .gitlab-ci.yml
56 - .gitlab-ci/**/*
57 # Meson
58 - meson*
59 - build-support/**/*
60 - subprojects/**/*
61 # SCons
62 - SConstruct
63 - scons/**/*
64 - common.py
65 # Source code
66 - include/**/*
67 - src/**/*
68 retry:
69 max: 2
70 when:
71 - runner_system_failure
72 # Cancel CI run if a newer commit is pushed to the same branch
73 interruptible: true
74
75 .ci-deqp-artifacts:
76 artifacts:
77 when: always
78 untracked: false
79 paths:
80 # Watch out! Artifacts are relative to the build dir.
81 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
82 - artifacts
83
84 # Build the normal CI native and cross-build docker images.
85
86 .container:
87 stage: container
88 extends:
89 - .ci-run-policy
90 variables:
91 # no need to pull the whole repo to build the container image
92 GIT_STRATEGY: none
93
94 debian-10:amd64:
95 extends:
96 - .debian@container-ifnot-exists
97 - .container
98 variables:
99 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
100
101 .use-debian-10:amd64:
102 image: $DEBIAN_IMAGE
103 needs:
104 - debian-10:amd64
105
106 debian-10-test:amd64:
107 extends: debian-10:amd64
108 variables:
109 DEBIAN_TAG: "$DEBIAN_TEST_TAG"
110 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
111
112 debian-9:amd64:
113 extends: debian-10:amd64
114 variables:
115 DEBIAN_TAG: $STRETCH_TAG
116 DEBIAN_VERSION: $STRETCH_VERSION
117 DEBIAN_IMAGE: $STRETCH_IMAGE
118 DEBIAN_EXEC: 'bash .gitlab-ci/debian-stretch-install.sh'
119
120 .use-debian-9:amd64:
121 image: $STRETCH_IMAGE
122 needs:
123 - debian-9:amd64
124
125 debian-10:arm64:
126 extends:
127 - .debian@container-ifnot-exists@arm64v8
128 - .container
129 variables:
130 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
131 DEBIAN_EXEC: 'bash .gitlab-ci/debian-arm64-install.sh'
132
133 debian-10-test:arm64:
134 extends:
135 - .debian@container-ifnot-exists@arm64v8
136 - .container
137 variables:
138 DEBIAN_TAG: "$DEBIAN_ARM64_TEST_TAG"
139 DEBIAN_EXEC: 'bash .gitlab-ci/debian-arm64-test-install.sh'
140
141
142 # BUILD
143
144 # Shared between windows and Linux
145 .build-common:
146 extends: .ci-run-policy
147 stage: build
148 artifacts:
149 when: always
150 paths:
151 - _build/meson-logs/*.txt
152 # scons:
153 - build/*/config.log
154 - shader-db
155
156 # Just Linux
157 .build-linux:
158 extends: .build-common
159 cache:
160 key: ${CI_JOB_NAME}
161 paths:
162 - ccache
163 variables:
164 CCACHE_COMPILERCHECK: "content"
165 # Use ccache transparently, and print stats before/after
166 before_script:
167 - export PATH="/usr/lib/ccache:$PATH"
168 - export CCACHE_BASEDIR="$PWD"
169 - export CCACHE_DIR="$PWD/ccache"
170 - ccache --max-size=1500M
171 - ccache --zero-stats || true
172 - ccache --show-stats || true
173 after_script:
174 - export CCACHE_DIR="$PWD/ccache"
175 - ccache --show-stats
176
177 .build-windows:
178 extends: .build-common
179 tags:
180 - mesa-windows
181 cache:
182 key: ${CI_JOB_NAME}
183 paths:
184 - subprojects/packagecache
185
186 .meson-build:
187 extends:
188 - .build-linux
189 - .use-debian-10:amd64
190 script:
191 - .gitlab-ci/meson-build.sh
192
193 .scons-build:
194 extends:
195 - .build-linux
196 - .use-debian-10:amd64
197 variables:
198 SCONSFLAGS: "-j4"
199 script:
200 - .gitlab-ci/scons-build.sh
201
202 meson-main:
203 extends:
204 - .meson-build
205 - .ci-deqp-artifacts
206 variables:
207 UNWIND: "true"
208 DRI_LOADERS: >
209 -D glx=dri
210 -D gbm=true
211 -D egl=true
212 -D platforms=x11,wayland,drm,surfaceless
213 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
214 GALLIUM_ST: >
215 -D dri3=true
216 -D gallium-extra-hud=true
217 -D gallium-vdpau=true
218 -D gallium-xvmc=true
219 -D gallium-omx=bellagio
220 -D gallium-va=true
221 -D gallium-xa=true
222 -D gallium-nine=true
223 -D gallium-opencl=disabled
224 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
225 LLVM_VERSION: "7"
226 EXTRA_OPTION: >
227 -D osmesa=gallium
228 -D tools=all
229 BUILDTYPE: "debugoptimized"
230 script:
231 - .gitlab-ci/meson-build.sh
232 - .gitlab-ci/run-shader-db.sh
233 - .gitlab-ci/prepare-artifacts.sh
234
235 .meson-cross:
236 extends:
237 - .meson-build
238 variables:
239 UNWIND: "false"
240 DRI_LOADERS: >
241 -D glx=disabled
242 -D gbm=false
243 -D egl=true
244 -D platforms=surfaceless
245 -D osmesa=none
246 GALLIUM_ST: >
247 -D dri3=false
248 -D gallium-vdpau=false
249 -D gallium-xvmc=false
250 -D gallium-omx=disabled
251 -D gallium-va=false
252 -D gallium-xa=false
253 -D gallium-nine=false
254
255 .meson-arm:
256 extends: .meson-cross
257 image: $DEBIAN_ARM64_IMAGE
258 variables:
259 VULKAN_DRIVERS: freedreno
260 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
261 EXTRA_OPTION: >
262 -D I-love-half-baked-turnips=true
263 needs:
264 - debian-10:arm64
265 tags:
266 - aarch64
267
268 meson-armhf:
269 extends: .meson-arm
270 variables:
271 CROSS: armhf
272 LLVM_VERSION: "7"
273
274 meson-arm64:
275 extends:
276 - .meson-arm
277 - .ci-deqp-artifacts
278 variables:
279 BUILDTYPE: "debugoptimized"
280 VULKAN_DRIVERS: "freedreno,amd"
281 script:
282 - .gitlab-ci/meson-build.sh
283 - .gitlab-ci/prepare-artifacts.sh
284
285 # NOTE: Building SWR is 2x (yes two) times slower than all the other
286 # gallium drivers combined.
287 # Start this early so that it doesn't limit the total run time.
288 #
289 # We also stick the glvnd build here, since we want non-glvnd in
290 # meson-main for actual driver CI.
291 meson-swr-glvnd:
292 extends: .meson-build
293 variables:
294 UNWIND: "true"
295 DRI_LOADERS: >
296 -D glvnd=true
297 -D egl=true
298 GALLIUM_ST: >
299 -D dri3=true
300 -D gallium-vdpau=false
301 -D gallium-xvmc=false
302 -D gallium-omx=disabled
303 -D gallium-va=false
304 -D gallium-xa=false
305 -D gallium-nine=false
306 -D gallium-opencl=disabled
307 GALLIUM_DRIVERS: "swr,iris"
308 LLVM_VERSION: "6.0"
309
310 meson-clang:
311 extends: .meson-build
312 variables:
313 UNWIND: "true"
314 DRI_DRIVERS: "auto"
315 GALLIUM_DRIVERS: "auto"
316 VULKAN_DRIVERS: intel,amd,freedreno
317 CC: "ccache clang-8"
318 CXX: "ccache clang++-8"
319
320 .meson-windows:
321 extends:
322 - .build-windows
323 before_script:
324 - $ENV:ARCH = "x86"
325 - $ENV:VERSION = "2019\Community"
326 script:
327 - cmd /C .gitlab-ci\meson-build.bat
328
329 scons-swr:
330 extends: .scons-build
331 variables:
332 SCONS_TARGET: "swr=1"
333 SCONS_CHECK_COMMAND: "true"
334 LLVM_VERSION: "6.0"
335
336 scons-win64:
337 extends: .scons-build
338 variables:
339 SCONS_TARGET: platform=windows machine=x86_64
340 SCONS_CHECK_COMMAND: "true"
341
342 meson-clover:
343 extends: .meson-build
344 variables:
345 UNWIND: "true"
346 DRI_LOADERS: >
347 -D glx=disabled
348 -D egl=false
349 -D gbm=false
350 GALLIUM_ST: >
351 -D dri3=false
352 -D gallium-vdpau=false
353 -D gallium-xvmc=false
354 -D gallium-omx=disabled
355 -D gallium-va=false
356 -D gallium-xa=false
357 -D gallium-nine=false
358 -D gallium-opencl=icd
359 script:
360 - export GALLIUM_DRIVERS="r600,radeonsi"
361 - .gitlab-ci/meson-build.sh
362 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
363 - export GALLIUM_DRIVERS="i915,r600"
364 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
365 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
366
367 meson-clover-old-llvm:
368 extends:
369 - meson-clover
370 - .use-debian-9:amd64
371 variables:
372 UNWIND: "false"
373 DRI_LOADERS: >
374 -D glx=disabled
375 -D egl=false
376 -D gbm=false
377 -D platforms=drm,surfaceless
378 GALLIUM_DRIVERS: "i915,r600"
379 script:
380 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
381 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
382 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
383
384 meson-vulkan:
385 extends: .meson-build
386 variables:
387 UNWIND: "false"
388 DRI_LOADERS: >
389 -D glx=disabled
390 -D gbm=false
391 -D egl=false
392 -D platforms=x11,wayland,drm
393 -D osmesa=none
394 GALLIUM_ST: >
395 -D dri3=true
396 -D gallium-vdpau=false
397 -D gallium-xvmc=false
398 -D gallium-omx=disabled
399 -D gallium-va=false
400 -D gallium-xa=false
401 -D gallium-nine=false
402 -D gallium-opencl=disabled
403 -D b_sanitize=undefined
404 -D c_args=-fno-sanitize-recover=all
405 -D cpp_args=-fno-sanitize-recover=all
406 UBSAN_OPTIONS: "print_stacktrace=1"
407 VULKAN_DRIVERS: intel,amd,freedreno
408 LLVM_VERSION: "8"
409 EXTRA_OPTION: >
410 -D vulkan-overlay-layer=true
411
412 # While the main point of this build is testing the i386 cross build,
413 # we also use this one to test some other options that are exclusive
414 # with meson-main's choices (classic swrast and osmesa)
415 meson-i386:
416 extends: .meson-cross
417 variables:
418 CROSS: i386
419 VULKAN_DRIVERS: intel
420 DRI_DRIVERS: "swrast"
421 GALLIUM_DRIVERS: "iris"
422 EXTRA_OPTION: >
423 -D vulkan-overlay-layer=true
424 -D llvm=false
425 -D osmesa=classic
426
427 meson-mingw32-x86_64:
428 extends: .meson-build
429 variables:
430 UNWIND: "false"
431 DRI_DRIVERS: ""
432 GALLIUM_DRIVERS: "swrast"
433 EXTRA_OPTION: >
434 -Dllvm=false
435 -Dosmesa=gallium
436 --cross-file=.gitlab-ci/x86_64-w64-mingw32
437
438 scons:
439 extends: .scons-build
440 variables:
441 SCONS_TARGET: "llvm=1"
442 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
443 script:
444 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
445 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
446 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
447 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
448
449 scons-old-llvm:
450 extends:
451 - scons
452 - .use-debian-9:amd64
453 script:
454 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
455 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
456 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
457
458 .test:
459 extends:
460 - .ci-run-policy
461 image: $DEBIAN_TEST_IMAGE
462 stage: test
463 variables:
464 GIT_STRATEGY: none # testing doesn't build anything from source
465 before_script:
466 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
467 - rm -rf install
468 - tar -xf artifacts/install.tar
469 - LD_LIBRARY_PATH=install/lib ldd install/lib/{*,dri/swrast_dri}.so
470 artifacts:
471 when: on_failure
472 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
473 paths:
474 - results/
475 dependencies:
476 - meson-main
477 needs:
478 - meson-main
479 - debian-10-test:amd64
480
481 .piglit-test:
482 extends: .test
483 artifacts:
484 reports:
485 junit: results/results.xml
486 variables:
487 LIBGL_ALWAYS_SOFTWARE: 1
488 PIGLIT_NO_WINDOW: 1
489 script:
490 - artifacts/piglit/run.sh
491
492 piglit-quick_gl:
493 extends: .piglit-test
494 variables:
495 LP_NUM_THREADS: 0
496 PIGLIT_OPTIONS: >
497 -x arb_gpu_shader5
498 -x glx-multithread-clearbuffer
499 -x glx-multithread-shader-compile
500 -x max-texture-size
501 -x maxsize
502 PIGLIT_PROFILES: quick_gl
503
504 piglit-glslparser+quick_shader:
505 extends: .piglit-test
506 variables:
507 LP_NUM_THREADS: 1
508 PIGLIT_OPTIONS: >
509 -x spec@arb_arrays_of_arrays@execution@ubo
510 -x spec@arb_gpu_shader_int64@execution$$
511 -x spec@arb_separate_shader_objects@execution
512 -x spec@arb_separate_shader_objects@linker
513 -x spec@arb_shader_storage_buffer_object@execution
514 -x spec@glsl-1.50@execution@built-in-functions
515 PIGLIT_PROFILES: "glslparser quick_shader"
516 PIGLIT_RESULTS: "glslparser+quick_shader"
517
518 .deqp-test:
519 extends: .test
520 variables:
521 DEQP_SKIPS: deqp-default-skips.txt
522 script:
523 - ./artifacts/deqp-runner.sh
524
525 test-llvmpipe-gles2:
526 variables:
527 DEQP_VER: gles2
528 DEQP_PARALLEL: 4
529 # Don't use threads inside llvmpipe, we've already got all 4 cores
530 # busy with DEQP_PARALLEL.
531 LP_NUM_THREADS: 0
532 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
533 LIBGL_ALWAYS_SOFTWARE: "true"
534 extends: .deqp-test
535
536 test-softpipe-gles2:
537 extends: test-llvmpipe-gles2
538 variables:
539 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
540 DEQP_SKIPS: deqp-softpipe-skips.txt
541 GALLIUM_DRIVER: "softpipe"
542
543 test-softpipe-gles3:
544 parallel: 2
545 variables:
546 DEQP_VER: gles3
547 extends: test-softpipe-gles2
548
549 test-softpipe-gles31:
550 parallel: 4
551 variables:
552 DEQP_VER: gles31
553 extends: test-softpipe-gles2
554
555 arm64_a630_gles2:
556 extends: .deqp-test
557 image: $DEBIAN_ARM64_TEST_IMAGE
558 variables:
559 DEQP_VER: gles2
560 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
561 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
562 NIR_VALIDATE: 0
563 tags:
564 - mesa-cheza
565 dependencies:
566 - meson-arm64
567 needs:
568 - meson-arm64
569 - debian-10-test:arm64
570
571 arm64_a630_gles31:
572 extends: arm64_a630_gles2
573 parallel: 4
574 variables:
575 DEQP_VER: gles31
576
577 arm64_a630_gles3:
578 parallel: 6
579 extends: arm64_a630_gles2
580 variables:
581 DEQP_VER: gles3
582
583 arm64_a306_gles2:
584 parallel: 4
585 extends: arm64_a630_gles2
586 variables:
587 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
588 DEQP_SKIPS: deqp-default-skips.txt
589 tags:
590 - db410c