blob: d5dc20348a0a9d509d588af7021eef47ec054663 [file] [log] [blame]
Eric Engestrom329f5cd2019-01-20 11:21:45 +00001# This is the tag of the docker image used for the build jobs. If the
2# image doesn't exist yet, the containers-build 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.
Eric Engestrom329f5cd2019-01-20 11:21:45 +000015variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020016 UPSTREAM_REPO: mesa/mesa
Adam Jackson3c553d9cf2019-09-06 09:29:32 +020017 DEBIAN_TAG: "2019-09-11"
Eric Anholt6f0dc082019-06-28 16:35:32 -070018 DEBIAN_ARM64_TAG: "arm64v8-2019-08-09"
Michel Dänzerd00b1c42019-04-02 16:56:54 +020019 DEBIAN_VERSION: stretch-slim
Eric Anholt6f0dc082019-06-28 16:35:32 -070020 DEBIAN_ARM64_VERSION: buster-slim
Michel Dänzerd00b1c42019-04-02 16:56:54 +020021 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
Eric Anholt6f0dc082019-06-28 16:35:32 -070022 DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_ARM64_VERSION:$DEBIAN_ARM64_TAG"
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020023
24include:
25 - project: 'wayland/ci-templates'
Eric Anholt6f0dc082019-06-28 16:35:32 -070026 ref: 1f7f57c6
Michel Dänzerd00b1c42019-04-02 16:56:54 +020027 file: '/templates/debian.yml'
Eric Engestrom329f5cd2019-01-20 11:21:45 +000028
Eric Engestrom329f5cd2019-01-20 11:21:45 +000029stages:
30 - containers-build
Eric Engestrom46d23c02019-01-20 11:26:53 +000031 - build+test
Eric Anholt46daaca2019-06-28 16:35:32 -070032 - test
Eric Engestrom329f5cd2019-01-20 11:21:45 +000033
34
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000035# When to automatically run the CI
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020036.ci-run-policy: &ci-run-policy
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000037 only:
Michel Dänzerb48e64f2019-04-10 10:33:13 +020038 - branches@mesa/mesa
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000039 - merge_requests
40 - /^ci([-/].*)?$/
Michel Dänzer6140ed32019-03-26 18:39:41 +010041 retry:
42 max: 2
43 when:
44 - runner_system_failure
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000045
Eric Anholt46daaca2019-06-28 16:35:32 -070046.ci-deqp-artifacts: &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
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000054
Eric Anholt6f0dc082019-06-28 16:35:32 -070055# Builds the normal CI native and cross-build docker image.
Michel Dänzerd00b1c42019-04-02 16:56:54 +020056debian:
57 extends: .debian@container-ifnot-exists
Eric Engestrom329f5cd2019-01-20 11:21:45 +000058 stage: containers-build
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020059 <<: *ci-run-policy
Eric Engestrom329f5cd2019-01-20 11:21:45 +000060 variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020061 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
Michel Dänzerd00b1c42019-04-02 16:56:54 +020062 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
Eric Engestrom46d23c02019-01-20 11:26:53 +000063
Eric Anholt6f0dc082019-06-28 16:35:32 -070064# Builds a Docker image with the native environment and VK-GL-CTS for testing.
65test-container:arm64:
66 extends: .debian@container-ifnot-exists@arm64v8
67 <<: *ci-run-policy
68 stage: containers-build
69 variables:
70 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
71 DEBIAN_VERSION: "$DEBIAN_ARM64_VERSION"
72 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
73 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
Eric Engestrom46d23c02019-01-20 11:26:53 +000074
75# BUILD
76
77.build:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020078 <<: *ci-run-policy
Michel Dänzerd00b1c42019-04-02 16:56:54 +020079 image: $DEBIAN_IMAGE
Eric Engestrom46d23c02019-01-20 11:26:53 +000080 stage: build+test
Michel Dänzera3f34f92019-03-26 18:35:59 +010081 cache:
82 paths:
83 - ccache
Eric Engestrom46d23c02019-01-20 11:26:53 +000084 artifacts:
Eric Anholtdd3d0b22019-07-24 09:27:48 -070085 when: always
86 paths:
87 - _build/meson-logs/*.txt
88 # scons:
Michel Dänzer5229f272019-07-26 12:20:41 +020089 - build/*/config.log
Eric Anholtf60defa2019-04-10 15:59:12 -070090 - shader-db
Michel Dänzere9de19f2019-04-04 18:01:27 +020091 variables:
92 CCACHE_COMPILERCHECK: "content"
Eric Engestrom23b485c2019-02-12 16:59:27 +000093 # Use ccache transparently, and print stats before/after
94 before_script:
95 - export PATH="/usr/lib/ccache:$PATH"
96 - export CCACHE_BASEDIR="$PWD"
97 - export CCACHE_DIR="$PWD/ccache"
Eric Engestrom23b485c2019-02-12 16:59:27 +000098 - ccache --zero-stats || true
99 - ccache --show-stats || true
100 after_script:
Eric Anholt46daaca2019-06-28 16:35:32 -0700101 # In case the install dir is being saved as artifacts, tar it up
102 # so that symlinks and hardlinks aren't each packed separately in
103 # the zip file.
104 - if [ -d install ]; then
105 tar -cf artifacts/install.tar install;
106 fi
Eric Engestrom23b485c2019-02-12 16:59:27 +0000107 - export CCACHE_DIR="$PWD/ccache"
108 - ccache --show-stats
Eric Engestrom46d23c02019-01-20 11:26:53 +0000109
110.meson-build:
111 extends: .build
Eric Engestrom23b485c2019-02-12 16:59:27 +0000112 script:
Michel Dänzercc2b3a92019-05-03 10:49:43 +0200113 - .gitlab-ci/meson-build.sh
Eric Engestrom46d23c02019-01-20 11:26:53 +0000114
Eric Engestrom06b245b2019-01-23 15:46:10 +0000115.scons-build:
116 extends: .build
117 variables:
118 SCONSFLAGS: "-j4"
119 script:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000120 - if test -n "$LLVM_VERSION"; then
121 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
122 fi
Eric Engestrom06b245b2019-01-23 15:46:10 +0000123 - scons $SCONS_TARGET
124 - eval $SCONS_CHECK_COMMAND
125
Michel Dänzer42f8d5a2019-08-28 12:01:02 +0200126meson-main:
127 extends: .meson-build
128 variables:
129 UNWIND: "true"
130 DRI_LOADERS: >
131 -D glx=dri
132 -D gbm=true
133 -D egl=true
134 -D platforms=x11,wayland,drm,surfaceless
135 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
136 GALLIUM_ST: >
137 -D dri3=true
138 -D gallium-extra-hud=true
139 -D gallium-vdpau=true
140 -D gallium-xvmc=true
141 -D gallium-omx=bellagio
142 -D gallium-va=true
143 -D gallium-xa=true
144 -D gallium-nine=true
145 -D gallium-opencl=disabled
146 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
147 LLVM_VERSION: "7"
148 EXTRA_OPTION: >
149 -D osmesa=gallium
150 -D tools=all
151 MESON_SHADERDB: "true"
152 BUILDTYPE: "debugoptimized"
153 <<: *ci-deqp-artifacts
154
Michel Dänzera2cce702019-03-20 15:58:31 +0100155# NOTE: Building SWR is 2x (yes two) times slower than all the other
156# gallium drivers combined.
157# Start this early so that it doesn't limit the total run time.
Eric Engestrom41407c62019-03-08 16:33:07 +0000158#
Eric Anholt030aa6e2019-08-07 14:05:51 -0700159# We also stick the glvnd build here, since we want non-glvnd in
160# meson-main for actual driver CI.
Eric Engestrom1291c682019-04-16 18:06:53 +0200161meson-swr-glvnd:
Michel Dänzera2cce702019-03-20 15:58:31 +0100162 extends: .meson-build
163 variables:
164 UNWIND: "true"
165 DRI_LOADERS: >
Eric Engestrom1291c682019-04-16 18:06:53 +0200166 -D glvnd=true
167 -D egl=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100168 GALLIUM_ST: >
Eric Engestrom41407c62019-03-08 16:33:07 +0000169 -D dri3=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100170 -D gallium-vdpau=false
171 -D gallium-xvmc=false
172 -D gallium-omx=disabled
173 -D gallium-va=false
174 -D gallium-xa=false
Eric Anholt030aa6e2019-08-07 14:05:51 -0700175 -D gallium-nine=false
Michel Dänzera2cce702019-03-20 15:58:31 +0100176 -D gallium-opencl=disabled
Eric Anholt030aa6e2019-08-07 14:05:51 -0700177 GALLIUM_DRIVERS: "swr,iris"
Michel Dänzera2cce702019-03-20 15:58:31 +0100178 LLVM_VERSION: "6.0"
179
180meson-clang:
181 extends: .meson-build
182 variables:
183 UNWIND: "true"
184 DRI_DRIVERS: "auto"
185 GALLIUM_DRIVERS: "auto"
Eric Engestrom47f419d2019-05-01 12:09:26 +0100186 VULKAN_DRIVERS: intel,amd,freedreno
Michel Dänzer3fca2b72019-04-05 10:36:29 +0200187 CC: "ccache clang-8"
188 CXX: "ccache clang++-8"
Michel Dänzere9de19f2019-04-04 18:01:27 +0200189 before_script:
190 - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache"
191 - ccache --zero-stats --show-stats || true
192 # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so
193 - apt-get remove -y libgcc-8-dev
Michel Dänzera2cce702019-03-20 15:58:31 +0100194
Michel Dänzer82b30092019-05-03 18:19:25 +0200195scons-swr:
196 extends: .scons-build
Eric Engestrom46d23c02019-01-20 11:26:53 +0000197 variables:
Michel Dänzer82b30092019-05-03 18:19:25 +0200198 SCONS_TARGET: "swr=1"
199 SCONS_CHECK_COMMAND: "true"
200 LLVM_VERSION: "6.0"
201
202scons-win64:
203 extends: .scons-build
204 variables:
205 SCONS_TARGET: platform=windows machine=x86_64
206 SCONS_CHECK_COMMAND: "true"
Eric Engestrom89a74672019-01-21 09:42:37 +0000207
Michel Dänzer68977152019-05-03 10:58:48 +0200208meson-clover:
Eric Engestromb5a70af2019-01-28 18:05:22 +0000209 extends: .meson-build
210 variables:
211 UNWIND: "true"
212 DRI_LOADERS: >
213 -D glx=disabled
214 -D egl=false
215 -D gbm=false
216 GALLIUM_ST: >
217 -D dri3=false
218 -D gallium-vdpau=false
219 -D gallium-xvmc=false
220 -D gallium-omx=disabled
221 -D gallium-va=false
222 -D gallium-xa=false
223 -D gallium-nine=false
224 -D gallium-opencl=icd
Michel Dänzer68977152019-05-03 10:58:48 +0200225 script:
226 - export GALLIUM_DRIVERS="r600,radeonsi"
227 - .gitlab-ci/meson-build.sh
Samuel Pitoiset7d1c0912019-08-21 11:45:25 +0200228 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
Michel Dänzer68977152019-05-03 10:58:48 +0200229 - export GALLIUM_DRIVERS="i915,r600"
230 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
231 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
232 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
233 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
Samuel Pitoiset7d1c0912019-08-21 11:45:25 +0200234 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
Eric Engestrom8dab7072019-01-28 18:09:24 +0000235
Michel Dänzer82b30092019-05-03 18:19:25 +0200236meson-vulkan:
237 extends: .meson-build
238 variables:
239 UNWIND: "false"
240 DRI_LOADERS: >
241 -D glx=disabled
242 -D gbm=false
243 -D egl=false
244 -D platforms=x11,wayland,drm
245 -D osmesa=none
246 GALLIUM_ST: >
247 -D dri3=true
248 -D gallium-vdpau=false
249 -D gallium-xvmc=false
250 -D gallium-omx=disabled
251 -D gallium-va=false
252 -D gallium-xa=false
253 -D gallium-nine=false
254 -D gallium-opencl=disabled
255 VULKAN_DRIVERS: intel,amd,freedreno
Samuel Pitoiset7d1c0912019-08-21 11:45:25 +0200256 LLVM_VERSION: "8"
Eric Engestrom5f8d29a2019-05-08 18:17:23 +0200257 EXTRA_OPTION: >
258 -D vulkan-overlay-layer=true
Michel Dänzer82b30092019-05-03 18:19:25 +0200259
Eric Anholt11aa32a2019-07-11 12:58:28 -0700260.meson-cross:
261 extends: .meson-build
262 variables:
263 UNWIND: "false"
264 DRI_LOADERS: >
265 -D glx=disabled
266 -D gbm=false
Eric Anholt6f0dc082019-06-28 16:35:32 -0700267 -D egl=true
Eric Anholt11aa32a2019-07-11 12:58:28 -0700268 -D platforms=surfaceless
269 -D osmesa=none
270 GALLIUM_ST: >
271 -D dri3=false
272 -D gallium-vdpau=false
273 -D gallium-xvmc=false
274 -D gallium-omx=disabled
275 -D gallium-va=false
276 -D gallium-xa=false
277 -D gallium-nine=false
278 -D llvm=false
Eric Anholt46daaca2019-06-28 16:35:32 -0700279 <<: *ci-deqp-artifacts
Eric Anholt11aa32a2019-07-11 12:58:28 -0700280 script:
Eric Anholt11aa32a2019-07-11 12:58:28 -0700281 - .gitlab-ci/meson-build.sh
282
283meson-armhf:
284 extends: .meson-cross
285 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100286 CROSS: armhf
Eric Anholt11aa32a2019-07-11 12:58:28 -0700287 VULKAN_DRIVERS: freedreno
288 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
289 # Disable the tests since we're cross compiling.
290 EXTRA_OPTION: >
291 -D build-tests=false
292 -D I-love-half-baked-turnips=true
293 -D vulkan-overlay-layer=true
294
295meson-arm64:
296 extends: .meson-cross
297 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100298 CROSS: arm64
Eric Anholt11aa32a2019-07-11 12:58:28 -0700299 VULKAN_DRIVERS: freedreno
300 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
301 # Disable the tests since we're cross compiling.
302 EXTRA_OPTION: >
303 -D build-tests=false
304 -D I-love-half-baked-turnips=true
305 -D vulkan-overlay-layer=true
Eric Anholt6f0dc082019-06-28 16:35:32 -0700306 BUILDTYPE: "debugoptimized"
Eric Anholt11aa32a2019-07-11 12:58:28 -0700307
Eric Anholt030aa6e2019-08-07 14:05:51 -0700308# While the main point of this build is testing the i386 cross build,
309# we also use this one to test some other options that are exclusive
310# with meson-main's choices (classic swrast and osmesa)
Eric Anholt11aa32a2019-07-11 12:58:28 -0700311meson-i386:
312 extends: .meson-cross
313 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100314 CROSS: i386
Eric Anholt11aa32a2019-07-11 12:58:28 -0700315 VULKAN_DRIVERS: intel
Eric Anholt030aa6e2019-08-07 14:05:51 -0700316 DRI_DRIVERS: "swrast"
317 GALLIUM_DRIVERS: "iris"
Eric Anholt11aa32a2019-07-11 12:58:28 -0700318 # Disable i386 tests, because u_format_tests gets precision
319 # failures in dxtn unpacking
320 EXTRA_OPTION: >
321 -D build-tests=false
322 -D vulkan-overlay-layer=true
Eric Anholt030aa6e2019-08-07 14:05:51 -0700323 -D llvm=false
324 -D osmesa=classic
Eric Anholt11aa32a2019-07-11 12:58:28 -0700325
Eric Engestromfaf9e402019-02-26 14:40:29 +0000326scons-nollvm:
Eric Engestrom06b245b2019-01-23 15:46:10 +0000327 extends: .scons-build
328 variables:
329 SCONS_TARGET: "llvm=0"
330 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000331
Eric Engestromfaf9e402019-02-26 14:40:29 +0000332scons-llvm:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000333 extends: .scons-build
334 variables:
335 SCONS_TARGET: "llvm=1"
336 SCONS_CHECK_COMMAND: "scons llvm=1 check"
Adam Jackson3c553d9cf2019-09-06 09:29:32 +0200337 LLVM_VERSION: "3.9"
Eric Anholt46daaca2019-06-28 16:35:32 -0700338
339.deqp-test:
340 <<: *ci-run-policy
341 stage: test
342 image: $DEBIAN_IMAGE
343 variables:
344 GIT_STRATEGY: none # testing doesn't build anything from source
345 DEQP_SKIPS: deqp-default-skips.txt
346 script:
347 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
348 - rm -rf install
349 - tar -xf artifacts/install.tar
350 - ./artifacts/deqp-runner.sh
351 artifacts:
352 when: on_failure
353 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
354 paths:
355 - results/
356
357test-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 dependencies:
366 - meson-main
Michel Dänzer8de25ec2019-08-27 11:57:13 +0200367 needs: [meson-main]
Eric Anholt553cd822019-08-09 10:32:40 -0700368
369test-softpipe-gles2:
370 parallel: 4
371 variables:
372 DEQP_VER: gles2
373 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
374 LIBGL_ALWAYS_SOFTWARE: "true"
375 DEQP_RENDERER_MATCH: "softpipe"
376 GALLIUM_DRIVER: "softpipe"
377 extends: .deqp-test
378 dependencies:
379 - meson-main
Michel Dänzer8de25ec2019-08-27 11:57:13 +0200380 needs: [meson-main]
Eric Anholt553cd822019-08-09 10:32:40 -0700381
382# The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
383# 25 minutes. Until we can get its runtime down, just do a partial
384# (every 10 tests) run.
385test-softpipe-gles3-limited:
386 variables:
387 DEQP_VER: gles3
388 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
389 LIBGL_ALWAYS_SOFTWARE: "true"
390 DEQP_RENDERER_MATCH: "softpipe"
391 GALLIUM_DRIVER: "softpipe"
392 CI_NODE_INDEX: 1
393 CI_NODE_TOTAL: 10
394 extends: .deqp-test
395 dependencies:
396 - meson-main
Michel Dänzer8de25ec2019-08-27 11:57:13 +0200397 needs: [meson-main]
Eric Anholt6f0dc082019-06-28 16:35:32 -0700398
399arm64_a306_gles2:
400 extends: .deqp-test
401 parallel: 4
402 image: $DEBIAN_ARM64_IMAGE
403 variables:
404 DEQP_VER: gles2
405 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
406 NIR_VALIDATE: 0
407 DEQP_RENDERER_MATCH: "FD307"
408 tags:
409 - db410c
410 dependencies:
411 - meson-arm64
412
413.cheza-test:
414 image: $DEBIAN_ARM64_IMAGE
415 extends: .deqp-test
416 variables:
417 DEQP_RENDERER_MATCH: "FD630"
418 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
419 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
420 NIR_VALIDATE: 0
421 tags:
422 - mesa-cheza
423 dependencies:
424 - meson-arm64
425 needs: [ meson-arm64 ]
426
427arm64_a630_gles2:
428 extends: .cheza-test
429 variables:
430 DEQP_VER: gles2
431
432arm64_a630_gles3:
433 parallel: 6
434 extends: .cheza-test
435 variables:
436 DEQP_VER: gles3
437
438arm64_a630_gles31:
439 parallel: 4
440 extends: .cheza-test
441 variables:
442 DEQP_VER: gles31