Meson: Check for dladdr with MinGW
[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-22"
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-22"
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 variables:
170 CCACHE_COMPILERCHECK: "content"
171 CCACHE_COMPRESS: "true"
172 CCACHE_DIR: /cache/mesa/ccache
173 # Use ccache transparently, and print stats before/after
174 before_script:
175 - export PATH="/usr/lib/ccache:$PATH"
176 - export CCACHE_BASEDIR="$PWD"
177 - ccache --show-stats
178 after_script:
179 - ccache --show-stats
180
181 .build-windows:
182 extends: .build-common
183 tags:
184 - mesa-windows
185 cache:
186 key: ${CI_JOB_NAME}
187 paths:
188 - subprojects/packagecache
189
190 .meson-build:
191 extends:
192 - .build-linux
193 - .use-x86_build
194 script:
195 - .gitlab-ci/meson-build.sh
196
197 .scons-build:
198 extends:
199 - .build-linux
200 - .use-x86_build
201 variables:
202 SCONSFLAGS: "-j4"
203 script:
204 - .gitlab-ci/scons-build.sh
205
206 meson-testing:
207 extends:
208 - .meson-build
209 - .ci-deqp-artifacts
210 variables:
211 UNWIND: "true"
212 DRI_LOADERS: >
213 -D glx=dri
214 -D gbm=true
215 -D egl=true
216 -D platforms=x11,drm,surfaceless
217 GALLIUM_ST: >
218 -D dri3=true
219 GALLIUM_DRIVERS: "swrast"
220 LLVM_VERSION: "7"
221 BUILDTYPE: "debugoptimized"
222 script:
223 - .gitlab-ci/meson-build.sh
224 - .gitlab-ci/prepare-artifacts.sh
225
226 meson-main:
227 extends: .meson-build
228 variables:
229 UNWIND: "true"
230 DRI_LOADERS: >
231 -D glx=dri
232 -D gbm=true
233 -D egl=true
234 -D platforms=x11,wayland,drm,surfaceless
235 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
236 GALLIUM_ST: >
237 -D dri3=true
238 -D gallium-extra-hud=true
239 -D gallium-vdpau=true
240 -D gallium-xvmc=true
241 -D gallium-omx=bellagio
242 -D gallium-va=true
243 -D gallium-xa=true
244 -D gallium-nine=true
245 -D gallium-opencl=disabled
246 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
247 LLVM_VERSION: "7"
248 EXTRA_OPTION: >
249 -D osmesa=gallium
250 -D tools=all
251 script:
252 - .gitlab-ci/meson-build.sh
253 - .gitlab-ci/run-shader-db.sh
254
255 .meson-cross:
256 extends:
257 - .meson-build
258 variables:
259 UNWIND: "false"
260 DRI_LOADERS: >
261 -D glx=disabled
262 -D gbm=false
263 -D egl=true
264 -D platforms=surfaceless
265 -D osmesa=none
266 GALLIUM_ST: >
267 -D dri3=false
268 -D gallium-vdpau=false
269 -D gallium-xvmc=false
270 -D gallium-omx=disabled
271 -D gallium-va=false
272 -D gallium-xa=false
273 -D gallium-nine=false
274
275 .meson-arm:
276 extends:
277 - .meson-cross
278 - .use-arm_build
279 variables:
280 VULKAN_DRIVERS: freedreno
281 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
282 EXTRA_OPTION: >
283 -D I-love-half-baked-turnips=true
284 tags:
285 - aarch64
286
287 meson-armhf:
288 extends: .meson-arm
289 variables:
290 CROSS: armhf
291 LLVM_VERSION: "7"
292
293 meson-arm64:
294 extends:
295 - .meson-arm
296 - .ci-deqp-artifacts
297 variables:
298 BUILDTYPE: "debugoptimized"
299 VULKAN_DRIVERS: "freedreno,amd"
300 script:
301 - .gitlab-ci/meson-build.sh
302 - .gitlab-ci/prepare-artifacts.sh
303
304 meson-clang:
305 extends: .meson-build
306 variables:
307 UNWIND: "true"
308 DRI_LOADERS: >
309 -D glvnd=true
310 DRI_DRIVERS: "auto"
311 GALLIUM_DRIVERS: "auto"
312 VULKAN_DRIVERS: intel,amd,freedreno
313 CC: "ccache clang-8"
314 CXX: "ccache clang++-8"
315
316 .meson-windows:
317 extends:
318 - .build-windows
319 before_script:
320 - $ENV:ARCH = "x86"
321 - $ENV:VERSION = "2019\Community"
322 script:
323 - cmd /C .gitlab-ci\meson-build.bat
324
325 scons-swr:
326 extends: .scons-build
327 variables:
328 SCONS_TARGET: "swr=1"
329 SCONS_CHECK_COMMAND: "true"
330 LLVM_VERSION: "6.0"
331
332 scons-win64:
333 extends: .scons-build
334 variables:
335 SCONS_TARGET: platform=windows machine=x86_64
336 SCONS_CHECK_COMMAND: "true"
337
338 meson-clover:
339 extends: .meson-build
340 variables:
341 UNWIND: "true"
342 DRI_LOADERS: >
343 -D glx=disabled
344 -D egl=false
345 -D gbm=false
346 GALLIUM_ST: >
347 -D dri3=false
348 -D gallium-vdpau=false
349 -D gallium-xvmc=false
350 -D gallium-omx=disabled
351 -D gallium-va=false
352 -D gallium-xa=false
353 -D gallium-nine=false
354 -D gallium-opencl=icd
355 script:
356 - export GALLIUM_DRIVERS="r600,radeonsi"
357 - .gitlab-ci/meson-build.sh
358 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
359 - export GALLIUM_DRIVERS="i915,r600"
360 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
361 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
362
363 meson-clover-old-llvm:
364 extends:
365 - meson-clover
366 - .use-x86_build_old
367 variables:
368 UNWIND: "false"
369 DRI_LOADERS: >
370 -D glx=disabled
371 -D egl=false
372 -D gbm=false
373 -D platforms=drm,surfaceless
374 GALLIUM_DRIVERS: "i915,r600"
375 script:
376 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
377 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
378 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
379
380 meson-vulkan:
381 extends: .meson-build
382 variables:
383 UNWIND: "false"
384 DRI_LOADERS: >
385 -D glx=disabled
386 -D gbm=false
387 -D egl=false
388 -D platforms=x11,wayland,drm
389 -D osmesa=none
390 GALLIUM_ST: >
391 -D dri3=true
392 -D gallium-vdpau=false
393 -D gallium-xvmc=false
394 -D gallium-omx=disabled
395 -D gallium-va=false
396 -D gallium-xa=false
397 -D gallium-nine=false
398 -D gallium-opencl=disabled
399 -D b_sanitize=undefined
400 -D c_args=-fno-sanitize-recover=all
401 -D cpp_args=-fno-sanitize-recover=all
402 UBSAN_OPTIONS: "print_stacktrace=1"
403 VULKAN_DRIVERS: intel,amd,freedreno
404 LLVM_VERSION: "8"
405 EXTRA_OPTION: >
406 -D vulkan-overlay-layer=true
407
408 # While the main point of this build is testing the i386 cross build,
409 # we also use this one to test some other options that are exclusive
410 # with meson-main's choices (classic swrast and osmesa)
411 meson-i386:
412 extends: .meson-cross
413 variables:
414 CROSS: i386
415 VULKAN_DRIVERS: intel
416 DRI_DRIVERS: "swrast"
417 GALLIUM_DRIVERS: "iris"
418 EXTRA_OPTION: >
419 -D vulkan-overlay-layer=true
420 -D llvm=false
421 -D osmesa=classic
422
423 meson-mingw32-x86_64:
424 extends: .meson-build
425 variables:
426 UNWIND: "false"
427 DRI_DRIVERS: ""
428 GALLIUM_DRIVERS: "swrast"
429 EXTRA_OPTION: >
430 -Dllvm=false
431 -Dosmesa=gallium
432 --cross-file=.gitlab-ci/x86_64-w64-mingw32
433
434 scons:
435 extends: .scons-build
436 variables:
437 SCONS_TARGET: "llvm=1"
438 SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
439 script:
440 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
441 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
442
443 scons-old-llvm:
444 extends:
445 - scons
446 - .use-x86_build_old
447 script:
448 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
449
450 .test:
451 extends:
452 - .ci-run-policy
453 stage: test
454 variables:
455 GIT_STRATEGY: none # testing doesn't build anything from source
456 TAG: *x86_test
457 image: "$CI_REGISTRY_IMAGE/debian/x86_test:$TAG"
458 before_script:
459 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
460 - rm -rf install
461 - tar -xf artifacts/install.tar
462 - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
463 artifacts:
464 when: always
465 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
466 paths:
467 - results/
468 dependencies:
469 - meson-testing
470 needs:
471 - meson-testing
472 - x86_test
473
474 .piglit-test:
475 extends: .test
476 artifacts:
477 reports:
478 junit: results/results.xml
479 variables:
480 LIBGL_ALWAYS_SOFTWARE: 1
481 PIGLIT_NO_WINDOW: 1
482 script:
483 - artifacts/piglit/run.sh
484
485 piglit-quick_gl:
486 extends: .piglit-test
487 variables:
488 LP_NUM_THREADS: 0
489 PIGLIT_OPTIONS: >
490 -x arb_gpu_shader5
491 -x glx-multithread-clearbuffer
492 -x glx-multithread-shader-compile
493 -x max-texture-size
494 -x maxsize
495 PIGLIT_PROFILES: quick_gl
496
497 piglit-glslparser+quick_shader:
498 extends: .piglit-test
499 variables:
500 LP_NUM_THREADS: 1
501 PIGLIT_OPTIONS: >
502 -x spec@arb_arrays_of_arrays@execution@ubo
503 -x spec@arb_gpu_shader_int64@execution$$
504 -x spec@arb_separate_shader_objects@execution
505 -x spec@arb_separate_shader_objects@linker
506 -x spec@arb_shader_storage_buffer_object@execution
507 -x spec@glsl-1.50@execution@built-in-functions
508 PIGLIT_PROFILES: "glslparser quick_shader"
509 PIGLIT_RESULTS: "glslparser+quick_shader"
510
511 .deqp-test:
512 extends: .test
513 variables:
514 DEQP_SKIPS: deqp-default-skips.txt
515 script:
516 - ./artifacts/deqp-runner.sh
517 artifacts:
518 reports:
519 junit: results/results.xml
520
521 test-llvmpipe-gles2:
522 variables:
523 DEQP_VER: gles2
524 DEQP_PARALLEL: 4
525 # Don't use threads inside llvmpipe, we've already got all 4 cores
526 # busy with DEQP_PARALLEL.
527 LP_NUM_THREADS: 0
528 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
529 LIBGL_ALWAYS_SOFTWARE: "true"
530 extends: .deqp-test
531
532 test-softpipe-gles2:
533 extends: test-llvmpipe-gles2
534 variables:
535 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
536 DEQP_SKIPS: deqp-softpipe-skips.txt
537 GALLIUM_DRIVER: "softpipe"
538
539 test-softpipe-gles3:
540 parallel: 2
541 variables:
542 DEQP_VER: gles3
543 extends: test-softpipe-gles2
544
545 test-softpipe-gles31:
546 parallel: 4
547 variables:
548 DEQP_VER: gles31
549 extends: test-softpipe-gles2
550
551 arm64_a630_gles2:
552 extends:
553 - .deqp-test
554 - .use-arm_test
555 variables:
556 DEQP_VER: gles2
557 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
558 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
559 NIR_VALIDATE: 0
560 DEQP_PARALLEL: 4
561 FLAKES_CHANNEL: "#freedreno-ci"
562 tags:
563 - mesa-cheza
564 dependencies:
565 - meson-arm64
566
567 arm64_a630_gles31:
568 extends: arm64_a630_gles2
569 variables:
570 DEQP_VER: gles31
571
572 arm64_a630_gles3:
573 extends: arm64_a630_gles2
574 variables:
575 DEQP_VER: gles3
576
577 arm64_a306_gles2:
578 extends: arm64_a630_gles2
579 variables:
580 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
581 DEQP_SKIPS: deqp-default-skips.txt
582 tags:
583 - db410c