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"
28 # When to automatically run the CI
37 - runner_system_failure
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
78 # Use ccache transparently, and print stats before/after
80 - export PATH="/usr/lib/ccache:$PATH"
81 - export CCACHE_BASEDIR="$PWD"
82 - export CCACHE_DIR="$PWD/ccache"
83 - export CCACHE_COMPILERCHECK=content
84 - ccache --zero-stats || true
85 - ccache --show-stats || true
87 - export CCACHE_DIR="$PWD/ccache"
93 # We need to control the version of llvm-config we're using, so we'll
94 # generate a native file to do so. This requires meson >=0.49
95 - if test -n "$LLVM_VERSION"; then
96 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
97 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
98 $LLVM_CONFIG --version;
104 --native-file=native.file
106 -D libunwind=${UNWIND}
108 -D dri-drivers=${DRI_DRIVERS:-[]}
110 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
111 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
112 -D I-love-half-baked-turnips=true
123 - if test -n "$LLVM_VERSION"; then
124 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
126 - scons $SCONS_TARGET
127 - eval $SCONS_CHECK_COMMAND
133 LLVM_CONFIG: llvm-config-7
140 --disable-llvm-shared-libs
144 # NOTE: Building SWR is 2x (yes two) times slower than all the other
145 # gallium drivers combined.
146 # Start this early so that it doesn't limit the total run time.
148 extends: .meson-build
157 -D gallium-vdpau=false
158 -D gallium-xvmc=false
159 -D gallium-omx=disabled
162 -D gallium-nine=false
163 -D gallium-opencl=disabled
164 GALLIUM_DRIVERS: "swr"
168 extends: .meson-build
172 GALLIUM_DRIVERS: "auto"
174 CXX: "ccache clang++-7"
177 extends: .meson-build
184 -D platforms=x11,wayland,drm
188 -D gallium-vdpau=false
189 -D gallium-xvmc=false
190 -D gallium-omx=disabled
193 -D gallium-nine=false
194 -D gallium-opencl=disabled
195 VULKAN_DRIVERS: intel,amd,freedreno
198 meson-loader-classic-dri:
199 extends: .meson-build
206 -D platforms=x11,wayland,drm,surfaceless
208 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
211 -D gallium-vdpau=false
212 -D gallium-xvmc=false
213 -D gallium-omx=disabled
216 -D gallium-nine=false
217 -D gallium-opencl=disabled
220 extends: .meson-build
230 -D gallium-vdpau=false
231 -D gallium-xvmc=false
232 -D gallium-omx=disabled
235 -D gallium-nine=false
236 -D gallium-opencl=disabled
238 meson-gallium-radeonsi:
239 extends: .meson-build
248 -D gallium-vdpau=false
249 -D gallium-xvmc=false
250 -D gallium-omx=disabled
253 -D gallium-nine=false
254 -D gallium-opencl=disabled
255 GALLIUM_DRIVERS: "radeonsi"
258 meson-gallium-drivers-other:
259 extends: .meson-build
268 -D gallium-vdpau=false
269 -D gallium-xvmc=false
270 -D gallium-omx=disabled
273 -D gallium-nine=false
274 -D gallium-opencl=disabled
275 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost"
278 meson-gallium-clover-llvm:
279 extends: .meson-build
288 -D gallium-vdpau=false
289 -D gallium-xvmc=false
290 -D gallium-omx=disabled
293 -D gallium-nine=false
294 -D gallium-opencl=icd
295 GALLIUM_DRIVERS: "r600,radeonsi"
297 meson-gallium-clover-llvm39:
298 extends: meson-gallium-clover-llvm
300 GALLIUM_DRIVERS: "r600"
303 meson-gallium-st-other:
304 extends: .meson-build
313 -D gallium-vdpau=true
315 -D gallium-omx=bellagio
319 -D gallium-opencl=disabled
321 GALLIUM_DRIVERS: "nouveau,swrast"
325 extends: .scons-build
327 SCONS_TARGET: "llvm=0"
328 SCONS_CHECK_COMMAND: "scons llvm=0 check"
331 extends: .scons-build
333 SCONS_TARGET: "llvm=1"
334 SCONS_CHECK_COMMAND: "scons llvm=1 check"
338 extends: .scons-build
340 SCONS_TARGET: "swr=1"
341 SCONS_CHECK_COMMAND: "true"