android: aco: add support for libmesa_aco
[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 - .gitlab-ci/scons-build.sh
133
134 meson-main:
135 extends:
136 - .meson-build
137 - .ci-deqp-artifacts
138 variables:
139 UNWIND: "true"
140 DRI_LOADERS: >
141 -D glx=dri
142 -D gbm=true
143 -D egl=true
144 -D platforms=x11,wayland,drm,surfaceless
145 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
146 GALLIUM_ST: >
147 -D dri3=true
148 -D gallium-extra-hud=true
149 -D gallium-vdpau=true
150 -D gallium-xvmc=true
151 -D gallium-omx=bellagio
152 -D gallium-va=true
153 -D gallium-xa=true
154 -D gallium-nine=true
155 -D gallium-opencl=disabled
156 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
157 LLVM_VERSION: "7"
158 EXTRA_OPTION: >
159 -D osmesa=gallium
160 -D tools=all
161 MESON_SHADERDB: "true"
162 BUILDTYPE: "debugoptimized"
163
164 .meson-cross:
165 extends:
166 - .meson-build
167 - .ci-deqp-artifacts
168 variables:
169 UNWIND: "false"
170 DRI_LOADERS: >
171 -D glx=disabled
172 -D gbm=false
173 -D egl=true
174 -D platforms=surfaceless
175 -D osmesa=none
176 GALLIUM_ST: >
177 -D dri3=false
178 -D gallium-vdpau=false
179 -D gallium-xvmc=false
180 -D gallium-omx=disabled
181 -D gallium-va=false
182 -D gallium-xa=false
183 -D gallium-nine=false
184 -D llvm=false
185 script:
186 - .gitlab-ci/meson-build.sh
187
188 meson-armhf:
189 extends: .meson-cross
190 variables:
191 CROSS: armhf
192 VULKAN_DRIVERS: freedreno
193 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
194 # Disable the tests since we're cross compiling.
195 EXTRA_OPTION: >
196 -D build-tests=false
197 -D I-love-half-baked-turnips=true
198 -D vulkan-overlay-layer=true
199
200 meson-arm64:
201 extends: meson-armhf
202 variables:
203 CROSS: arm64
204 BUILDTYPE: "debugoptimized"
205
206 # NOTE: Building SWR is 2x (yes two) times slower than all the other
207 # gallium drivers combined.
208 # Start this early so that it doesn't limit the total run time.
209 #
210 # We also stick the glvnd build here, since we want non-glvnd in
211 # meson-main for actual driver CI.
212 meson-swr-glvnd:
213 extends: .meson-build
214 variables:
215 UNWIND: "true"
216 DRI_LOADERS: >
217 -D glvnd=true
218 -D egl=true
219 GALLIUM_ST: >
220 -D dri3=true
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=disabled
228 GALLIUM_DRIVERS: "swr,iris"
229 LLVM_VERSION: "6.0"
230
231 meson-clang:
232 extends: .meson-build
233 variables:
234 UNWIND: "true"
235 DRI_DRIVERS: "auto"
236 GALLIUM_DRIVERS: "auto"
237 VULKAN_DRIVERS: intel,amd,freedreno
238 CC: "ccache clang-8"
239 CXX: "ccache clang++-8"
240
241 scons-swr:
242 extends: .scons-build
243 variables:
244 SCONS_TARGET: "swr=1"
245 SCONS_CHECK_COMMAND: "true"
246 LLVM_VERSION: "6.0"
247
248 scons-win64:
249 extends: .scons-build
250 variables:
251 SCONS_TARGET: platform=windows machine=x86_64
252 SCONS_CHECK_COMMAND: "true"
253
254 meson-clover:
255 extends: .meson-build
256 variables:
257 UNWIND: "true"
258 DRI_LOADERS: >
259 -D glx=disabled
260 -D egl=false
261 -D gbm=false
262 GALLIUM_ST: >
263 -D dri3=false
264 -D gallium-vdpau=false
265 -D gallium-xvmc=false
266 -D gallium-omx=disabled
267 -D gallium-va=false
268 -D gallium-xa=false
269 -D gallium-nine=false
270 -D gallium-opencl=icd
271 script:
272 - export GALLIUM_DRIVERS="r600,radeonsi"
273 - .gitlab-ci/meson-build.sh
274 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
275 - export GALLIUM_DRIVERS="i915,r600"
276 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
277 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
278
279 meson-clover-old-llvm:
280 extends: meson-clover
281 image: $STRETCH_IMAGE
282 variables:
283 UNWIND: "false"
284 DRI_LOADERS: >
285 -D glx=disabled
286 -D egl=false
287 -D gbm=false
288 -D platforms=drm,surfaceless
289 GALLIUM_DRIVERS: "i915,r600"
290 script:
291 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
292 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
293 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
294
295 meson-vulkan:
296 extends: .meson-build
297 variables:
298 UNWIND: "false"
299 DRI_LOADERS: >
300 -D glx=disabled
301 -D gbm=false
302 -D egl=false
303 -D platforms=x11,wayland,drm
304 -D osmesa=none
305 GALLIUM_ST: >
306 -D dri3=true
307 -D gallium-vdpau=false
308 -D gallium-xvmc=false
309 -D gallium-omx=disabled
310 -D gallium-va=false
311 -D gallium-xa=false
312 -D gallium-nine=false
313 -D gallium-opencl=disabled
314 VULKAN_DRIVERS: intel,amd,freedreno
315 LLVM_VERSION: "8"
316 EXTRA_OPTION: >
317 -D vulkan-overlay-layer=true
318
319 # While the main point of this build is testing the i386 cross build,
320 # we also use this one to test some other options that are exclusive
321 # with meson-main's choices (classic swrast and osmesa)
322 meson-i386:
323 extends: .meson-cross
324 variables:
325 CROSS: i386
326 VULKAN_DRIVERS: intel
327 DRI_DRIVERS: "swrast"
328 GALLIUM_DRIVERS: "iris"
329 EXTRA_OPTION: >
330 -D vulkan-overlay-layer=true
331 -D llvm=false
332 -D osmesa=classic
333
334 scons:
335 extends: .scons-build
336 variables:
337 SCONS_TARGET: "llvm=1"
338 SCONS_CHECK_COMMAND: "scons llvm=1 check"
339 script:
340 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check" .gitlab-ci/scons-build.sh
341 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
342 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
343 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
344
345 scons-old-llvm:
346 extends: scons
347 image: $STRETCH_IMAGE
348 script:
349 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
350 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
351 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
352
353 .deqp-test:
354 extends: .ci-run-policy
355 stage: test
356 image: $DEBIAN_IMAGE
357 variables:
358 GIT_STRATEGY: none # testing doesn't build anything from source
359 DEQP_SKIPS: deqp-default-skips.txt
360 script:
361 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
362 - rm -rf install
363 - tar -xf artifacts/install.tar
364 - ./artifacts/deqp-runner.sh
365 artifacts:
366 when: on_failure
367 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
368 paths:
369 - results/
370 dependencies:
371 - meson-main
372 needs: [meson-main]
373
374 test-llvmpipe-gles2:
375 parallel: 4
376 variables:
377 DEQP_VER: gles2
378 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
379 LIBGL_ALWAYS_SOFTWARE: "true"
380 DEQP_RENDERER_MATCH: "llvmpipe"
381 extends: .deqp-test
382
383 test-softpipe-gles2:
384 extends: test-llvmpipe-gles2
385 variables:
386 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
387 DEQP_RENDERER_MATCH: "softpipe"
388 GALLIUM_DRIVER: "softpipe"
389
390 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
391 # 25 minutes. Until we can get its runtime down, just do a partial
392 # (every 10 tests) run.
393 test-softpipe-gles3-limited:
394 variables:
395 DEQP_VER: gles3
396 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
397 LIBGL_ALWAYS_SOFTWARE: "true"
398 DEQP_RENDERER_MATCH: "softpipe"
399 GALLIUM_DRIVER: "softpipe"
400 CI_NODE_INDEX: 1
401 CI_NODE_TOTAL: 10
402 extends: .deqp-test
403
404 arm64_a630_gles2:
405 extends: .deqp-test
406 image: $DEBIAN_ARM64_IMAGE
407 variables:
408 DEQP_VER: gles2
409 DEQP_RENDERER_MATCH: "FD630"
410 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
411 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
412 NIR_VALIDATE: 0
413 tags:
414 - mesa-cheza
415 dependencies:
416 - meson-arm64
417 needs: [ meson-arm64 ]
418
419 arm64_a630_gles31:
420 extends: arm64_a630_gles2
421 parallel: 4
422 variables:
423 DEQP_VER: gles31
424
425 arm64_a630_gles3:
426 parallel: 6
427 extends: arm64_a630_gles2
428 variables:
429 DEQP_VER: gles3
430
431 arm64_a306_gles2:
432 parallel: 4
433 extends: arm64_a630_gles2
434 variables:
435 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
436 DEQP_SKIPS: deqp-default-skips.txt
437 DEQP_RENDERER_MATCH: "FD307"
438 tags:
439 - db410c