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
169 extends: .meson-build
179 -D gallium-vdpau=false
180 -D gallium-xvmc=false
181 -D gallium-omx=disabled
184 -D gallium-nine=false
185 -D gallium-opencl=disabled
187 # NOTE: Building SWR is 2x (yes two) times slower than all the other
188 # gallium drivers combined.
189 # Start this early so that it doesn't hunder the run time.
190 build:meson-gallium-swr:
191 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
207 GALLIUM_DRIVERS: "swr"
210 build:meson-gallium-radeonsi:
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: "radeonsi"
230 build:meson-gallium-drivers-other:
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: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
250 build:meson-gallium-clover-llvm5:
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=icd
267 GALLIUM_DRIVERS: "r600"
270 build:meson-gallium-clover-llvm6:
271 extends: build:meson-gallium-clover-llvm5
275 build:meson-gallium-clover-llvm7:
276 extends: build:meson-gallium-clover-llvm5
278 GALLIUM_DRIVERS: "r600,radeonsi"
281 build:meson-gallium-st-other:
282 extends: .meson-build
291 -D gallium-vdpau=true
293 -D gallium-omx=bellagio
297 -D gallium-opencl=disabled
299 GALLIUM_DRIVERS: "nouveau,swrast"
305 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
311 --with-platforms=x11,wayland,drm
322 --disable-omx-bellagio
323 --disable-gallium-osmesa
324 VULKAN_DRIVERS: intel,radeon
325 LIBUNWIND_FLAGS: --disable-libunwind
327 build:make-loader-classic-dri:
330 MAKE_CHECK_COMMAND: "make check"
335 --with-platforms=x11,wayland,drm,surfaceless
337 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
346 --disable-omx-bellagio
347 --disable-gallium-osmesa
348 LIBUNWIND_FLAGS: --disable-libunwind
350 # NOTE: Building SWR is 2x (yes two) times slower than all the other
351 # gallium drivers combined.
352 # Start this early so that it doesn't hunder the run time.
353 build:make-gallium-drivers-swr:
356 MAKE_CHECK_COMMAND: "true"
370 --disable-omx-bellagio
371 --disable-gallium-osmesa
372 GALLIUM_DRIVERS: "swr"
373 LIBUNWIND_FLAGS: --enable-libunwind
375 build:make-gallium-drivers-radeonsi:
376 extends: build:make-gallium-drivers-swr
379 GALLIUM_DRIVERS: "radeonsi"
381 build:make-gallium-drivers-other:
382 extends: build:make-gallium-drivers-swr
385 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
387 build:make-gallium-st-clover-llvm-39:
390 MAKE_CHECK_COMMAND: "true"
406 --disable-omx-bellagio
407 --disable-gallium-osmesa
408 GALLIUM_DRIVERS: "r600"
409 LIBUNWIND_FLAGS: --enable-libunwind
411 build:make-gallium-st-clover-llvm-4:
412 extends: build:make-gallium-st-clover-llvm-39
416 build:make-gallium-st-clover-llvm-5:
417 extends: build:make-gallium-st-clover-llvm-39
421 build:make-gallium-st-clover-llvm-6:
422 extends: build:make-gallium-st-clover-llvm-39
426 build:make-gallium-st-clover-llvm-7:
427 extends: build:make-gallium-st-clover-llvm-39
430 GALLIUM_DRIVERS: "r600,radeonsi"
432 build:make-gallium-st-other:
435 MAKE_CHECK_COMMAND: "true"
436 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
450 --enable-omx-bellagio
451 --enable-gallium-osmesa
452 # We need swrast for osmesa and nine.
453 # i915 most likely doesn't work with most ST.
454 # Regardless - we're doing a quick build test here.
455 GALLIUM_DRIVERS: "i915,swrast"
456 LIBUNWIND_FLAGS: --enable-libunwind
459 extends: .scons-build
461 SCONS_TARGET: "llvm=0"
462 SCONS_CHECK_COMMAND: "scons llvm=0 check"
465 extends: .scons-build
467 SCONS_TARGET: "llvm=1"
468 SCONS_CHECK_COMMAND: "scons llvm=1 check"
472 extends: .scons-build
474 SCONS_TARGET: "swr=1"
475 SCONS_CHECK_COMMAND: "true"