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