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