panfrost: Get rid of the flush in panfrost_set_framebuffer_state()
[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-30"
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 .use-debian-9:
77 image: $STRETCH_IMAGE
78 needs:
79 - debian-9
80
81 # Builds a Docker image with the native environment and VK-GL-CTS for testing.
82 test-container:arm64:
83 extends:
84 - .debian@container-ifnot-exists@arm64v8
85 - .ci-run-policy
86 stage: containers
87 variables:
88 DEBIAN_TAG: "$DEBIAN_ARM64_TAG"
89 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
90 DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
91
92 # BUILD
93
94 .build:
95 extends: .ci-run-policy
96 image: $DEBIAN_IMAGE
97 needs:
98 - debian-10
99 stage: build
100 cache:
101 key: ${CI_JOB_NAME}
102 paths:
103 - ccache
104 artifacts:
105 when: always
106 paths:
107 - _build/meson-logs/*.txt
108 # scons:
109 - build/*/config.log
110 - shader-db
111 variables:
112 CCACHE_COMPILERCHECK: "content"
113 # Use ccache transparently, and print stats before/after
114 before_script:
115 - export PATH="/usr/lib/ccache:$PATH"
116 - export CCACHE_BASEDIR="$PWD"
117 - export CCACHE_DIR="$PWD/ccache"
118 - ccache --max-size=1500M
119 - ccache --zero-stats || true
120 - ccache --show-stats || true
121 after_script:
122 # In case the install dir is being saved as artifacts, tar it up
123 # so that symlinks and hardlinks aren't each packed separately in
124 # the zip file.
125 - if [ -d install ]; then
126 tar -cf artifacts/install.tar install;
127 fi
128 - export CCACHE_DIR="$PWD/ccache"
129 - ccache --show-stats
130
131 .meson-build:
132 extends: .build
133 script:
134 - .gitlab-ci/meson-build.sh
135
136 .scons-build:
137 extends: .build
138 variables:
139 SCONSFLAGS: "-j4"
140 script:
141 - .gitlab-ci/scons-build.sh
142
143 meson-main:
144 extends:
145 - .meson-build
146 - .ci-deqp-artifacts
147 variables:
148 UNWIND: "true"
149 DRI_LOADERS: >
150 -D glx=dri
151 -D gbm=true
152 -D egl=true
153 -D platforms=x11,wayland,drm,surfaceless
154 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
155 GALLIUM_ST: >
156 -D dri3=true
157 -D gallium-extra-hud=true
158 -D gallium-vdpau=true
159 -D gallium-xvmc=true
160 -D gallium-omx=bellagio
161 -D gallium-va=true
162 -D gallium-xa=true
163 -D gallium-nine=true
164 -D gallium-opencl=disabled
165 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
166 LLVM_VERSION: "7"
167 EXTRA_OPTION: >
168 -D osmesa=gallium
169 -D tools=all
170 MESON_SHADERDB: "true"
171 BUILDTYPE: "debugoptimized"
172
173 .meson-cross:
174 extends:
175 - .meson-build
176 - .ci-deqp-artifacts
177 variables:
178 UNWIND: "false"
179 DRI_LOADERS: >
180 -D glx=disabled
181 -D gbm=false
182 -D egl=true
183 -D platforms=surfaceless
184 -D osmesa=none
185 GALLIUM_ST: >
186 -D dri3=false
187 -D gallium-vdpau=false
188 -D gallium-xvmc=false
189 -D gallium-omx=disabled
190 -D gallium-va=false
191 -D gallium-xa=false
192 -D gallium-nine=false
193 -D llvm=false
194 script:
195 - .gitlab-ci/meson-build.sh
196
197 meson-armhf:
198 extends: .meson-cross
199 variables:
200 CROSS: armhf
201 VULKAN_DRIVERS: freedreno
202 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4"
203 # Disable the tests since we're cross compiling.
204 EXTRA_OPTION: >
205 -D build-tests=false
206 -D I-love-half-baked-turnips=true
207 -D vulkan-overlay-layer=true
208
209 meson-arm64:
210 extends: meson-armhf
211 variables:
212 CROSS: arm64
213 BUILDTYPE: "debugoptimized"
214
215 # NOTE: Building SWR is 2x (yes two) times slower than all the other
216 # gallium drivers combined.
217 # Start this early so that it doesn't limit the total run time.
218 #
219 # We also stick the glvnd build here, since we want non-glvnd in
220 # meson-main for actual driver CI.
221 meson-swr-glvnd:
222 extends: .meson-build
223 variables:
224 UNWIND: "true"
225 DRI_LOADERS: >
226 -D glvnd=true
227 -D egl=true
228 GALLIUM_ST: >
229 -D dri3=true
230 -D gallium-vdpau=false
231 -D gallium-xvmc=false
232 -D gallium-omx=disabled
233 -D gallium-va=false
234 -D gallium-xa=false
235 -D gallium-nine=false
236 -D gallium-opencl=disabled
237 GALLIUM_DRIVERS: "swr,iris"
238 LLVM_VERSION: "6.0"
239
240 meson-clang:
241 extends: .meson-build
242 variables:
243 UNWIND: "true"
244 DRI_DRIVERS: "auto"
245 GALLIUM_DRIVERS: "auto"
246 VULKAN_DRIVERS: intel,amd,freedreno
247 CC: "ccache clang-8"
248 CXX: "ccache clang++-8"
249
250 scons-swr:
251 extends: .scons-build
252 variables:
253 SCONS_TARGET: "swr=1"
254 SCONS_CHECK_COMMAND: "true"
255 LLVM_VERSION: "6.0"
256
257 scons-win64:
258 extends: .scons-build
259 variables:
260 SCONS_TARGET: platform=windows machine=x86_64
261 SCONS_CHECK_COMMAND: "true"
262
263 meson-clover:
264 extends: .meson-build
265 variables:
266 UNWIND: "true"
267 DRI_LOADERS: >
268 -D glx=disabled
269 -D egl=false
270 -D gbm=false
271 GALLIUM_ST: >
272 -D dri3=false
273 -D gallium-vdpau=false
274 -D gallium-xvmc=false
275 -D gallium-omx=disabled
276 -D gallium-va=false
277 -D gallium-xa=false
278 -D gallium-nine=false
279 -D gallium-opencl=icd
280 script:
281 - export GALLIUM_DRIVERS="r600,radeonsi"
282 - .gitlab-ci/meson-build.sh
283 - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
284 - export GALLIUM_DRIVERS="i915,r600"
285 - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
286 - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
287
288 meson-clover-old-llvm:
289 extends:
290 - meson-clover
291 - .use-debian-9
292 variables:
293 UNWIND: "false"
294 DRI_LOADERS: >
295 -D glx=disabled
296 -D egl=false
297 -D gbm=false
298 -D platforms=drm,surfaceless
299 GALLIUM_DRIVERS: "i915,r600"
300 script:
301 - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
302 - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
303 - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
304
305 meson-vulkan:
306 extends: .meson-build
307 variables:
308 UNWIND: "false"
309 DRI_LOADERS: >
310 -D glx=disabled
311 -D gbm=false
312 -D egl=false
313 -D platforms=x11,wayland,drm
314 -D osmesa=none
315 GALLIUM_ST: >
316 -D dri3=true
317 -D gallium-vdpau=false
318 -D gallium-xvmc=false
319 -D gallium-omx=disabled
320 -D gallium-va=false
321 -D gallium-xa=false
322 -D gallium-nine=false
323 -D gallium-opencl=disabled
324 VULKAN_DRIVERS: intel,amd,freedreno
325 LLVM_VERSION: "8"
326 EXTRA_OPTION: >
327 -D vulkan-overlay-layer=true
328
329 # While the main point of this build is testing the i386 cross build,
330 # we also use this one to test some other options that are exclusive
331 # with meson-main's choices (classic swrast and osmesa)
332 meson-i386:
333 extends: .meson-cross
334 variables:
335 CROSS: i386
336 VULKAN_DRIVERS: intel
337 DRI_DRIVERS: "swrast"
338 GALLIUM_DRIVERS: "iris"
339 EXTRA_OPTION: >
340 -D vulkan-overlay-layer=true
341 -D llvm=false
342 -D osmesa=classic
343
344 scons:
345 extends: .scons-build
346 variables:
347 SCONS_TARGET: "llvm=1"
348 SCONS_CHECK_COMMAND: "scons llvm=1 check"
349 script:
350 - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check" .gitlab-ci/scons-build.sh
351 - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
352 - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
353 - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
354
355 scons-old-llvm:
356 extends:
357 - scons
358 - .use-debian-9
359 script:
360 - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
361 - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
362 - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
363
364 .deqp-test:
365 extends: .ci-run-policy
366 stage: test
367 image: $DEBIAN_IMAGE
368 variables:
369 GIT_STRATEGY: none # testing doesn't build anything from source
370 DEQP_SKIPS: deqp-default-skips.txt
371 script:
372 # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
373 - rm -rf install
374 - tar -xf artifacts/install.tar
375 - ./artifacts/deqp-runner.sh
376 artifacts:
377 when: on_failure
378 name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
379 paths:
380 - results/
381 dependencies:
382 - meson-main
383 needs: [meson-main]
384
385 test-llvmpipe-gles2:
386 parallel: 4
387 variables:
388 DEQP_VER: gles2
389 DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
390 LIBGL_ALWAYS_SOFTWARE: "true"
391 DEQP_RENDERER_MATCH: "llvmpipe"
392 extends: .deqp-test
393
394 test-softpipe-gles2:
395 extends: test-llvmpipe-gles2
396 variables:
397 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
398 DEQP_RENDERER_MATCH: "softpipe"
399 GALLIUM_DRIVER: "softpipe"
400
401 # The GLES2 CTS run takes about 8 minutes of CPU time, while GLES3 is
402 # 25 minutes. Until we can get its runtime down, just do a partial
403 # (every 10 tests) run.
404 test-softpipe-gles3-limited:
405 variables:
406 DEQP_VER: gles3
407 DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
408 LIBGL_ALWAYS_SOFTWARE: "true"
409 DEQP_RENDERER_MATCH: "softpipe"
410 GALLIUM_DRIVER: "softpipe"
411 CI_NODE_INDEX: 1
412 CI_NODE_TOTAL: 10
413 extends: .deqp-test
414
415 arm64_a630_gles2:
416 extends: .deqp-test
417 image: $DEBIAN_ARM64_IMAGE
418 variables:
419 DEQP_VER: gles2
420 DEQP_RENDERER_MATCH: "FD630"
421 DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
422 DEQP_SKIPS: deqp-freedreno-a630-skips.txt
423 NIR_VALIDATE: 0
424 tags:
425 - mesa-cheza
426 dependencies:
427 - meson-arm64
428 needs:
429 - meson-arm64
430 - test-container:arm64
431
432 arm64_a630_gles31:
433 extends: arm64_a630_gles2
434 parallel: 4
435 variables:
436 DEQP_VER: gles31
437
438 arm64_a630_gles3:
439 parallel: 6
440 extends: arm64_a630_gles2
441 variables:
442 DEQP_VER: gles3
443
444 arm64_a306_gles2:
445 parallel: 4
446 extends: arm64_a630_gles2
447 variables:
448 DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
449 DEQP_SKIPS: deqp-default-skips.txt
450 DEQP_RENDERER_MATCH: "FD307"
451 tags:
452 - db410c