etnaviv: Use reentrant screen lock around flush
[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-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.
15 variables:
16 UPSTREAM_REPO: mesa/mesa
17 DEBIAN_TAG: "2019-08-09"
18 DEBIAN_VERSION: stretch-slim
19 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
20
21 include:
22 - project: 'wayland/ci-templates'
23 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
24 file: '/templates/debian.yml'
25
26 stages:
27 - containers-build
28 - build+test
29 - test
30
31
32 # When to automatically run the CI
33 .ci-run-policy: &ci-run-policy
34 only:
35 - branches@mesa/mesa
36 - merge_requests
37 - /^ci([-/].*)?$/
38 retry:
39 max: 2
40 when:
41 - runner_system_failure
42
43 .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
51
52 # CONTAINERS
53
54 debian:
55 extends: .debian@container-ifnot-exists
56 stage: containers-build
57 <<: *ci-run-policy
58 variables:
59 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
60 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
61
62
63 # BUILD
64
65 .build:
66 <<: *ci-run-policy
67 image: $DEBIAN_IMAGE
68 stage: build+test
69 cache:
70 paths:
71 - ccache
72 artifacts:
73 when: always
74 paths:
75 - _build/meson-logs/*.txt
76 # scons:
77 - build/*/config.log
78 - shader-db
79 variables:
80 CCACHE_COMPILERCHECK: "content"
81 # 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"
86 - ccache --zero-stats || true
87 - ccache --show-stats || true
88 after_script:
89 # 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
95 - export CCACHE_DIR="$PWD/ccache"
96 - ccache --show-stats
97
98 .meson-build:
99 extends: .build
100 script:
101 - .gitlab-ci/meson-build.sh
102
103 .scons-build:
104 extends: .build
105 variables:
106 SCONSFLAGS: "-j4"
107 script:
108 - if test -n "$LLVM_VERSION"; then
109 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
110 fi
111 - scons $SCONS_TARGET
112 - eval $SCONS_CHECK_COMMAND
113
114 # 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.
117 #
118 # We also stick the glvnd build here, since we want non-glvnd in
119 # meson-main for actual driver CI.
120 meson-swr-glvnd:
121 extends: .meson-build
122 variables:
123 UNWIND: "true"
124 DRI_LOADERS: >
125 -D glvnd=true
126 -D egl=true
127 GALLIUM_ST: >
128 -D dri3=true
129 -D gallium-vdpau=false
130 -D gallium-xvmc=false
131 -D gallium-omx=disabled
132 -D gallium-va=false
133 -D gallium-xa=false
134 -D gallium-nine=false
135 -D gallium-opencl=disabled
136 GALLIUM_DRIVERS: "swr,iris"
137 LLVM_VERSION: "6.0"
138
139 meson-clang:
140 extends: .meson-build
141 variables:
142 UNWIND: "true"
143 DRI_DRIVERS: "auto"
144 GALLIUM_DRIVERS: "auto"
145 VULKAN_DRIVERS: intel,amd,freedreno
146 CC: "ccache clang-8"
147 CXX: "ccache clang++-8"
148 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
153
154 scons-swr:
155 extends: .scons-build
156 variables:
157 SCONS_TARGET: "swr=1"
158 SCONS_CHECK_COMMAND: "true"
159 LLVM_VERSION: "6.0"
160
161 scons-win64:
162 extends: .scons-build
163 variables:
164 SCONS_TARGET: platform=windows machine=x86_64
165 SCONS_CHECK_COMMAND: "true"
166
167 meson-main:
168 extends: .meson-build
169 variables:
170 UNWIND: "true"
171 DRI_LOADERS: >
172 -D glx=dri
173 -D gbm=true
174 -D egl=true
175 -D platforms=x11,wayland,drm,surfaceless
176 DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
177 GALLIUM_ST: >
178 -D dri3=true
179 -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
185 -D gallium-nine=true
186 -D gallium-opencl=disabled
187 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima"
188 LLVM_VERSION: "7"
189 EXTRA_OPTION: >
190 -D osmesa=gallium
191 -D tools=all
192 MESON_SHADERDB: "true"
193 BUILDTYPE: "debugoptimized"
194 <<: *ci-deqp-artifacts
195
196 meson-clover:
197 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
213 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
222
223 meson-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"
244 EXTRA_OPTION: >
245 -D vulkan-overlay-layer=true
246
247 .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
266 <<: *ci-deqp-artifacts
267 script:
268 - .gitlab-ci/meson-build.sh
269
270 meson-armhf:
271 extends: .meson-cross
272 variables:
273 CROSS: armhf
274 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
282 meson-arm64:
283 extends: .meson-cross
284 variables:
285 CROSS: arm64
286 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
294 # 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)
297 meson-i386:
298 extends: .meson-cross
299 variables:
300 CROSS: i386
301 VULKAN_DRIVERS: intel
302 DRI_DRIVERS: "swrast"
303 GALLIUM_DRIVERS: "iris"
304 # 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
309 -D llvm=false
310 -D osmesa=classic
311
312 scons-nollvm:
313 extends: .scons-build
314 variables:
315 SCONS_TARGET: "llvm=0"
316 SCONS_CHECK_COMMAND: "scons llvm=0 check"
317
318 scons-llvm:
319 extends: .scons-build
320 variables:
321 SCONS_TARGET: "llvm=1"
322 SCONS_CHECK_COMMAND: "scons llvm=1 check"
323 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"
326
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
345 test-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