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-03-05-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:-[]}
109 -D I-love-half-baked-turnips=true
120 - if test -n "$LLVM_VERSION"; then
121 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
130 --with-dri-drivers=$DRI_DRIVERS
132 --with-gallium-drivers=$GALLIUM_DRIVERS
133 --with-vulkan-drivers=$VULKAN_DRIVERS
134 --disable-llvm-shared-libs
136 - eval $MAKE_CHECK_COMMAND
143 - if test -n "$LLVM_VERSION"; then
144 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
146 - scons $SCONS_TARGET
147 - eval $SCONS_CHECK_COMMAND
150 extends: .meson-build
157 -D platforms=x11,wayland,drm
161 -D gallium-vdpau=false
162 -D gallium-xvmc=false
163 -D gallium-omx=disabled
166 -D gallium-nine=false
167 -D gallium-opencl=disabled
168 VULKAN_DRIVERS: intel,amd,freedreno
171 meson-loader-classic-dri:
172 extends: .meson-build
179 -D platforms=x11,wayland,drm,surfaceless
181 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
184 -D gallium-vdpau=false
185 -D gallium-xvmc=false
186 -D gallium-omx=disabled
189 -D gallium-nine=false
190 -D gallium-opencl=disabled
193 extends: .meson-build
203 -D gallium-vdpau=false
204 -D gallium-xvmc=false
205 -D gallium-omx=disabled
208 -D gallium-nine=false
209 -D gallium-opencl=disabled
211 # NOTE: Building SWR is 2x (yes two) times slower than all the other
212 # gallium drivers combined.
213 # Start this early so that it doesn't hunder the run time.
215 extends: .meson-build
224 -D gallium-vdpau=false
225 -D gallium-xvmc=false
226 -D gallium-omx=disabled
229 -D gallium-nine=false
230 -D gallium-opencl=disabled
231 GALLIUM_DRIVERS: "swr"
234 meson-gallium-radeonsi:
235 extends: .meson-build
244 -D gallium-vdpau=false
245 -D gallium-xvmc=false
246 -D gallium-omx=disabled
249 -D gallium-nine=false
250 -D gallium-opencl=disabled
251 GALLIUM_DRIVERS: "radeonsi"
254 meson-gallium-drivers-other:
255 extends: .meson-build
264 -D gallium-vdpau=false
265 -D gallium-xvmc=false
266 -D gallium-omx=disabled
269 -D gallium-nine=false
270 -D gallium-opencl=disabled
271 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost"
274 meson-gallium-clover-llvm:
275 extends: .meson-build
284 -D gallium-vdpau=false
285 -D gallium-xvmc=false
286 -D gallium-omx=disabled
289 -D gallium-nine=false
290 -D gallium-opencl=icd
291 GALLIUM_DRIVERS: "r600,radeonsi"
293 meson-gallium-clover-llvm39:
294 extends: meson-gallium-clover-llvm
296 GALLIUM_DRIVERS: "r600"
299 meson-gallium-st-other:
300 extends: .meson-build
309 -D gallium-vdpau=true
311 -D gallium-omx=bellagio
315 -D gallium-opencl=disabled
317 GALLIUM_DRIVERS: "nouveau,swrast"
323 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
329 --with-platforms=x11,wayland,drm
340 --disable-omx-bellagio
341 --disable-gallium-osmesa
342 VULKAN_DRIVERS: intel,radeon
343 LIBUNWIND_FLAGS: --disable-libunwind
345 make-loader-classic-dri:
348 MAKE_CHECK_COMMAND: "make check"
353 --with-platforms=x11,wayland,drm,surfaceless
355 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
364 --disable-omx-bellagio
365 --disable-gallium-osmesa
366 LIBUNWIND_FLAGS: --disable-libunwind
368 # NOTE: Building SWR is 2x (yes two) times slower than all the other
369 # gallium drivers combined.
370 # Start this early so that it doesn't hunder the run time.
371 make-gallium-drivers-swr:
374 MAKE_CHECK_COMMAND: "true"
388 --disable-omx-bellagio
389 --disable-gallium-osmesa
390 GALLIUM_DRIVERS: "swr"
391 LIBUNWIND_FLAGS: --enable-libunwind
393 make-gallium-drivers-radeonsi:
394 extends: make-gallium-drivers-swr
397 GALLIUM_DRIVERS: "radeonsi"
399 make-gallium-drivers-other:
400 extends: make-gallium-drivers-swr
403 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
405 make-gallium-st-clover-llvm:
408 MAKE_CHECK_COMMAND: "true"
423 --disable-omx-bellagio
424 --disable-gallium-osmesa
425 LIBUNWIND_FLAGS: --enable-libunwind
426 GALLIUM_DRIVERS: "r600,radeonsi"
429 make-gallium-st-clover-llvm-39:
430 extends: make-gallium-st-clover-llvm
433 GALLIUM_DRIVERS: "r600"
435 make-gallium-st-other:
438 MAKE_CHECK_COMMAND: "true"
439 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
453 --enable-omx-bellagio
454 --enable-gallium-osmesa
455 # We need swrast for osmesa and nine.
456 # i915 most likely doesn't work with most ST.
457 # Regardless - we're doing a quick build test here.
458 GALLIUM_DRIVERS: "i915,swrast"
459 LIBUNWIND_FLAGS: --enable-libunwind
462 extends: .scons-build
464 SCONS_TARGET: "llvm=0"
465 SCONS_CHECK_COMMAND: "scons llvm=0 check"
468 extends: .scons-build
470 SCONS_TARGET: "llvm=1"
471 SCONS_CHECK_COMMAND: "scons llvm=1 check"
475 extends: .scons-build
477 SCONS_TARGET: "swr=1"
478 SCONS_CHECK_COMMAND: "true"