android: amd/common: export amd/llvm headers
[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-07_1"
18 DEBIAN_ARM64_TAG: "arm64v8-2019-08-09"
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 - containers
36 - build
37 - test
38
39
40 # When to automatically run the CI
41 .ci-run-policy:
42 only:
43 - branches@mesa/mesa
44 - merge_requests
45 - /^ci([-/].*)?$/
46 retry:
47 max: 2
48 when:
49 - runner_system_failure
50
51 .ci-deqp-artifacts:
52 artifacts:
53 when: always
54 untracked: false
55 paths:
56 # Watch out! Artifacts are relative to the build dir.
57 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
58 - artifacts
59
60 # Build the normal CI native and cross-build docker images.
61
62 debian-10:
63 extends:
64 - .debian@container-ifnot-exists
65 - .ci-run-policy
66 stage: containers
67 variables:
68 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
69 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
70
71 .use-debian-10:
72 extends: .ci-run-policy
73 image: $DEBIAN_IMAGE
74 needs:
75 - debian-10
76
77 debian-9:
78 extends: debian-10
79 variables:
80 DEBIAN_TAG: $STRETCH_TAG
81 DEBIAN_VERSION: $STRETCH_VERSION
82 DEBIAN_IMAGE: $STRETCH_IMAGE
83 DEBIAN_EXEC: 'bash .gitlab-ci/debian-stretch-install.sh'
84
85 .use-debian-9:
86 image: $STRETCH_IMAGE
87 needs:
88 - debian-9
89
90 # Builds a Docker image with the native environment and VK-GL-CTS for testing.
91 test-container:arm64:
92 extends:
93 - .debian@container-ifnot-exists@arm64v8
94 - .ci-run-policy
95 stage: containers
96 variables:
97 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
98 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
99 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
100
101 # BUILD
102
103 .build:
104 extends: .use-debian-10
105 stage: build
106 cache:
107 key: ${CI_JOB_NAME}
108 paths:
109 - ccache
110 artifacts:
111 when: always
112 paths:
113 - _build/meson-logs/*.txt
114 # scons:
115 - build/*/config.log
116 - shader-db
117 variables:
118 CCACHE_COMPILERCHECK: "content"
119 # Use ccache transparently, and print stats before/after
120 before_script:
121 - export PATH="/usr/lib/ccache:$PATH"
122 - export CCACHE_BASEDIR="$PWD"
123 - export CCACHE_DIR="$PWD/ccache"
124 - ccache --max-size=1500M
125 - ccache --zero-stats || true
126 - ccache --show-stats || true
127 after_script:
128 # In case the install dir is being saved as artifacts, tar it up
129 # so that symlinks and hardlinks aren't each packed separately in
130 # the zip file.
131 - if [ -d install ]; then
132 tar -cf artifacts/install.tar install;
133 fi
134 - export CCACHE_DIR="$PWD/ccache"
135 - ccache --show-stats
136
137 .meson-build:
138 extends: .build
139 script:
140 - .gitlab-ci/meson-build.sh
141
142 .scons-build:
143 extends: .build
144 variables:
145 SCONSFLAGS: "-j4"
146 script:
147 - .gitlab-ci/scons-build.sh
148
149 meson-main:
150 extends:
151 - .meson-build
152 - .ci-deqp-artifacts
153 variables:
154 UNWIND: "true"
155 DRI_LOADERS: >
156 -D glx=dri
157 -D gbm=true
158 -D egl=true
159 -D platforms=x11,wayland,drm,surfaceless
160 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
161 GALLIUM_ST: >
162 -D dri3=true
163 -D gallium-extra-hud=true
164 -D gallium-vdpau=true
165 -D gallium-xvmc=true
166 -D gallium-omx=bellagio
167 -D gallium-va=true
168 -D gallium-xa=true
169 -D gallium-nine=true
170 -D gallium-opencl=disabled
171 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
172 LLVM_VERSION: "7"
173 EXTRA_OPTION: >
174 -D osmesa=gallium
175 -D tools=all
176 MESON_SHADERDB: "true"
177 BUILDTYPE: "debugoptimized"
178
179 .meson-cross:
180 extends:
181 - .meson-build
182 - .ci-deqp-artifacts
183 variables:
184 UNWIND: "false"
185 DRI_LOADERS: >
186 -D glx=disabled
187 -D gbm=false
188 -D egl=true
189 -D platforms=surfaceless
190 -D osmesa=none
191 GALLIUM_ST: >
192 -D dri3=false
193 -D gallium-vdpau=false
194 -D gallium-xvmc=false
195 -D gallium-omx=disabled
196 -D gallium-va=false
197 -D gallium-xa=false
198 -D gallium-nine=false
199 -D llvm=false
200
201 meson-armhf:
202 extends: .meson-cross
203 variables:
204 CROSS: armhf
205 VULKAN_DRIVERS: freedreno
206 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
207 # Disable the tests since we're cross compiling.
208 EXTRA_OPTION: >
209 -D build-tests=false
210 -D I-love-half-baked-turnips=true
211 -D vulkan-overlay-layer=true
212
213 meson-arm64:
214 extends: meson-armhf
215 variables:
216 CROSS: arm64
217 BUILDTYPE: "debugoptimized"
218
219 # NOTE: Building SWR is 2x (yes two) times slower than all the other
220 # gallium drivers combined.
221 # Start this early so that it doesn't limit the total run time.
222 #
223 # We also stick the glvnd build here, since we want non-glvnd in
224 # meson-main for actual driver CI.
225 meson-swr-glvnd:
226 extends: .meson-build
227 variables:
228 UNWIND: "true"
229 DRI_LOADERS: >
230 -D glvnd=true
231 -D egl=true
232 GALLIUM_ST: >
233 -D dri3=true
234 -D gallium-vdpau=false
235 -D gallium-xvmc=false
236 -D gallium-omx=disabled
237 -D gallium-va=false
238 -D gallium-xa=false
239 -D gallium-nine=false
240 -D gallium-opencl=disabled
241 GALLIUM_DRIVERS: "swr,iris"
242 LLVM_VERSION: "6.0"
243
244 meson-clang:
245 extends: .meson-build
246 variables:
247 UNWIND: "true"
248 DRI_DRIVERS: "auto"
249 GALLIUM_DRIVERS: "auto"
250 VULKAN_DRIVERS: intel,amd,freedreno
251 CC: "ccache clang-8"
252 CXX: "ccache clang++-8"
253
254 scons-swr:
255 extends: .scons-build
256 variables:
257 SCONS_TARGET: "swr=1"
258 SCONS_CHECK_COMMAND: "true"
259 LLVM_VERSION: "6.0"
260
261 scons-win64:
262 extends: .scons-build
263 variables:
264 SCONS_TARGET: platform=windows machine=x86_64
265 SCONS_CHECK_COMMAND: "true"
266
267 meson-clover:
268 extends: .meson-build
269 variables:
270 UNWIND: "true"
271 DRI_LOADERS: >
272 -D glx=disabled
273 -D egl=false
274 -D gbm=false
275 GALLIUM_ST: >
276 -D dri3=false
277 -D gallium-vdpau=false
278 -D gallium-xvmc=false
279 -D gallium-omx=disabled
280 -D gallium-va=false
281 -D gallium-xa=false
282 -D gallium-nine=false
283 -D gallium-opencl=icd
284 script:
285 - export GALLIUM_DRIVERS="r600,radeonsi"
286 - .gitlab-ci/meson-build.sh
287 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
288 - export GALLIUM_DRIVERS="i915,r600"
289 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
290 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
291
292 meson-clover-old-llvm:
293 extends:
294 - meson-clover
295 - .use-debian-9
296 variables:
297 UNWIND: "false"
298 DRI_LOADERS: >
299 -D glx=disabled
300 -D egl=false
301 -D gbm=false
302 -D platforms=drm,surfaceless
303 GALLIUM_DRIVERS: "i915,r600"
304 script:
305 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
306 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
307 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
308
309 meson-vulkan:
310 extends: .meson-build
311 variables:
312 UNWIND: "false"
313 DRI_LOADERS: >
314 -D glx=disabled
315 -D gbm=false
316 -D egl=false
317 -D platforms=x11,wayland,drm
318 -D osmesa=none
319 GALLIUM_ST: >
320 -D dri3=true
321 -D gallium-vdpau=false
322 -D gallium-xvmc=false
323 -D gallium-omx=disabled
324 -D gallium-va=false
325 -D gallium-xa=false
326 -D gallium-nine=false
327 -D gallium-opencl=disabled
328 VULKAN_DRIVERS: intel,amd,freedreno
329 LLVM_VERSION: "8"
330 EXTRA_OPTION: >
331 -D vulkan-overlay-layer=true
332
333 # While the main point of this build is testing the i386 cross build,
334 # we also use this one to test some other options that are exclusive
335 # with meson-main's choices (classic swrast and osmesa)
336 meson-i386:
337 extends: .meson-cross
338 variables:
339 CROSS: i386
340 VULKAN_DRIVERS: intel
341 DRI_DRIVERS: "swrast"
342 GALLIUM_DRIVERS: "iris"
343 EXTRA_OPTION: >
344 -D vulkan-overlay-layer=true
345 -D llvm=false
346 -D osmesa=classic
347
348 .meson-mingw32-x86_64:
349 extends: .meson-build
350 variables:
351 UNWIND: "false"
352 DRI_DRIVERS: ""
353 GALLIUM_DRIVERS: "swrast"
354 EXTRA_OPTION: >
355 -Dllvm=false
356 -Dosmesa=gallium
357 --cross-file=.gitlab-ci/x86_64-w64-mingw32
358
359 scons:
360 extends: .scons-build
361 variables:
362 SCONS_TARGET: "llvm=1"
363 SCONS_CHECK_COMMAND: "scons llvm=1 check"
364 script:
365 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check" .gitlab-ci/scons-build.sh
366 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
367 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
368 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
369
370 scons-old-llvm:
371 extends:
372 - scons
373 - .use-debian-9
374 script:
375 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
376 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
377 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
378
379 .deqp-test:
380 extends: .use-debian-10
381 stage: test
382 variables:
383 GIT_STRATEGY: none # testing doesn't build anything from source
384 DEQP_SKIPS: deqp-default-skips.txt
385 script:
386 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
387 - rm -rf install
388 - tar -xf artifacts/install.tar
389 - ./artifacts/deqp-runner.sh
390 artifacts:
391 when: on_failure
392 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
393 paths:
394 - results/
395 dependencies:
396 - meson-main
397 needs: [meson-main]
398
399 test-llvmpipe-gles2:
400 parallel: 4
401 variables:
402 DEQP_VER: gles2
403 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
404 LIBGL_ALWAYS_SOFTWARE: "true"
405 DEQP_RENDERER_MATCH: "llvmpipe"
406 extends: .deqp-test
407
408 test-softpipe-gles2:
409 extends: test-llvmpipe-gles2
410 variables:
411 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
412 DEQP_RENDERER_MATCH: "softpipe"
413 GALLIUM_DRIVER: "softpipe"
414
415 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
416 # 25 minutes. Until we can get its runtime down, just do a partial
417 # (every 10 tests) run.
418 test-softpipe-gles3-limited:
419 variables:
420 DEQP_VER: gles3
421 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
422 LIBGL_ALWAYS_SOFTWARE: "true"
423 DEQP_RENDERER_MATCH: "softpipe"
424 GALLIUM_DRIVER: "softpipe"
425 CI_NODE_INDEX: 1
426 CI_NODE_TOTAL: 10
427 extends: .deqp-test
428
429 arm64_a630_gles2:
430 extends: .deqp-test
431 image: $DEBIAN_ARM64_IMAGE
432 variables:
433 DEQP_VER: gles2
434 DEQP_RENDERER_MATCH: "FD630"
435 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
436 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
437 NIR_VALIDATE: 0
438 tags:
439 - mesa-cheza
440 dependencies:
441 - meson-arm64
442 needs:
443 - meson-arm64
444 - test-container:arm64
445
446 arm64_a630_gles31:
447 extends: arm64_a630_gles2
448 parallel: 4
449 variables:
450 DEQP_VER: gles31
451
452 arm64_a630_gles3:
453 parallel: 6
454 extends: arm64_a630_gles2
455 variables:
456 DEQP_VER: gles3
457
458 arm64_a306_gles2:
459 parallel: 4
460 extends: arm64_a630_gles2
461 variables:
462 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
463 DEQP_SKIPS: deqp-default-skips.txt
464 DEQP_RENDERER_MATCH: "FD307"
465 tags:
466 - db410c