gitlab-ci: build GLVND in meson-clang
[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 egl=true
322 GALLIUM_ST: >
323 -D dri3=true
324 -D gallium-vdpau=false
325 -D gallium-xvmc=false
326 -D gallium-omx=disabled
327 -D gallium-va=false
328 -D gallium-xa=false
329 -D gallium-nine=false
330 -D gallium-opencl=disabled
331 GALLIUM_DRIVERS: "iris"
332 LLVM_VERSION: "6.0"
333
334 meson-clang:
335 extends: .meson-build
336 variables:
337 UNWIND: "true"
338 DRI_LOADERS: >
339 -D glvnd=true
340 DRI_DRIVERS: "auto"
341 GALLIUM_DRIVERS: "auto"
342 VULKAN_DRIVERS: intel,amd,freedreno
343 CC: "ccache clang-8"
344 CXX: "ccache clang++-8"
345
346 .meson-windows:
347 extends:
348 - .build-windows
349 before_script:
350 - $ENV:ARCH = "x86"
351 - $ENV:VERSION = "2019\Community"
352 script:
353 - cmd /C .gitlab-ci\meson-build.bat
354
355 scons-swr:
356 extends: .scons-build
357 variables:
358 SCONS_TARGET: "swr=1"
359 SCONS_CHECK_COMMAND: "true"
360 LLVM_VERSION: "6.0"
361
362 scons-win64:
363 extends: .scons-build
364 variables:
365 SCONS_TARGET: platform=windows machine=x86_64
366 SCONS_CHECK_COMMAND: "true"
367
368 meson-clover:
369 extends: .meson-build
370 variables:
371 UNWIND: "true"
372 DRI_LOADERS: >
373 -D glx=disabled
374 -D egl=false
375 -D gbm=false
376 GALLIUM_ST: >
377 -D dri3=false
378 -D gallium-vdpau=false
379 -D gallium-xvmc=false
380 -D gallium-omx=disabled
381 -D gallium-va=false
382 -D gallium-xa=false
383 -D gallium-nine=false
384 -D gallium-opencl=icd
385 script:
386 - export GALLIUM_DRIVERS="r600,radeonsi"
387 - .gitlab-ci/meson-build.sh
388 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
389 - export GALLIUM_DRIVERS="i915,r600"
390 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
391 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
392
393 meson-clover-old-llvm:
394 extends:
395 - meson-clover
396 - .use-x86_build_old
397 variables:
398 UNWIND: "false"
399 DRI_LOADERS: >
400 -D glx=disabled
401 -D egl=false
402 -D gbm=false
403 -D platforms=drm,surfaceless
404 GALLIUM_DRIVERS: "i915,r600"
405 script:
406 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
407 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
408 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
409
410 meson-vulkan:
411 extends: .meson-build
412 variables:
413 UNWIND: "false"
414 DRI_LOADERS: >
415 -D glx=disabled
416 -D gbm=false
417 -D egl=false
418 -D platforms=x11,wayland,drm
419 -D osmesa=none
420 GALLIUM_ST: >
421 -D dri3=true
422 -D gallium-vdpau=false
423 -D gallium-xvmc=false
424 -D gallium-omx=disabled
425 -D gallium-va=false
426 -D gallium-xa=false
427 -D gallium-nine=false
428 -D gallium-opencl=disabled
429 -D b_sanitize=undefined
430 -D c_args=-fno-sanitize-recover=all
431 -D cpp_args=-fno-sanitize-recover=all
432 UBSAN_OPTIONS: "print_stacktrace=1"
433 VULKAN_DRIVERS: intel,amd,freedreno
434 LLVM_VERSION: "8"
435 EXTRA_OPTION: >
436 -D vulkan-overlay-layer=true
437
438 # While the main point of this build is testing the i386 cross build,
439 # we also use this one to test some other options that are exclusive
440 # with meson-main's choices (classic swrast and osmesa)
441 meson-i386:
442 extends: .meson-cross
443 variables:
444 CROSS: i386
445 VULKAN_DRIVERS: intel
446 DRI_DRIVERS: "swrast"
447 GALLIUM_DRIVERS: "iris"
448 EXTRA_OPTION: >
449 -D vulkan-overlay-layer=true
450 -D llvm=false
451 -D osmesa=classic
452
453 meson-mingw32-x86_64:
454 extends: .meson-build
455 variables:
456 UNWIND: "false"
457 DRI_DRIVERS: ""
458 GALLIUM_DRIVERS: "swrast"
459 EXTRA_OPTION: >
460 -Dllvm=false
461 -Dosmesa=gallium
462 --cross-file=.gitlab-ci/x86_64-w64-mingw32
463
464 scons:
465 extends: .scons-build
466 variables:
467 SCONS_TARGET: "llvm=1"
468 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
469 script:
470 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
471 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
472 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
473 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
474
475 scons-old-llvm:
476 extends:
477 - scons
478 - .use-x86_build_old
479 script:
480 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
481 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
482 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
483
484 .test:
485 extends:
486 - .ci-run-policy
487 stage: test
488 variables:
489 GIT_STRATEGY: none # testing doesn't build anything from source
490 TAG: *x86_test
491 image: "$CI_REGISTRY_IMAGE/debian/x86_test:$TAG"
492 before_script:
493 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
494 - rm -rf install
495 - tar -xf artifacts/install.tar
496 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
497 artifacts:
498 when: on_failure
499 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
500 paths:
501 - results/
502 dependencies:
503 - meson-testing
504 needs:
505 - meson-testing
506 - x86_test
507
508 .piglit-test:
509 extends: .test
510 artifacts:
511 reports:
512 junit: results/results.xml
513 variables:
514 LIBGL_ALWAYS_SOFTWARE: 1
515 PIGLIT_NO_WINDOW: 1
516 script:
517 - artifacts/piglit/run.sh
518
519 piglit-quick_gl:
520 extends: .piglit-test
521 variables:
522 LP_NUM_THREADS: 0
523 PIGLIT_OPTIONS: >
524 -x arb_gpu_shader5
525 -x glx-multithread-clearbuffer
526 -x glx-multithread-shader-compile
527 -x max-texture-size
528 -x maxsize
529 PIGLIT_PROFILES: quick_gl
530
531 piglit-glslparser+quick_shader:
532 extends: .piglit-test
533 variables:
534 LP_NUM_THREADS: 1
535 PIGLIT_OPTIONS: >
536 -x spec@arb_arrays_of_arrays@execution@ubo
537 -x spec@arb_gpu_shader_int64@execution$$
538 -x spec@arb_separate_shader_objects@execution
539 -x spec@arb_separate_shader_objects@linker
540 -x spec@arb_shader_storage_buffer_object@execution
541 -x spec@glsl-1.50@execution@built-in-functions
542 PIGLIT_PROFILES: "glslparser quick_shader"
543 PIGLIT_RESULTS: "glslparser+quick_shader"
544
545 .deqp-test:
546 extends: .test
547 variables:
548 DEQP_SKIPS: deqp-default-skips.txt
549 script:
550 - ./artifacts/deqp-runner.sh
551
552 test-llvmpipe-gles2:
553 variables:
554 DEQP_VER: gles2
555 DEQP_PARALLEL: 4
556 # Don't use threads inside llvmpipe, we've already got all 4 cores
557 # busy with DEQP_PARALLEL.
558 LP_NUM_THREADS: 0
559 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
560 LIBGL_ALWAYS_SOFTWARE: "true"
561 extends: .deqp-test
562
563 test-softpipe-gles2:
564 extends: test-llvmpipe-gles2
565 variables:
566 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
567 DEQP_SKIPS: deqp-softpipe-skips.txt
568 GALLIUM_DRIVER: "softpipe"
569
570 test-softpipe-gles3:
571 parallel: 2
572 variables:
573 DEQP_VER: gles3
574 extends: test-softpipe-gles2
575
576 test-softpipe-gles31:
577 parallel: 4
578 variables:
579 DEQP_VER: gles31
580 extends: test-softpipe-gles2
581
582 arm64_a630_gles2:
583 extends:
584 - .deqp-test
585 - .use-arm_test
586 variables:
587 DEQP_VER: gles2
588 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
589 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
590 NIR_VALIDATE: 0
591 tags:
592 - mesa-cheza
593 dependencies:
594 - meson-arm64
595
596 arm64_a630_gles31:
597 extends: arm64_a630_gles2
598 parallel: 4
599 variables:
600 DEQP_VER: gles31
601
602 arm64_a630_gles3:
603 parallel: 6
604 extends: arm64_a630_gles2
605 variables:
606 DEQP_VER: gles3
607
608 arm64_a306_gles2:
609 parallel: 4
610 extends: arm64_a630_gles2
611 variables:
612 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
613 DEQP_SKIPS: deqp-default-skips.txt
614 tags:
615 - db410c