blob: 98dc3fcc703315c090eb0e60c6708e9f2fd67c3c [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
Eric Anholtf417ced2019-07-22 12:03:47 -070017 DEBIAN_TAG: "2019-08-09"
Michel Dänzerd00b1c42019-04-02 16:56:54 +020018 DEBIAN_VERSION: stretch-slim
19 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020020
21include:
22 - project: 'wayland/ci-templates'
23 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
Michel Dänzerd00b1c42019-04-02 16:56:54 +020024 file: '/templates/debian.yml'
Eric Engestrom329f5cd2019-01-20 11:21:45 +000025
Eric Engestrom329f5cd2019-01-20 11:21:45 +000026stages:
27 - containers-build
Eric Engestrom46d23c02019-01-20 11:26:53 +000028 - build+test
Eric Anholt46daaca2019-06-28 16:35:32 -070029 - test
Eric Engestrom329f5cd2019-01-20 11:21:45 +000030
31
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000032# When to automatically run the CI
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020033.ci-run-policy: &ci-run-policy
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000034 only:
Michel Dänzerb48e64f2019-04-10 10:33:13 +020035 - branches@mesa/mesa
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000036 - merge_requests
37 - /^ci([-/].*)?$/
Michel Dänzer6140ed32019-03-26 18:39:41 +010038 retry:
39 max: 2
40 when:
41 - runner_system_failure
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000042
Eric Anholt46daaca2019-06-28 16:35:32 -070043.ci-deqp-artifacts: &ci-deqp-artifacts
44 artifacts:
45 when: always
46 untracked: false
47 paths:
48 # Watch out! Artifacts are relative to the build dir.
49 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
50 - artifacts
Eric Engestrom7f5d9c22019-02-22 15:52:08 +000051
Eric Engestrom329f5cd2019-01-20 11:21:45 +000052# CONTAINERS
53
Michel Dänzerd00b1c42019-04-02 16:56:54 +020054debian:
55 extends: .debian@container-ifnot-exists
Eric Engestrom329f5cd2019-01-20 11:21:45 +000056 stage: containers-build
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020057 <<: *ci-run-policy
Eric Engestrom329f5cd2019-01-20 11:21:45 +000058 variables:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020059 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
Michel Dänzerd00b1c42019-04-02 16:56:54 +020060 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
Eric Engestrom46d23c02019-01-20 11:26:53 +000061
62
63# BUILD
64
65.build:
Benjamin Tissoires7f8a9a12019-04-02 09:24:00 +020066 <<: *ci-run-policy
Michel Dänzerd00b1c42019-04-02 16:56:54 +020067 image: $DEBIAN_IMAGE
Eric Engestrom46d23c02019-01-20 11:26:53 +000068 stage: build+test
Michel Dänzera3f34f92019-03-26 18:35:59 +010069 cache:
70 paths:
71 - ccache
Eric Engestrom46d23c02019-01-20 11:26:53 +000072 artifacts:
Eric Anholtdd3d0b22019-07-24 09:27:48 -070073 when: always
74 paths:
75 - _build/meson-logs/*.txt
76 # scons:
Michel Dänzer5229f272019-07-26 12:20:41 +020077 - build/*/config.log
Eric Anholtf60defa2019-04-10 15:59:12 -070078 - shader-db
Michel Dänzere9de19f2019-04-04 18:01:27 +020079 variables:
80 CCACHE_COMPILERCHECK: "content"
Eric Engestrom23b485c2019-02-12 16:59:27 +000081 # Use ccache transparently, and print stats before/after
82 before_script:
83 - export PATH="/usr/lib/ccache:$PATH"
84 - export CCACHE_BASEDIR="$PWD"
85 - export CCACHE_DIR="$PWD/ccache"
Eric Engestrom23b485c2019-02-12 16:59:27 +000086 - ccache --zero-stats || true
87 - ccache --show-stats || true
88 after_script:
Eric Anholt46daaca2019-06-28 16:35:32 -070089 # In case the install dir is being saved as artifacts, tar it up
90 # so that symlinks and hardlinks aren't each packed separately in
91 # the zip file.
92 - if [ -d install ]; then
93 tar -cf artifacts/install.tar install;
94 fi
Eric Engestrom23b485c2019-02-12 16:59:27 +000095 - export CCACHE_DIR="$PWD/ccache"
96 - ccache --show-stats
Eric Engestrom46d23c02019-01-20 11:26:53 +000097
98.meson-build:
99 extends: .build
Eric Engestrom23b485c2019-02-12 16:59:27 +0000100 script:
Michel Dänzercc2b3a92019-05-03 10:49:43 +0200101 - .gitlab-ci/meson-build.sh
Eric Engestrom46d23c02019-01-20 11:26:53 +0000102
Eric Engestrom06b245b2019-01-23 15:46:10 +0000103.scons-build:
104 extends: .build
105 variables:
106 SCONSFLAGS: "-j4"
107 script:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000108 - if test -n "$LLVM_VERSION"; then
109 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
110 fi
Eric Engestrom06b245b2019-01-23 15:46:10 +0000111 - scons $SCONS_TARGET
112 - eval $SCONS_CHECK_COMMAND
113
Michel Dänzera2cce702019-03-20 15:58:31 +0100114# NOTE: Building SWR is 2x (yes two) times slower than all the other
115# gallium drivers combined.
116# Start this early so that it doesn't limit the total run time.
Eric Engestrom41407c62019-03-08 16:33:07 +0000117#
Eric Anholt030aa6e2019-08-07 14:05:51 -0700118# We also stick the glvnd build here, since we want non-glvnd in
119# meson-main for actual driver CI.
Eric Engestrom1291c682019-04-16 18:06:53 +0200120meson-swr-glvnd:
Michel Dänzera2cce702019-03-20 15:58:31 +0100121 extends: .meson-build
122 variables:
123 UNWIND: "true"
124 DRI_LOADERS: >
Eric Engestrom1291c682019-04-16 18:06:53 +0200125 -D glvnd=true
126 -D egl=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100127 GALLIUM_ST: >
Eric Engestrom41407c62019-03-08 16:33:07 +0000128 -D dri3=true
Michel Dänzera2cce702019-03-20 15:58:31 +0100129 -D gallium-vdpau=false
130 -D gallium-xvmc=false
131 -D gallium-omx=disabled
132 -D gallium-va=false
133 -D gallium-xa=false
Eric Anholt030aa6e2019-08-07 14:05:51 -0700134 -D gallium-nine=false
Michel Dänzera2cce702019-03-20 15:58:31 +0100135 -D gallium-opencl=disabled
Eric Anholt030aa6e2019-08-07 14:05:51 -0700136 GALLIUM_DRIVERS: "swr,iris"
Michel Dänzera2cce702019-03-20 15:58:31 +0100137 LLVM_VERSION: "6.0"
138
139meson-clang:
140 extends: .meson-build
141 variables:
142 UNWIND: "true"
143 DRI_DRIVERS: "auto"
144 GALLIUM_DRIVERS: "auto"
Eric Engestrom47f419d2019-05-01 12:09:26 +0100145 VULKAN_DRIVERS: intel,amd,freedreno
Michel Dänzer3fca2b72019-04-05 10:36:29 +0200146 CC: "ccache clang-8"
147 CXX: "ccache clang++-8"
Michel Dänzere9de19f2019-04-04 18:01:27 +0200148 before_script:
149 - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache"
150 - ccache --zero-stats --show-stats || true
151 # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so
152 - apt-get remove -y libgcc-8-dev
Michel Dänzera2cce702019-03-20 15:58:31 +0100153
Michel Dänzer82b30092019-05-03 18:19:25 +0200154scons-swr:
155 extends: .scons-build
Eric Engestrom46d23c02019-01-20 11:26:53 +0000156 variables:
Michel Dänzer82b30092019-05-03 18:19:25 +0200157 SCONS_TARGET: "swr=1"
158 SCONS_CHECK_COMMAND: "true"
159 LLVM_VERSION: "6.0"
160
161scons-win64:
162 extends: .scons-build
163 variables:
164 SCONS_TARGET: platform=windows machine=x86_64
165 SCONS_CHECK_COMMAND: "true"
Eric Engestrom89a74672019-01-21 09:42:37 +0000166
Eric Engestrom41407c62019-03-08 16:33:07 +0000167meson-main:
Eric Engestromd73265e2019-01-28 17:38:17 +0000168 extends: .meson-build
169 variables:
Eric Engestrom41407c62019-03-08 16:33:07 +0000170 UNWIND: "true"
Eric Engestromd73265e2019-01-28 17:38:17 +0000171 DRI_LOADERS: >
172 -D glx=dri
173 -D gbm=true
174 -D egl=true
175 -D platforms=x11,wayland,drm,surfaceless
Eric Anholt030aa6e2019-08-07 14:05:51 -0700176 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
Eric Engestromd73265e2019-01-28 17:38:17 +0000177 GALLIUM_ST: >
178 -D dri3=true
Eric Engestrom41407c62019-03-08 16:33:07 +0000179 -D gallium-extra-hud=true
180 -D gallium-vdpau=true
181 -D gallium-xvmc=true
182 -D gallium-omx=bellagio
183 -D gallium-va=true
184 -D gallium-xa=true
Eric Anholt030aa6e2019-08-07 14:05:51 -0700185 -D gallium-nine=true
Eric Engestromd73265e2019-01-28 17:38:17 +0000186 -D gallium-opencl=disabled
Eric Anholt030aa6e2019-08-07 14:05:51 -0700187 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
Eric Engestrom41407c62019-03-08 16:33:07 +0000188 LLVM_VERSION: "7"
Eric Engestrom6a1f6092019-03-12 10:25:54 +0000189 EXTRA_OPTION: >
Eric Anholt030aa6e2019-08-07 14:05:51 -0700190 -D osmesa=gallium
Eric Engestrom6a1f6092019-03-12 10:25:54 +0000191 -D tools=all
Eric Anholtf60defa2019-04-10 15:59:12 -0700192 MESON_SHADERDB: "true"
Eric Anholtab498732019-08-01 12:14:15 -0700193 BUILDTYPE: "debugoptimized"
Eric Anholt46daaca2019-06-28 16:35:32 -0700194 <<: *ci-deqp-artifacts
Eric Engestromd73265e2019-01-28 17:38:17 +0000195
Michel Dänzer68977152019-05-03 10:58:48 +0200196meson-clover:
Eric Engestromb5a70af2019-01-28 18:05:22 +0000197 extends: .meson-build
198 variables:
199 UNWIND: "true"
200 DRI_LOADERS: >
201 -D glx=disabled
202 -D egl=false
203 -D gbm=false
204 GALLIUM_ST: >
205 -D dri3=false
206 -D gallium-vdpau=false
207 -D gallium-xvmc=false
208 -D gallium-omx=disabled
209 -D gallium-va=false
210 -D gallium-xa=false
211 -D gallium-nine=false
212 -D gallium-opencl=icd
Michel Dänzer68977152019-05-03 10:58:48 +0200213 script:
214 - export GALLIUM_DRIVERS="r600,radeonsi"
215 - .gitlab-ci/meson-build.sh
216 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
217 - export GALLIUM_DRIVERS="i915,r600"
218 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
219 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
220 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
221 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
Eric Engestrom8dab7072019-01-28 18:09:24 +0000222
Michel Dänzer82b30092019-05-03 18:19:25 +0200223meson-vulkan:
224 extends: .meson-build
225 variables:
226 UNWIND: "false"
227 DRI_LOADERS: >
228 -D glx=disabled
229 -D gbm=false
230 -D egl=false
231 -D platforms=x11,wayland,drm
232 -D osmesa=none
233 GALLIUM_ST: >
234 -D dri3=true
235 -D gallium-vdpau=false
236 -D gallium-xvmc=false
237 -D gallium-omx=disabled
238 -D gallium-va=false
239 -D gallium-xa=false
240 -D gallium-nine=false
241 -D gallium-opencl=disabled
242 VULKAN_DRIVERS: intel,amd,freedreno
243 LLVM_VERSION: "7"
Eric Engestrom5f8d29a2019-05-08 18:17:23 +0200244 EXTRA_OPTION: >
245 -D vulkan-overlay-layer=true
Michel Dänzer82b30092019-05-03 18:19:25 +0200246
Eric Anholt11aa32a2019-07-11 12:58:28 -0700247.meson-cross:
248 extends: .meson-build
249 variables:
250 UNWIND: "false"
251 DRI_LOADERS: >
252 -D glx=disabled
253 -D gbm=false
254 -D egl=false
255 -D platforms=surfaceless
256 -D osmesa=none
257 GALLIUM_ST: >
258 -D dri3=false
259 -D gallium-vdpau=false
260 -D gallium-xvmc=false
261 -D gallium-omx=disabled
262 -D gallium-va=false
263 -D gallium-xa=false
264 -D gallium-nine=false
265 -D llvm=false
Eric Anholt46daaca2019-06-28 16:35:32 -0700266 <<: *ci-deqp-artifacts
Eric Anholt11aa32a2019-07-11 12:58:28 -0700267 script:
Eric Anholt11aa32a2019-07-11 12:58:28 -0700268 - .gitlab-ci/meson-build.sh
269
270meson-armhf:
271 extends: .meson-cross
272 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100273 CROSS: armhf
Eric Anholt11aa32a2019-07-11 12:58:28 -0700274 VULKAN_DRIVERS: freedreno
275 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
276 # Disable the tests since we're cross compiling.
277 EXTRA_OPTION: >
278 -D build-tests=false
279 -D I-love-half-baked-turnips=true
280 -D vulkan-overlay-layer=true
281
282meson-arm64:
283 extends: .meson-cross
284 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100285 CROSS: arm64
Eric Anholt11aa32a2019-07-11 12:58:28 -0700286 VULKAN_DRIVERS: freedreno
287 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
288 # Disable the tests since we're cross compiling.
289 EXTRA_OPTION: >
290 -D build-tests=false
291 -D I-love-half-baked-turnips=true
292 -D vulkan-overlay-layer=true
293
Eric Anholt030aa6e2019-08-07 14:05:51 -0700294# While the main point of this build is testing the i386 cross build,
295# we also use this one to test some other options that are exclusive
296# with meson-main's choices (classic swrast and osmesa)
Eric Anholt11aa32a2019-07-11 12:58:28 -0700297meson-i386:
298 extends: .meson-cross
299 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100300 CROSS: i386
Eric Anholt11aa32a2019-07-11 12:58:28 -0700301 VULKAN_DRIVERS: intel
Eric Anholt030aa6e2019-08-07 14:05:51 -0700302 DRI_DRIVERS: "swrast"
303 GALLIUM_DRIVERS: "iris"
Eric Anholt11aa32a2019-07-11 12:58:28 -0700304 # Disable i386 tests, because u_format_tests gets precision
305 # failures in dxtn unpacking
306 EXTRA_OPTION: >
307 -D build-tests=false
308 -D vulkan-overlay-layer=true
Eric Anholt030aa6e2019-08-07 14:05:51 -0700309 -D llvm=false
310 -D osmesa=classic
Eric Anholt11aa32a2019-07-11 12:58:28 -0700311
Eric Engestromfaf9e402019-02-26 14:40:29 +0000312scons-nollvm:
Eric Engestrom06b245b2019-01-23 15:46:10 +0000313 extends: .scons-build
314 variables:
315 SCONS_TARGET: "llvm=0"
316 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000317
Eric Engestromfaf9e402019-02-26 14:40:29 +0000318scons-llvm:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000319 extends: .scons-build
320 variables:
321 SCONS_TARGET: "llvm=1"
322 SCONS_CHECK_COMMAND: "scons llvm=1 check"
Michel Dänzer9b2473c2019-04-11 18:38:30 +0200323 LLVM_VERSION: "3.4"
324 # LLVM 3.4 packages were built with an old libstdc++ ABI
325 CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0"
Eric Anholt46daaca2019-06-28 16:35:32 -0700326
327.deqp-test:
328 <<: *ci-run-policy
329 stage: test
330 image: $DEBIAN_IMAGE
331 variables:
332 GIT_STRATEGY: none # testing doesn't build anything from source
333 DEQP_SKIPS: deqp-default-skips.txt
334 script:
335 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
336 - rm -rf install
337 - tar -xf artifacts/install.tar
338 - ./artifacts/deqp-runner.sh
339 artifacts:
340 when: on_failure
341 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
342 paths:
343 - results/
344
345test-llvmpipe-gles2:
346 parallel: 4
347 variables:
348 DEQP_VER: gles2
349 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
350 LIBGL_ALWAYS_SOFTWARE: "true"
351 DEQP_RENDERER_MATCH: "llvmpipe"
352 extends: .deqp-test
353 dependencies:
354 - meson-main
Eric Anholt553cd822019-08-09 10:32:40 -0700355
356test-softpipe-gles2:
357 parallel: 4
358 variables:
359 DEQP_VER: gles2
360 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
361 LIBGL_ALWAYS_SOFTWARE: "true"
362 DEQP_RENDERER_MATCH: "softpipe"
363 GALLIUM_DRIVER: "softpipe"
364 extends: .deqp-test
365 dependencies:
366 - meson-main
367
368# The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
369# 25 minutes. Until we can get its runtime down, just do a partial
370# (every 10 tests) run.
371test-softpipe-gles3-limited:
372 variables:
373 DEQP_VER: gles3
374 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
375 LIBGL_ALWAYS_SOFTWARE: "true"
376 DEQP_RENDERER_MATCH: "softpipe"
377 GALLIUM_DRIVER: "softpipe"
378 CI_NODE_INDEX: 1
379 CI_NODE_TOTAL: 10
380 extends: .deqp-test
381 dependencies:
382 - meson-main