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.
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.
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.
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 :)
19 UBUNTU_TAG: 2019-02-27-01
20 UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
21 UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
32 # When to automatically run the CI
43 extends: .ci-run-policy
44 stage: containers-build
49 DOCKER_HOST: tcp://docker:2375
50 DOCKER_DRIVER: overlay2
52 # Enable experimental features such as `docker manifest inspect`
54 - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
55 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
56 # Check if the image (with the specific tag) already exists
57 - docker manifest inspect $UBUNTU_IMAGE && exit || true
58 # Try to re-use the image from the main repository's registry
59 - docker image pull $UBUNTU_IMAGE_MAIN &&
60 docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE &&
61 docker image push $UBUNTU_IMAGE && exit || true
62 - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
63 - docker push $UBUNTU_IMAGE
69 extends: .ci-run-policy
75 # Use ccache transparently, and print stats before/after
77 - export PATH="/usr/lib/ccache:$PATH"
78 - export CCACHE_BASEDIR="$PWD"
79 - export CCACHE_DIR="$PWD/ccache"
80 - export CCACHE_COMPILERCHECK=content
81 - ccache --zero-stats || true
82 - ccache --show-stats || true
84 - export CCACHE_DIR="$PWD/ccache"
90 # We need to control the version of llvm-config we're using, so we'll
91 # generate a native file to do so. This requires meson >=0.49
92 - if test -n "$LLVM_VERSION"; then
93 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
94 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
95 $LLVM_CONFIG --version;
101 --native-file=native.file
103 -D libunwind=${UNWIND}
105 -D dri-drivers=${DRI_DRIVERS:-[]}
107 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
108 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
119 - if test -n "$LLVM_VERSION"; then
120 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
129 --with-dri-drivers=$DRI_DRIVERS
131 --with-gallium-drivers=$GALLIUM_DRIVERS
132 --with-vulkan-drivers=$VULKAN_DRIVERS
133 --disable-llvm-shared-libs
135 - eval $MAKE_CHECK_COMMAND
142 - if test -n "$LLVM_VERSION"; then
143 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
145 - scons $SCONS_TARGET
146 - eval $SCONS_CHECK_COMMAND
149 extends: .meson-build
156 -D platforms=x11,wayland,drm
160 -D gallium-vdpau=false
161 -D gallium-xvmc=false
162 -D gallium-omx=disabled
165 -D gallium-nine=false
166 -D gallium-opencl=disabled
167 VULKAN_DRIVERS: intel,amd
170 build:meson-loader-classic-dri:
171 extends: .meson-build
178 -D platforms=x11,wayland,drm,surfaceless
180 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
183 -D gallium-vdpau=false
184 -D gallium-xvmc=false
185 -D gallium-omx=disabled
188 -D gallium-nine=false
189 -D gallium-opencl=disabled
192 extends: .meson-build
202 -D gallium-vdpau=false
203 -D gallium-xvmc=false
204 -D gallium-omx=disabled
207 -D gallium-nine=false
208 -D gallium-opencl=disabled
210 # NOTE: Building SWR is 2x (yes two) times slower than all the other
211 # gallium drivers combined.
212 # Start this early so that it doesn't hunder the run time.
213 build:meson-gallium-swr:
214 extends: .meson-build
223 -D gallium-vdpau=false
224 -D gallium-xvmc=false
225 -D gallium-omx=disabled
228 -D gallium-nine=false
229 -D gallium-opencl=disabled
230 GALLIUM_DRIVERS: "swr"
233 build:meson-gallium-radeonsi:
234 extends: .meson-build
243 -D gallium-vdpau=false
244 -D gallium-xvmc=false
245 -D gallium-omx=disabled
248 -D gallium-nine=false
249 -D gallium-opencl=disabled
250 GALLIUM_DRIVERS: "radeonsi"
253 build:meson-gallium-drivers-other:
254 extends: .meson-build
263 -D gallium-vdpau=false
264 -D gallium-xvmc=false
265 -D gallium-omx=disabled
268 -D gallium-nine=false
269 -D gallium-opencl=disabled
270 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
273 build:meson-gallium-clover-llvm5:
274 extends: .meson-build
283 -D gallium-vdpau=false
284 -D gallium-xvmc=false
285 -D gallium-omx=disabled
288 -D gallium-nine=false
289 -D gallium-opencl=icd
290 GALLIUM_DRIVERS: "r600"
293 build:meson-gallium-clover-llvm6:
294 extends: build:meson-gallium-clover-llvm5
298 build:meson-gallium-clover-llvm7:
299 extends: build:meson-gallium-clover-llvm5
301 GALLIUM_DRIVERS: "r600,radeonsi"
304 build:meson-gallium-st-other:
305 extends: .meson-build
314 -D gallium-vdpau=true
316 -D gallium-omx=bellagio
320 -D gallium-opencl=disabled
322 GALLIUM_DRIVERS: "nouveau,swrast"
328 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
334 --with-platforms=x11,wayland,drm
345 --disable-omx-bellagio
346 --disable-gallium-osmesa
347 VULKAN_DRIVERS: intel,radeon
348 LIBUNWIND_FLAGS: --disable-libunwind
350 build:make-loader-classic-dri:
353 MAKE_CHECK_COMMAND: "make check"
358 --with-platforms=x11,wayland,drm,surfaceless
360 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
369 --disable-omx-bellagio
370 --disable-gallium-osmesa
371 LIBUNWIND_FLAGS: --disable-libunwind
373 # NOTE: Building SWR is 2x (yes two) times slower than all the other
374 # gallium drivers combined.
375 # Start this early so that it doesn't hunder the run time.
376 build:make-gallium-drivers-swr:
379 MAKE_CHECK_COMMAND: "true"
393 --disable-omx-bellagio
394 --disable-gallium-osmesa
395 GALLIUM_DRIVERS: "swr"
396 LIBUNWIND_FLAGS: --enable-libunwind
398 build:make-gallium-drivers-radeonsi:
399 extends: build:make-gallium-drivers-swr
402 GALLIUM_DRIVERS: "radeonsi"
404 build:make-gallium-drivers-other:
405 extends: build:make-gallium-drivers-swr
408 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
410 build:make-gallium-st-clover-llvm-39:
413 MAKE_CHECK_COMMAND: "true"
429 --disable-omx-bellagio
430 --disable-gallium-osmesa
431 GALLIUM_DRIVERS: "r600"
432 LIBUNWIND_FLAGS: --enable-libunwind
434 build:make-gallium-st-clover-llvm-4:
435 extends: build:make-gallium-st-clover-llvm-39
439 build:make-gallium-st-clover-llvm-5:
440 extends: build:make-gallium-st-clover-llvm-39
444 build:make-gallium-st-clover-llvm-6:
445 extends: build:make-gallium-st-clover-llvm-39
449 build:make-gallium-st-clover-llvm-7:
450 extends: build:make-gallium-st-clover-llvm-39
453 GALLIUM_DRIVERS: "r600,radeonsi"
455 build:make-gallium-st-other:
458 MAKE_CHECK_COMMAND: "true"
459 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
473 --enable-omx-bellagio
474 --enable-gallium-osmesa
475 # We need swrast for osmesa and nine.
476 # i915 most likely doesn't work with most ST.
477 # Regardless - we're doing a quick build test here.
478 GALLIUM_DRIVERS: "i915,swrast"
479 LIBUNWIND_FLAGS: --enable-libunwind
482 extends: .scons-build
484 SCONS_TARGET: "llvm=0"
485 SCONS_CHECK_COMMAND: "scons llvm=0 check"
488 extends: .scons-build
490 SCONS_TARGET: "llvm=1"
491 SCONS_CHECK_COMMAND: "scons llvm=1 check"
495 extends: .scons-build
497 SCONS_TARGET: "swr=1"
498 SCONS_CHECK_COMMAND: "true"