blob: 8977b86341ef46e5d6d6ba55e9d08a985c2e05dd [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
Samuel Pitoiset7d1c0912019-08-21 11:45:25 +0200216 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
Michel Dänzer68977152019-05-03 10:58:48 +0200217 - 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
Samuel Pitoiset7d1c0912019-08-21 11:45:25 +0200222 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
Eric Engestrom8dab7072019-01-28 18:09:24 +0000223
Michel Dänzer82b30092019-05-03 18:19:25 +0200224meson-vulkan:
225 extends: .meson-build
226 variables:
227 UNWIND: "false"
228 DRI_LOADERS: >
229 -D glx=disabled
230 -D gbm=false
231 -D egl=false
232 -D platforms=x11,wayland,drm
233 -D osmesa=none
234 GALLIUM_ST: >
235 -D dri3=true
236 -D gallium-vdpau=false
237 -D gallium-xvmc=false
238 -D gallium-omx=disabled
239 -D gallium-va=false
240 -D gallium-xa=false
241 -D gallium-nine=false
242 -D gallium-opencl=disabled
243 VULKAN_DRIVERS: intel,amd,freedreno
Samuel Pitoiset7d1c0912019-08-21 11:45:25 +0200244 LLVM_VERSION: "8"
Eric Engestrom5f8d29a2019-05-08 18:17:23 +0200245 EXTRA_OPTION: >
246 -D vulkan-overlay-layer=true
Michel Dänzer82b30092019-05-03 18:19:25 +0200247
Eric Anholt11aa32a2019-07-11 12:58:28 -0700248.meson-cross:
249 extends: .meson-build
250 variables:
251 UNWIND: "false"
252 DRI_LOADERS: >
253 -D glx=disabled
254 -D gbm=false
255 -D egl=false
256 -D platforms=surfaceless
257 -D osmesa=none
258 GALLIUM_ST: >
259 -D dri3=false
260 -D gallium-vdpau=false
261 -D gallium-xvmc=false
262 -D gallium-omx=disabled
263 -D gallium-va=false
264 -D gallium-xa=false
265 -D gallium-nine=false
266 -D llvm=false
Eric Anholt46daaca2019-06-28 16:35:32 -0700267 <<: *ci-deqp-artifacts
Eric Anholt11aa32a2019-07-11 12:58:28 -0700268 script:
Eric Anholt11aa32a2019-07-11 12:58:28 -0700269 - .gitlab-ci/meson-build.sh
270
271meson-armhf:
272 extends: .meson-cross
273 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100274 CROSS: armhf
Eric Anholt11aa32a2019-07-11 12:58:28 -0700275 VULKAN_DRIVERS: freedreno
276 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
277 # Disable the tests since we're cross compiling.
278 EXTRA_OPTION: >
279 -D build-tests=false
280 -D I-love-half-baked-turnips=true
281 -D vulkan-overlay-layer=true
282
283meson-arm64:
284 extends: .meson-cross
285 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100286 CROSS: arm64
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
Eric Anholt030aa6e2019-08-07 14:05:51 -0700295# While the main point of this build is testing the i386 cross build,
296# we also use this one to test some other options that are exclusive
297# with meson-main's choices (classic swrast and osmesa)
Eric Anholt11aa32a2019-07-11 12:58:28 -0700298meson-i386:
299 extends: .meson-cross
300 variables:
Eric Engestrom1c82fa02019-08-09 23:46:50 +0100301 CROSS: i386
Eric Anholt11aa32a2019-07-11 12:58:28 -0700302 VULKAN_DRIVERS: intel
Eric Anholt030aa6e2019-08-07 14:05:51 -0700303 DRI_DRIVERS: "swrast"
304 GALLIUM_DRIVERS: "iris"
Eric Anholt11aa32a2019-07-11 12:58:28 -0700305 # Disable i386 tests, because u_format_tests gets precision
306 # failures in dxtn unpacking
307 EXTRA_OPTION: >
308 -D build-tests=false
309 -D vulkan-overlay-layer=true
Eric Anholt030aa6e2019-08-07 14:05:51 -0700310 -D llvm=false
311 -D osmesa=classic
Eric Anholt11aa32a2019-07-11 12:58:28 -0700312
Eric Engestromfaf9e402019-02-26 14:40:29 +0000313scons-nollvm:
Eric Engestrom06b245b2019-01-23 15:46:10 +0000314 extends: .scons-build
315 variables:
316 SCONS_TARGET: "llvm=0"
317 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000318
Eric Engestromfaf9e402019-02-26 14:40:29 +0000319scons-llvm:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000320 extends: .scons-build
321 variables:
322 SCONS_TARGET: "llvm=1"
323 SCONS_CHECK_COMMAND: "scons llvm=1 check"
Michel Dänzer9b2473c2019-04-11 18:38:30 +0200324 LLVM_VERSION: "3.4"
325 # LLVM 3.4 packages were built with an old libstdc++ ABI
326 CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0"
Eric Anholt46daaca2019-06-28 16:35:32 -0700327
328.deqp-test:
329 <<: *ci-run-policy
330 stage: test
331 image: $DEBIAN_IMAGE
332 variables:
333 GIT_STRATEGY: none # testing doesn't build anything from source
334 DEQP_SKIPS: deqp-default-skips.txt
335 script:
336 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
337 - rm -rf install
338 - tar -xf artifacts/install.tar
339 - ./artifacts/deqp-runner.sh
340 artifacts:
341 when: on_failure
342 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
343 paths:
344 - results/
345
346test-llvmpipe-gles2:
347 parallel: 4
348 variables:
349 DEQP_VER: gles2
350 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
351 LIBGL_ALWAYS_SOFTWARE: "true"
352 DEQP_RENDERER_MATCH: "llvmpipe"
353 extends: .deqp-test
354 dependencies:
355 - meson-main
Eric Anholt553cd822019-08-09 10:32:40 -0700356
357test-softpipe-gles2:
358 parallel: 4
359 variables:
360 DEQP_VER: gles2
361 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
362 LIBGL_ALWAYS_SOFTWARE: "true"
363 DEQP_RENDERER_MATCH: "softpipe"
364 GALLIUM_DRIVER: "softpipe"
365 extends: .deqp-test
366 dependencies:
367 - meson-main
368
369# The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
370# 25 minutes. Until we can get its runtime down, just do a partial
371# (every 10 tests) run.
372test-softpipe-gles3-limited:
373 variables:
374 DEQP_VER: gles3
375 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
376 LIBGL_ALWAYS_SOFTWARE: "true"
377 DEQP_RENDERER_MATCH: "softpipe"
378 GALLIUM_DRIVER: "softpipe"
379 CI_NODE_INDEX: 1
380 CI_NODE_TOTAL: 10
381 extends: .deqp-test
382 dependencies:
383 - meson-main