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