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-12-01
20 UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
21 UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
35 stage: containers-build
40 DOCKER_HOST: tcp://docker:2375
41 DOCKER_DRIVER: overlay2
43 # Enable experimental features such as `docker manifest inspect`
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
58 - .gitlab-ci/Dockerfile.ubuntu
72 # Use ccache transparently, and print stats before/after
74 - export PATH="/usr/lib/ccache:$PATH"
75 - export CCACHE_BASEDIR="$PWD"
76 - export CCACHE_DIR="$PWD/ccache"
77 - export CCACHE_COMPILERCHECK=content
78 - ccache --zero-stats || true
79 - ccache --show-stats || true
81 - export CCACHE_DIR="$PWD/ccache"
87 # We need to control the version of llvm-config we're using, so we'll
88 # generate a native file to do so. This requires meson >=0.49
89 - if test -n "$LLVM_VERSION"; then
90 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
91 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
92 $LLVM_CONFIG --version;
98 --native-file=native.file
100 -D libunwind=${UNWIND}
102 -D dri-drivers=${DRI_DRIVERS:-[]}
104 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
105 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
116 - if test -n "$LLVM_VERSION"; then
117 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
126 --with-dri-drivers=$DRI_DRIVERS
128 --with-gallium-drivers=$GALLIUM_DRIVERS
129 --with-vulkan-drivers=$VULKAN_DRIVERS
130 --disable-llvm-shared-libs
132 - eval $MAKE_CHECK_COMMAND
139 - if test -n "$LLVM_VERSION"; then
140 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
142 - scons $SCONS_TARGET
143 - eval $SCONS_CHECK_COMMAND
146 extends: .meson-build
153 -D platforms=x11,wayland,drm
157 -D gallium-vdpau=false
158 -D gallium-xvmc=false
159 -D gallium-omx=disabled
162 -D gallium-nine=false
163 -D gallium-opencl=disabled
164 VULKAN_DRIVERS: intel,amd
167 build:meson-loader-classic-dri:
168 extends: .meson-build
175 -D platforms=x11,wayland,drm,surfaceless
177 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
180 -D gallium-vdpau=false
181 -D gallium-xvmc=false
182 -D gallium-omx=disabled
185 -D gallium-nine=false
186 -D gallium-opencl=disabled
189 extends: .meson-build
199 -D gallium-vdpau=false
200 -D gallium-xvmc=false
201 -D gallium-omx=disabled
204 -D gallium-nine=false
205 -D gallium-opencl=disabled
207 # NOTE: Building SWR is 2x (yes two) times slower than all the other
208 # gallium drivers combined.
209 # Start this early so that it doesn't hunder the run time.
210 build:meson-gallium-swr:
211 extends: .meson-build
220 -D gallium-vdpau=false
221 -D gallium-xvmc=false
222 -D gallium-omx=disabled
225 -D gallium-nine=false
226 -D gallium-opencl=disabled
227 GALLIUM_DRIVERS: "swr"
230 build:meson-gallium-radeonsi:
231 extends: .meson-build
240 -D gallium-vdpau=false
241 -D gallium-xvmc=false
242 -D gallium-omx=disabled
245 -D gallium-nine=false
246 -D gallium-opencl=disabled
247 GALLIUM_DRIVERS: "radeonsi"
250 build:meson-gallium-drivers-other:
251 extends: .meson-build
260 -D gallium-vdpau=false
261 -D gallium-xvmc=false
262 -D gallium-omx=disabled
265 -D gallium-nine=false
266 -D gallium-opencl=disabled
267 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
270 build:meson-gallium-clover-llvm5:
271 extends: .meson-build
280 -D gallium-vdpau=false
281 -D gallium-xvmc=false
282 -D gallium-omx=disabled
285 -D gallium-nine=false
286 -D gallium-opencl=icd
287 GALLIUM_DRIVERS: "r600"
290 build:meson-gallium-clover-llvm6:
291 extends: build:meson-gallium-clover-llvm5
295 build:meson-gallium-clover-llvm7:
296 extends: build:meson-gallium-clover-llvm5
298 GALLIUM_DRIVERS: "r600,radeonsi"
301 build:meson-gallium-st-other:
302 extends: .meson-build
311 -D gallium-vdpau=true
313 -D gallium-omx=bellagio
317 -D gallium-opencl=disabled
319 GALLIUM_DRIVERS: "nouveau,swrast"
325 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
331 --with-platforms=x11,wayland,drm
342 --disable-omx-bellagio
343 --disable-gallium-osmesa
344 VULKAN_DRIVERS: intel,radeon
345 LIBUNWIND_FLAGS: --disable-libunwind
347 build:make-loader-classic-dri:
350 MAKE_CHECK_COMMAND: "make check"
355 --with-platforms=x11,wayland,drm,surfaceless
357 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
366 --disable-omx-bellagio
367 --disable-gallium-osmesa
368 LIBUNWIND_FLAGS: --disable-libunwind
370 # NOTE: Building SWR is 2x (yes two) times slower than all the other
371 # gallium drivers combined.
372 # Start this early so that it doesn't hunder the run time.
373 build:make-gallium-drivers-swr:
376 MAKE_CHECK_COMMAND: "true"
390 --disable-omx-bellagio
391 --disable-gallium-osmesa
392 GALLIUM_DRIVERS: "swr"
393 LIBUNWIND_FLAGS: --enable-libunwind
395 build:make-gallium-drivers-radeonsi:
396 extends: build:make-gallium-drivers-swr
399 GALLIUM_DRIVERS: "radeonsi"
401 build:make-gallium-drivers-other:
402 extends: build:make-gallium-drivers-swr
405 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
407 build:make-gallium-st-clover-llvm-39:
410 MAKE_CHECK_COMMAND: "true"
426 --disable-omx-bellagio
427 --disable-gallium-osmesa
428 GALLIUM_DRIVERS: "r600"
429 LIBUNWIND_FLAGS: --enable-libunwind
431 build:make-gallium-st-clover-llvm-4:
432 extends: build:make-gallium-st-clover-llvm-39
436 build:make-gallium-st-clover-llvm-5:
437 extends: build:make-gallium-st-clover-llvm-39
441 build:make-gallium-st-clover-llvm-6:
442 extends: build:make-gallium-st-clover-llvm-39
446 build:make-gallium-st-clover-llvm-7:
447 extends: build:make-gallium-st-clover-llvm-39
450 GALLIUM_DRIVERS: "r600,radeonsi"
452 build:make-gallium-st-other:
455 MAKE_CHECK_COMMAND: "true"
456 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
470 --enable-omx-bellagio
471 --enable-gallium-osmesa
472 # We need swrast for osmesa and nine.
473 # i915 most likely doesn't work with most ST.
474 # Regardless - we're doing a quick build test here.
475 GALLIUM_DRIVERS: "i915,swrast"
476 LIBUNWIND_FLAGS: --enable-libunwind
479 extends: .scons-build
481 SCONS_TARGET: "llvm=0"
482 SCONS_CHECK_COMMAND: "scons llvm=0 check"
485 extends: .scons-build
487 SCONS_TARGET: "llvm=1"
488 SCONS_CHECK_COMMAND: "scons llvm=1 check"
492 extends: .scons-build
494 SCONS_TARGET: "swr=1"
495 SCONS_CHECK_COMMAND: "true"