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