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
73 # Use ccache transparently, and print stats before/after
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
82 - export CCACHE_DIR="$PWD/ccache"
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;
99 --native-file=native.file
101 -D libunwind=${UNWIND}
103 -D dri-drivers=${DRI_DRIVERS:-[]}
105 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
106 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
117 - if test -n "$LLVM_VERSION"; then
118 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
127 --with-dri-drivers=$DRI_DRIVERS
129 --with-gallium-drivers=$GALLIUM_DRIVERS
130 --with-vulkan-drivers=$VULKAN_DRIVERS
131 --disable-llvm-shared-libs
133 - eval $MAKE_CHECK_COMMAND
140 - if test -n "$LLVM_VERSION"; then
141 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
143 - scons $SCONS_TARGET
144 - eval $SCONS_CHECK_COMMAND
147 extends: .meson-build
154 -D platforms=x11,wayland,drm
158 -D gallium-vdpau=false
159 -D gallium-xvmc=false
160 -D gallium-omx=disabled
163 -D gallium-nine=false
164 -D gallium-opencl=disabled
165 VULKAN_DRIVERS: intel,amd
168 build:meson-loader-classic-dri:
169 extends: .meson-build
176 -D platforms=x11,wayland,drm,surfaceless
178 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
181 -D gallium-vdpau=false
182 -D gallium-xvmc=false
183 -D gallium-omx=disabled
186 -D gallium-nine=false
187 -D gallium-opencl=disabled
190 extends: .meson-build
200 -D gallium-vdpau=false
201 -D gallium-xvmc=false
202 -D gallium-omx=disabled
205 -D gallium-nine=false
206 -D gallium-opencl=disabled
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
221 -D gallium-vdpau=false
222 -D gallium-xvmc=false
223 -D gallium-omx=disabled
226 -D gallium-nine=false
227 -D gallium-opencl=disabled
228 GALLIUM_DRIVERS: "swr"
231 build:meson-gallium-radeonsi:
232 extends: .meson-build
241 -D gallium-vdpau=false
242 -D gallium-xvmc=false
243 -D gallium-omx=disabled
246 -D gallium-nine=false
247 -D gallium-opencl=disabled
248 GALLIUM_DRIVERS: "radeonsi"
251 build:meson-gallium-drivers-other:
252 extends: .meson-build
261 -D gallium-vdpau=false
262 -D gallium-xvmc=false
263 -D gallium-omx=disabled
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"
271 build:meson-gallium-clover-llvm5:
272 extends: .meson-build
281 -D gallium-vdpau=false
282 -D gallium-xvmc=false
283 -D gallium-omx=disabled
286 -D gallium-nine=false
287 -D gallium-opencl=icd
288 GALLIUM_DRIVERS: "r600"
291 build:meson-gallium-clover-llvm6:
292 extends: build:meson-gallium-clover-llvm5
296 build:meson-gallium-clover-llvm7:
297 extends: build:meson-gallium-clover-llvm5
299 GALLIUM_DRIVERS: "r600,radeonsi"
302 build:meson-gallium-st-other:
303 extends: .meson-build
312 -D gallium-vdpau=true
314 -D gallium-omx=bellagio
318 -D gallium-opencl=disabled
320 GALLIUM_DRIVERS: "nouveau,swrast"
326 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
332 --with-platforms=x11,wayland,drm
343 --disable-omx-bellagio
344 --disable-gallium-osmesa
345 VULKAN_DRIVERS: intel,radeon
346 LIBUNWIND_FLAGS: --disable-libunwind
348 build:make-loader-classic-dri:
351 MAKE_CHECK_COMMAND: "make check"
356 --with-platforms=x11,wayland,drm,surfaceless
358 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
367 --disable-omx-bellagio
368 --disable-gallium-osmesa
369 LIBUNWIND_FLAGS: --disable-libunwind
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:
377 MAKE_CHECK_COMMAND: "true"
391 --disable-omx-bellagio
392 --disable-gallium-osmesa
393 GALLIUM_DRIVERS: "swr"
394 LIBUNWIND_FLAGS: --enable-libunwind
396 build:make-gallium-drivers-radeonsi:
397 extends: build:make-gallium-drivers-swr
400 GALLIUM_DRIVERS: "radeonsi"
402 build:make-gallium-drivers-other:
403 extends: build:make-gallium-drivers-swr
406 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
408 build:make-gallium-st-clover-llvm-39:
411 MAKE_CHECK_COMMAND: "true"
427 --disable-omx-bellagio
428 --disable-gallium-osmesa
429 GALLIUM_DRIVERS: "r600"
430 LIBUNWIND_FLAGS: --enable-libunwind
432 build:make-gallium-st-clover-llvm-4:
433 extends: build:make-gallium-st-clover-llvm-39
437 build:make-gallium-st-clover-llvm-5:
438 extends: build:make-gallium-st-clover-llvm-39
442 build:make-gallium-st-clover-llvm-6:
443 extends: build:make-gallium-st-clover-llvm-39
447 build:make-gallium-st-clover-llvm-7:
448 extends: build:make-gallium-st-clover-llvm-39
451 GALLIUM_DRIVERS: "r600,radeonsi"
453 build:make-gallium-st-other:
456 MAKE_CHECK_COMMAND: "true"
457 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
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
480 extends: .scons-build
482 SCONS_TARGET: "llvm=0"
483 SCONS_CHECK_COMMAND: "scons llvm=0 check"
486 extends: .scons-build
488 SCONS_TARGET: "llvm=1"
489 SCONS_CHECK_COMMAND: "scons llvm=1 check"
493 extends: .scons-build
495 SCONS_TARGET: "swr=1"
496 SCONS_CHECK_COMMAND: "true"