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-01-31-01
20 UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
21 UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
32 stage: containers-build
37 DOCKER_HOST: tcp://docker:2375
38 DOCKER_DRIVER: overlay2
40 # Enable experimental features such as `docker manifest inspect`
42 - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
43 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
44 # Check if the image (with the specific tag) already exists
45 - docker manifest inspect $UBUNTU_IMAGE && exit || true
46 # Try to re-use the image from the main repository's registry
47 - docker image pull $UBUNTU_IMAGE_MAIN &&
48 docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE &&
49 docker image push $UBUNTU_IMAGE && exit || true
50 - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
51 - docker push $UBUNTU_IMAGE
55 - .gitlab-ci/Dockerfile.ubuntu
70 # We need to control the version of llvm-config we're using, so we'll
71 # generate a native file to do so. This requires meson >=0.49
72 - if test -n "$LLVM_VERSION"; then
73 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
74 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
75 $LLVM_CONFIG --version;
81 --native-file=native.file
83 -D libunwind=${UNWIND}
85 -D dri-drivers=${DRI_DRIVERS:-[]}
87 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
88 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
100 - if test -n "$LLVM_VERSION"; then
101 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
110 --with-dri-drivers=$DRI_DRIVERS
112 --with-gallium-drivers=$GALLIUM_DRIVERS
113 --with-vulkan-drivers=$VULKAN_DRIVERS
114 --disable-llvm-shared-libs
117 - eval $MAKE_CHECK_COMMAND
124 - if test -n "$LLVM_VERSION"; then
125 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
127 - scons $SCONS_TARGET
128 - eval $SCONS_CHECK_COMMAND
131 extends: .meson-build
138 -D platforms=x11,wayland,drm
142 -D gallium-vdpau=false
143 -D gallium-xvmc=false
144 -D gallium-omx=disabled
147 -D gallium-nine=false
148 -D gallium-opencl=disabled
149 VULKAN_DRIVERS: intel,amd
152 build:meson-loader-classic-dri:
153 extends: .meson-build
160 -D platforms=x11,wayland,drm,surfaceless
162 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
165 -D gallium-vdpau=false
166 -D gallium-xvmc=false
167 -D gallium-omx=disabled
170 -D gallium-nine=false
171 -D gallium-opencl=disabled
174 extends: .meson-build
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
192 # NOTE: Building SWR is 2x (yes two) times slower than all the other
193 # gallium drivers combined.
194 # Start this early so that it doesn't hunder the run time.
195 build:meson-gallium-swr:
196 extends: .meson-build
205 -D gallium-vdpau=false
206 -D gallium-xvmc=false
207 -D gallium-omx=disabled
210 -D gallium-nine=false
211 -D gallium-opencl=disabled
212 GALLIUM_DRIVERS: "swr"
215 build:meson-gallium-radeonsi:
216 extends: .meson-build
225 -D gallium-vdpau=false
226 -D gallium-xvmc=false
227 -D gallium-omx=disabled
230 -D gallium-nine=false
231 -D gallium-opencl=disabled
232 GALLIUM_DRIVERS: "radeonsi"
235 build:meson-gallium-drivers-other:
236 extends: .meson-build
245 -D gallium-vdpau=false
246 -D gallium-xvmc=false
247 -D gallium-omx=disabled
250 -D gallium-nine=false
251 -D gallium-opencl=disabled
252 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
255 build:meson-gallium-clover-llvm5:
256 extends: .meson-build
265 -D gallium-vdpau=false
266 -D gallium-xvmc=false
267 -D gallium-omx=disabled
270 -D gallium-nine=false
271 -D gallium-opencl=icd
272 GALLIUM_DRIVERS: "r600"
275 build:meson-gallium-clover-llvm6:
276 extends: build:meson-gallium-clover-llvm5
280 build:meson-gallium-clover-llvm7:
281 extends: build:meson-gallium-clover-llvm5
283 GALLIUM_DRIVERS: "r600,radeonsi"
286 build:meson-gallium-st-other:
287 extends: .meson-build
296 -D gallium-vdpau=true
298 -D gallium-omx=bellagio
302 -D gallium-opencl=disabled
304 GALLIUM_DRIVERS: "nouveau,swrast"
310 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
316 --with-platforms=x11,wayland,drm
327 --disable-omx-bellagio
328 --disable-gallium-osmesa
329 VULKAN_DRIVERS: intel,radeon
330 LIBUNWIND_FLAGS: --disable-libunwind
332 build:make-loader-classic-dri:
335 MAKE_CHECK_COMMAND: "make check"
340 --with-platforms=x11,wayland,drm,surfaceless
342 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
351 --disable-omx-bellagio
352 --disable-gallium-osmesa
353 LIBUNWIND_FLAGS: --disable-libunwind
355 # NOTE: Building SWR is 2x (yes two) times slower than all the other
356 # gallium drivers combined.
357 # Start this early so that it doesn't hunder the run time.
358 build:make-gallium-drivers-swr:
361 MAKE_CHECK_COMMAND: "true"
375 --disable-omx-bellagio
376 --disable-gallium-osmesa
377 GALLIUM_DRIVERS: "swr"
378 LIBUNWIND_FLAGS: --enable-libunwind
380 build:make-gallium-drivers-radeonsi:
381 extends: build:make-gallium-drivers-swr
384 GALLIUM_DRIVERS: "radeonsi"
386 build:make-gallium-drivers-other:
387 extends: build:make-gallium-drivers-swr
390 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
392 build:make-gallium-st-clover-llvm-39:
395 MAKE_CHECK_COMMAND: "true"
411 --disable-omx-bellagio
412 --disable-gallium-osmesa
413 GALLIUM_DRIVERS: "r600"
414 LIBUNWIND_FLAGS: --enable-libunwind
416 build:make-gallium-st-clover-llvm-4:
417 extends: build:make-gallium-st-clover-llvm-39
421 build:make-gallium-st-clover-llvm-5:
422 extends: build:make-gallium-st-clover-llvm-39
426 build:make-gallium-st-clover-llvm-6:
427 extends: build:make-gallium-st-clover-llvm-39
431 build:make-gallium-st-clover-llvm-7:
432 extends: build:make-gallium-st-clover-llvm-39
435 GALLIUM_DRIVERS: "r600,radeonsi"
437 build:make-gallium-st-other:
440 MAKE_CHECK_COMMAND: "true"
441 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
455 --enable-omx-bellagio
456 --enable-gallium-osmesa
457 # We need swrast for osmesa and nine.
458 # i915 most likely doesn't work with most ST.
459 # Regardless - we're doing a quick build test here.
460 GALLIUM_DRIVERS: "i915,swrast"
461 LIBUNWIND_FLAGS: --enable-libunwind
464 extends: .scons-build
466 SCONS_TARGET: "llvm=0"
467 SCONS_CHECK_COMMAND: "scons llvm=0 check"
470 extends: .scons-build
472 SCONS_TARGET: "llvm=1"
473 SCONS_CHECK_COMMAND: "scons llvm=1 check"
477 extends: .scons-build
479 SCONS_TARGET: "swr=1"
480 SCONS_CHECK_COMMAND: "true"