freedreno/ir3: don't hardcode wrmask
[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 #
16 # The format of the tag is "%Y-%m-%d-${counter}" where ${counter} stays
17 # at "01" unless you have multiple updates on the same day :)
18 variables:
19 UBUNTU_TAG: 2019-02-12-01
20 UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
21 UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
22
23 cache:
24 paths:
25 - ccache
26
27 stages:
28 - containers-build
29 - build+test
30
31
32 # CONTAINERS
33
34 containers:ubuntu:
35 stage: containers-build
36 image: docker:stable
37 services:
38 - docker:dind
39 variables:
40 DOCKER_HOST: tcp://docker:2375
41 DOCKER_DRIVER: overlay2
42 script:
43 # Enable experimental features such as `docker manifest inspect`
44 - mkdir -p ~/.docker
45 - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
46 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
47 # Check if the image (with the specific tag) already exists
48 - docker manifest inspect $UBUNTU_IMAGE && exit || true
49 # Try to re-use the image from the main repository's registry
50 - docker image pull $UBUNTU_IMAGE_MAIN &&
51 docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE &&
52 docker image push $UBUNTU_IMAGE && exit || true
53 - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
54 - docker push $UBUNTU_IMAGE
55 only:
56 changes:
57 - .gitlab-ci.yml
58 - .gitlab-ci/Dockerfile.ubuntu
59
60
61 # BUILD
62
63 .build:
64 image: $UBUNTU_IMAGE
65 stage: build+test
66 only:
67 - master
68 - merge_requests
69 - /^ci([-/].*)?$/
70 artifacts:
71 when: on_failure
72 untracked: true
73 # Use ccache transparently, and print stats before/after
74 before_script:
75 - export PATH="/usr/lib/ccache:$PATH"
76 - export CCACHE_BASEDIR="$PWD"
77 - export CCACHE_DIR="$PWD/ccache"
78 - export CCACHE_COMPILERCHECK=content
79 - ccache --zero-stats || true
80 - ccache --show-stats || true
81 after_script:
82 - export CCACHE_DIR="$PWD/ccache"
83 - ccache --show-stats
84
85 .meson-build:
86 extends: .build
87 script:
88 # We need to control the version of llvm-config we're using, so we'll
89 # generate a native file to do so. This requires meson >=0.49
90 - if test -n "$LLVM_VERSION"; then
91 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
92 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
93 $LLVM_CONFIG --version;
94 else
95 touch native.file;
96 fi
97 - meson --version
98 - meson _build
99 --native-file=native.file
100 -D build-tests=true
101 -D libunwind=${UNWIND}
102 ${DRI_LOADERS}
103 -D dri-drivers=${DRI_DRIVERS:-[]}
104 ${GALLIUM_ST}
105 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
106 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
107 - cd _build
108 - meson configure
109 - ninja -j4
110 - ninja test
111
112 .make-build:
113 extends: .build
114 variables:
115 MAKEFLAGS: "-j4"
116 script:
117 - if test -n "$LLVM_VERSION"; then
118 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
119 fi
120 - mkdir build
121 - cd build
122 - ../autogen.sh
123 --enable-autotools
124 --enable-debug
125 $LIBUNWIND_FLAGS
126 $DRI_LOADERS
127 --with-dri-drivers=$DRI_DRIVERS
128 $GALLIUM_ST
129 --with-gallium-drivers=$GALLIUM_DRIVERS
130 --with-vulkan-drivers=$VULKAN_DRIVERS
131 --disable-llvm-shared-libs
132 - make
133 - eval $MAKE_CHECK_COMMAND
134
135 .scons-build:
136 extends: .build
137 variables:
138 SCONSFLAGS: "-j4"
139 script:
140 - if test -n "$LLVM_VERSION"; then
141 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
142 fi
143 - scons $SCONS_TARGET
144 - eval $SCONS_CHECK_COMMAND
145
146 build:meson-vulkan:
147 extends: .meson-build
148 variables:
149 UNWIND: "false"
150 DRI_LOADERS: >
151 -D glx=disabled
152 -D gbm=false
153 -D egl=false
154 -D platforms=x11,wayland,drm
155 -D osmesa=none
156 GALLIUM_ST: >
157 -D dri3=true
158 -D gallium-vdpau=false
159 -D gallium-xvmc=false
160 -D gallium-omx=disabled
161 -D gallium-va=false
162 -D gallium-xa=false
163 -D gallium-nine=false
164 -D gallium-opencl=disabled
165 VULKAN_DRIVERS: intel,amd
166 LLVM_VERSION: "7"
167
168 build:meson-loader-classic-dri:
169 extends: .meson-build
170 variables:
171 UNWIND: "false"
172 DRI_LOADERS: >
173 -D glx=dri
174 -D gbm=true
175 -D egl=true
176 -D platforms=x11,wayland,drm,surfaceless
177 -D osmesa=classic
178 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
179 GALLIUM_ST: >
180 -D dri3=true
181 -D gallium-vdpau=false
182 -D gallium-xvmc=false
183 -D gallium-omx=disabled
184 -D gallium-va=false
185 -D gallium-xa=false
186 -D gallium-nine=false
187 -D gallium-opencl=disabled
188
189 build:meson-glvnd:
190 extends: .meson-build
191 variables:
192 UNWIND: "true"
193 DRI_LOADERS: >
194 -D glvnd=true
195 -D egl=true
196 -D gbm=true
197 -D glx=dri
198 DRI_DRIVERS: "i965"
199 GALLIUM_ST: >
200 -D gallium-vdpau=false
201 -D gallium-xvmc=false
202 -D gallium-omx=disabled
203 -D gallium-va=false
204 -D gallium-xa=false
205 -D gallium-nine=false
206 -D gallium-opencl=disabled
207
208 # NOTE: Building SWR is 2x (yes two) times slower than all the other
209 # gallium drivers combined.
210 # Start this early so that it doesn't hunder the run time.
211 build:meson-gallium-swr:
212 extends: .meson-build
213 variables:
214 UNWIND: "true"
215 DRI_LOADERS: >
216 -D glx=disabled
217 -D egl=false
218 -D gbm=false
219 GALLIUM_ST: >
220 -D dri3=false
221 -D gallium-vdpau=false
222 -D gallium-xvmc=false
223 -D gallium-omx=disabled
224 -D gallium-va=false
225 -D gallium-xa=false
226 -D gallium-nine=false
227 -D gallium-opencl=disabled
228 GALLIUM_DRIVERS: "swr"
229 LLVM_VERSION: "6.0"
230
231 build:meson-gallium-radeonsi:
232 extends: .meson-build
233 variables:
234 UNWIND: "true"
235 DRI_LOADERS: >
236 -D glx=disabled
237 -D egl=false
238 -D gbm=false
239 GALLIUM_ST: >
240 -D dri3=false
241 -D gallium-vdpau=false
242 -D gallium-xvmc=false
243 -D gallium-omx=disabled
244 -D gallium-va=false
245 -D gallium-xa=false
246 -D gallium-nine=false
247 -D gallium-opencl=disabled
248 GALLIUM_DRIVERS: "radeonsi"
249 LLVM_VERSION: "7"
250
251 build:meson-gallium-drivers-other:
252 extends: .meson-build
253 variables:
254 UNWIND: "true"
255 DRI_LOADERS: >
256 -D glx=disabled
257 -D egl=false
258 -D gbm=false
259 GALLIUM_ST: >
260 -D dri3=false
261 -D gallium-vdpau=false
262 -D gallium-xvmc=false
263 -D gallium-omx=disabled
264 -D gallium-va=false
265 -D gallium-xa=false
266 -D gallium-nine=false
267 -D gallium-opencl=disabled
268 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
269 LLVM_VERSION: "5.0"
270
271 build:meson-gallium-clover-llvm5:
272 extends: .meson-build
273 variables:
274 UNWIND: "true"
275 DRI_LOADERS: >
276 -D glx=disabled
277 -D egl=false
278 -D gbm=false
279 GALLIUM_ST: >
280 -D dri3=false
281 -D gallium-vdpau=false
282 -D gallium-xvmc=false
283 -D gallium-omx=disabled
284 -D gallium-va=false
285 -D gallium-xa=false
286 -D gallium-nine=false
287 -D gallium-opencl=icd
288 GALLIUM_DRIVERS: "r600"
289 LLVM_VERSION: "5.0"
290
291 build:meson-gallium-clover-llvm6:
292 extends: build:meson-gallium-clover-llvm5
293 variables:
294 LLVM_VERSION: "6.0"
295
296 build:meson-gallium-clover-llvm7:
297 extends: build:meson-gallium-clover-llvm5
298 variables:
299 GALLIUM_DRIVERS: "r600,radeonsi"
300 LLVM_VERSION: "7"
301
302 build:meson-gallium-st-other:
303 extends: .meson-build
304 variables:
305 UNWIND: "true"
306 DRI_LOADERS: >
307 -D glx=disabled
308 -D egl=false
309 -D gbm=false
310 GALLIUM_ST: >
311 -D dri3=true
312 -D gallium-vdpau=true
313 -D gallium-xvmc=true
314 -D gallium-omx=bellagio
315 -D gallium-va=true
316 -D gallium-xa=true
317 -D gallium-nine=true
318 -D gallium-opencl=disabled
319 -D osmesa=gallium
320 GALLIUM_DRIVERS: "nouveau,swrast"
321 LLVM_VERSION: "5.0"
322
323 build:make-vulkan:
324 extends: .make-build
325 variables:
326 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
327 LLVM_VERSION: "7"
328 DRI_LOADERS: >
329 --disable-glx
330 --disable-gbm
331 --disable-egl
332 --with-platforms=x11,wayland,drm
333 DRI_DRIVERS: ""
334 GALLIUM_ST: >
335 --enable-dri
336 --enable-dri3
337 --disable-opencl
338 --disable-xa
339 --disable-nine
340 --disable-xvmc
341 --disable-vdpau
342 --disable-va
343 --disable-omx-bellagio
344 --disable-gallium-osmesa
345 VULKAN_DRIVERS: intel,radeon
346 LIBUNWIND_FLAGS: --disable-libunwind
347
348 build:make-loader-classic-dri:
349 extends: .make-build
350 variables:
351 MAKE_CHECK_COMMAND: "make check"
352 DRI_LOADERS: >
353 --enable-glx
354 --enable-gbm
355 --enable-egl
356 --with-platforms=x11,wayland,drm,surfaceless
357 --enable-osmesa
358 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
359 GALLIUM_ST: >
360 --enable-dri
361 --disable-opencl
362 --disable-xa
363 --disable-nine
364 --disable-xvmc
365 --disable-vdpau
366 --disable-va
367 --disable-omx-bellagio
368 --disable-gallium-osmesa
369 LIBUNWIND_FLAGS: --disable-libunwind
370
371 # NOTE: Building SWR is 2x (yes two) times slower than all the other
372 # gallium drivers combined.
373 # Start this early so that it doesn't hunder the run time.
374 build:make-gallium-drivers-swr:
375 extends: .make-build
376 variables:
377 MAKE_CHECK_COMMAND: "true"
378 LLVM_VERSION: "6.0"
379 DRI_LOADERS: >
380 --disable-glx
381 --disable-gbm
382 --disable-egl
383 GALLIUM_ST: >
384 --enable-dri
385 --disable-opencl
386 --disable-xa
387 --disable-nine
388 --disable-xvmc
389 --disable-vdpau
390 --disable-va
391 --disable-omx-bellagio
392 --disable-gallium-osmesa
393 GALLIUM_DRIVERS: "swr"
394 LIBUNWIND_FLAGS: --enable-libunwind
395
396 build:make-gallium-drivers-radeonsi:
397 extends: build:make-gallium-drivers-swr
398 variables:
399 LLVM_VERSION: "7"
400 GALLIUM_DRIVERS: "radeonsi"
401
402 build:make-gallium-drivers-other:
403 extends: build:make-gallium-drivers-swr
404 variables:
405 LLVM_VERSION: "3.9"
406 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
407
408 build:make-gallium-st-clover-llvm-39:
409 extends: .make-build
410 variables:
411 MAKE_CHECK_COMMAND: "true"
412 LLVM_VERSION: "3.9"
413 DRI_LOADERS: >
414 --disable-glx
415 --disable-gbm
416 --disable-egl
417 GALLIUM_ST: >
418 --disable-dri
419 --enable-opencl
420 --enable-opencl-icd
421 --enable-llvm
422 --disable-xa
423 --disable-nine
424 --disable-xvmc
425 --disable-vdpau
426 --disable-va
427 --disable-omx-bellagio
428 --disable-gallium-osmesa
429 GALLIUM_DRIVERS: "r600"
430 LIBUNWIND_FLAGS: --enable-libunwind
431
432 build:make-gallium-st-clover-llvm-4:
433 extends: build:make-gallium-st-clover-llvm-39
434 variables:
435 LLVM_VERSION: "4.0"
436
437 build:make-gallium-st-clover-llvm-5:
438 extends: build:make-gallium-st-clover-llvm-39
439 variables:
440 LLVM_VERSION: "5.0"
441
442 build:make-gallium-st-clover-llvm-6:
443 extends: build:make-gallium-st-clover-llvm-39
444 variables:
445 LLVM_VERSION: "6.0"
446
447 build:make-gallium-st-clover-llvm-7:
448 extends: build:make-gallium-st-clover-llvm-39
449 variables:
450 LLVM_VERSION: "7"
451 GALLIUM_DRIVERS: "r600,radeonsi"
452
453 build:make-gallium-st-other:
454 extends: .make-build
455 variables:
456 MAKE_CHECK_COMMAND: "true"
457 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
458 LLVM_VERSION: "3.9"
459 DRI_LOADERS: >
460 --disable-glx
461 --disable-gbm
462 --disable-egl
463 GALLIUM_ST: >
464 --enable-dri
465 --disable-opencl
466 --enable-xa
467 --enable-nine
468 --enable-xvmc
469 --enable-vdpau
470 --enable-va
471 --enable-omx-bellagio
472 --enable-gallium-osmesa
473 # We need swrast for osmesa and nine.
474 # i915 most likely doesn't work with most ST.
475 # Regardless - we're doing a quick build test here.
476 GALLIUM_DRIVERS: "i915,swrast"
477 LIBUNWIND_FLAGS: --enable-libunwind
478
479 build:scons-nollvm:
480 extends: .scons-build
481 variables:
482 SCONS_TARGET: "llvm=0"
483 SCONS_CHECK_COMMAND: "scons llvm=0 check"
484
485 build:scons-llvm:
486 extends: .scons-build
487 variables:
488 SCONS_TARGET: "llvm=1"
489 SCONS_CHECK_COMMAND: "scons llvm=1 check"
490 LLVM_VERSION: "3.9"
491
492 build:scons-swr:
493 extends: .scons-build
494 variables:
495 SCONS_TARGET: "swr=1"
496 SCONS_CHECK_COMMAND: "true"
497 LLVM_VERSION: "6.0"