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/$CI_PROJECT_PATH/ubuntu:$UBUNTU_TAG"
31 stage: containers-build
36 DOCKER_HOST: tcp://docker:2375
37 DOCKER_DRIVER: overlay2
39 # Enable experimental features such as `docker manifest inspect`
41 - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
42 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
43 # Check if the image (with the specific tag) already exists
44 - docker manifest inspect $UBUNTU_IMAGE && exit || true
45 - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
46 - docker push $UBUNTU_IMAGE
50 - .gitlab-ci/Dockerfile.ubuntu
65 # We need to control the version of llvm-config we're using, so we'll
66 # generate a native file to do so. This requires meson >=0.49
67 - if test -n "$LLVM_VERSION"; then
68 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
69 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
70 $LLVM_CONFIG --version;
76 --native-file=native.file
78 -D libunwind=${UNWIND}
80 -D dri-drivers=${DRI_DRIVERS:-[]}
82 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
83 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
95 - if test -n "$LLVM_VERSION"; then
96 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
105 --with-dri-drivers=$DRI_DRIVERS
107 --with-gallium-drivers=$GALLIUM_DRIVERS
108 --with-vulkan-drivers=$VULKAN_DRIVERS
109 --disable-llvm-shared-libs
112 - eval $MAKE_CHECK_COMMAND
119 - if test -n "$LLVM_VERSION"; then
120 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
122 - scons $SCONS_TARGET
123 - eval $SCONS_CHECK_COMMAND
126 extends: .meson-build
133 -D platforms=x11,wayland,drm
137 -D gallium-vdpau=false
138 -D gallium-xvmc=false
139 -D gallium-omx=disabled
142 -D gallium-nine=false
143 -D gallium-opencl=disabled
144 VULKAN_DRIVERS: intel,amd
147 build:meson-loader-classic-dri:
148 extends: .meson-build
155 -D platforms=x11,wayland,drm,surfaceless
157 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
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
168 # NOTE: Building SWR is 2x (yes two) times slower than all the other
169 # gallium drivers combined.
170 # Start this early so that it doesn't hunder the run time.
171 build:meson-gallium-swr:
172 extends: .meson-build
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
188 GALLIUM_DRIVERS: "swr"
191 build:meson-gallium-radeonsi:
192 extends: .meson-build
201 -D gallium-vdpau=false
202 -D gallium-xvmc=false
203 -D gallium-omx=disabled
206 -D gallium-nine=false
207 -D gallium-opencl=disabled
208 GALLIUM_DRIVERS: "radeonsi"
211 build:meson-gallium-drivers-other:
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: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
231 build:meson-gallium-clover-llvm5:
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=icd
248 GALLIUM_DRIVERS: "r600"
251 build:meson-gallium-clover-llvm6:
252 extends: build:meson-gallium-clover-llvm5
256 build:meson-gallium-clover-llvm7:
257 extends: build:meson-gallium-clover-llvm5
259 GALLIUM_DRIVERS: "r600,radeonsi"
262 build:meson-gallium-st-other:
263 extends: .meson-build
272 -D gallium-vdpau=true
274 -D gallium-omx=bellagio
278 -D gallium-opencl=disabled
280 GALLIUM_DRIVERS: "nouveau,swrast"
286 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
292 --with-platforms=x11,wayland,drm
303 --disable-omx-bellagio
304 --disable-gallium-osmesa
305 VULKAN_DRIVERS: intel,radeon
306 LIBUNWIND_FLAGS: --disable-libunwind
308 build:make-loader-classic-dri:
311 MAKE_CHECK_COMMAND: "make check"
316 --with-platforms=x11,wayland,drm,surfaceless
318 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
327 --disable-omx-bellagio
328 --disable-gallium-osmesa
329 LIBUNWIND_FLAGS: --disable-libunwind
331 # NOTE: Building SWR is 2x (yes two) times slower than all the other
332 # gallium drivers combined.
333 # Start this early so that it doesn't hunder the run time.
334 build:make-gallium-drivers-swr:
337 MAKE_CHECK_COMMAND: "true"
351 --disable-omx-bellagio
352 --disable-gallium-osmesa
353 GALLIUM_DRIVERS: "swr"
354 LIBUNWIND_FLAGS: --enable-libunwind
356 build:make-gallium-drivers-radeonsi:
357 extends: build:make-gallium-drivers-swr
360 GALLIUM_DRIVERS: "radeonsi"
362 build:make-gallium-drivers-other:
363 extends: build:make-gallium-drivers-swr
366 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
368 build:make-gallium-st-clover-llvm-39:
371 MAKE_CHECK_COMMAND: "true"
387 --disable-omx-bellagio
388 --disable-gallium-osmesa
389 GALLIUM_DRIVERS: "r600"
390 LIBUNWIND_FLAGS: --enable-libunwind
392 build:make-gallium-st-clover-llvm-4:
393 extends: build:make-gallium-st-clover-llvm-39
397 build:make-gallium-st-clover-llvm-5:
398 extends: build:make-gallium-st-clover-llvm-39
403 extends: .scons-build
405 SCONS_TARGET: "llvm=0"
406 SCONS_CHECK_COMMAND: "scons llvm=0 check"
409 extends: .scons-build
411 SCONS_TARGET: "llvm=1"
412 SCONS_CHECK_COMMAND: "scons llvm=1 check"
416 extends: .scons-build
418 SCONS_TARGET: "swr=1"
419 SCONS_CHECK_COMMAND: "true"