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