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