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}";
123 - scons $SCONS_TARGET
124 - eval $SCONS_CHECK_COMMAND
130 LLVM_CONFIG: llvm-config-7
137 --disable-llvm-shared-libs
141 # NOTE: Building SWR is 2x (yes two) times slower than all the other
142 # gallium drivers combined.
143 # Start this early so that it doesn't limit the total run time.
145 extends: .meson-build
154 -D gallium-vdpau=false
155 -D gallium-xvmc=false
156 -D gallium-omx=disabled
159 -D gallium-nine=false
160 -D gallium-opencl=disabled
161 GALLIUM_DRIVERS: "swr"
165 extends: .meson-build
169 GALLIUM_DRIVERS: "auto"
174 extends: .meson-build
181 -D platforms=x11,wayland,drm
185 -D gallium-vdpau=false
186 -D gallium-xvmc=false
187 -D gallium-omx=disabled
190 -D gallium-nine=false
191 -D gallium-opencl=disabled
192 VULKAN_DRIVERS: intel,amd,freedreno
195 meson-loader-classic-dri:
196 extends: .meson-build
203 -D platforms=x11,wayland,drm,surfaceless
205 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
208 -D gallium-vdpau=false
209 -D gallium-xvmc=false
210 -D gallium-omx=disabled
213 -D gallium-nine=false
214 -D gallium-opencl=disabled
217 extends: .meson-build
227 -D gallium-vdpau=false
228 -D gallium-xvmc=false
229 -D gallium-omx=disabled
232 -D gallium-nine=false
233 -D gallium-opencl=disabled
235 meson-gallium-radeonsi:
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: "radeonsi"
255 meson-gallium-drivers-other:
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=disabled
272 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost"
275 meson-gallium-clover-llvm:
276 extends: .meson-build
285 -D gallium-vdpau=false
286 -D gallium-xvmc=false
287 -D gallium-omx=disabled
290 -D gallium-nine=false
291 -D gallium-opencl=icd
292 GALLIUM_DRIVERS: "r600,radeonsi"
294 meson-gallium-clover-llvm39:
295 extends: meson-gallium-clover-llvm
297 GALLIUM_DRIVERS: "r600"
300 meson-gallium-st-other:
301 extends: .meson-build
310 -D gallium-vdpau=true
312 -D gallium-omx=bellagio
316 -D gallium-opencl=disabled
318 GALLIUM_DRIVERS: "nouveau,swrast"
322 extends: .scons-build
324 SCONS_TARGET: "llvm=0"
325 SCONS_CHECK_COMMAND: "scons llvm=0 check"
328 extends: .scons-build
330 SCONS_TARGET: "llvm=1"
331 SCONS_CHECK_COMMAND: "scons llvm=1 check"
335 extends: .scons-build
337 SCONS_TARGET: "swr=1"
338 SCONS_CHECK_COMMAND: "true"