blob: 0a097ce3830ddf3c031223cfc0aaa8412786fbc0 [file] [log] [blame]
Eric Engestrom329f5cd2019-01-20 11:21:45 +00001# 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.
3#
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.
10#
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.
15#
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 :)
18variables:
19 UBUNTU_TAG: 2019-01-31-01
Eric Engestrom3dc5faf2019-02-08 17:43:55 +000020 UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
Eric Engestrom329f5cd2019-01-20 11:21:45 +000021
22
23stages:
24 - containers-build
Eric Engestrom46d23c02019-01-20 11:26:53 +000025 - build+test
Eric Engestrom329f5cd2019-01-20 11:21:45 +000026
27
28# CONTAINERS
29
30containers:ubuntu:
31 stage: containers-build
32 image: docker:stable
33 services:
34 - docker:dind
35 variables:
36 DOCKER_HOST: tcp://docker:2375
37 DOCKER_DRIVER: overlay2
38 script:
39 # Enable experimental features such as `docker manifest inspect`
40 - mkdir -p ~/.docker
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
47 only:
48 changes:
49 - .gitlab-ci.yml
50 - .gitlab-ci/Dockerfile.ubuntu
Eric Engestrom46d23c02019-01-20 11:26:53 +000051
52
53# BUILD
54
55.build:
56 image: $UBUNTU_IMAGE
57 stage: build+test
58 artifacts:
59 when: on_failure
60 untracked: true
61
62.meson-build:
63 extends: .build
64 before_script:
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;
71 else
72 touch native.file;
73 fi
74 - meson --version
75 - meson _build
76 --native-file=native.file
77 -D build-tests=true
78 -D libunwind=${UNWIND}
79 ${DRI_LOADERS}
80 -D dri-drivers=${DRI_DRIVERS:-[]}
81 ${GALLIUM_ST}
82 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
83 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
84 - cd _build
85 - meson configure
86 script:
87 - ninja
88 - ninja test
89
Eric Engestrom89a74672019-01-21 09:42:37 +000090.make-build:
91 extends: .build
92 variables:
93 MAKEFLAGS: "-j4"
94 before_script:
95 - if test -n "$LLVM_VERSION"; then
96 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
97 fi
98 - mkdir build
99 - cd build
100 - ../autogen.sh
101 --enable-autotools
102 --enable-debug
103 $LIBUNWIND_FLAGS
104 $DRI_LOADERS
105 --with-dri-drivers=$DRI_DRIVERS
106 $GALLIUM_ST
107 --with-gallium-drivers=$GALLIUM_DRIVERS
108 --with-vulkan-drivers=$VULKAN_DRIVERS
109 --disable-llvm-shared-libs
110 script:
111 - make
112 - eval $MAKE_CHECK_COMMAND
113
Eric Engestrom06b245b2019-01-23 15:46:10 +0000114.scons-build:
115 extends: .build
116 variables:
117 SCONSFLAGS: "-j4"
118 script:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000119 - if test -n "$LLVM_VERSION"; then
120 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
121 fi
Eric Engestrom06b245b2019-01-23 15:46:10 +0000122 - scons $SCONS_TARGET
123 - eval $SCONS_CHECK_COMMAND
124
Eric Engestrom46d23c02019-01-20 11:26:53 +0000125build:meson-vulkan:
126 extends: .meson-build
127 variables:
128 UNWIND: "false"
129 DRI_LOADERS: >
130 -D glx=disabled
131 -D gbm=false
132 -D egl=false
133 -D platforms=x11,wayland,drm
134 -D osmesa=none
135 GALLIUM_ST: >
136 -D dri3=true
137 -D gallium-vdpau=false
138 -D gallium-xvmc=false
139 -D gallium-omx=disabled
140 -D gallium-va=false
141 -D gallium-xa=false
142 -D gallium-nine=false
143 -D gallium-opencl=disabled
144 VULKAN_DRIVERS: intel,amd
145 LLVM_VERSION: "7"
Eric Engestrom89a74672019-01-21 09:42:37 +0000146
Eric Engestromd73265e2019-01-28 17:38:17 +0000147build:meson-loader-classic-dri:
148 extends: .meson-build
149 variables:
150 UNWIND: "false"
151 DRI_LOADERS: >
152 -D glx=dri
153 -D gbm=true
154 -D egl=true
155 -D platforms=x11,wayland,drm,surfaceless
156 -D osmesa=classic
157 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
158 GALLIUM_ST: >
159 -D dri3=true
160 -D gallium-vdpau=false
161 -D gallium-xvmc=false
162 -D gallium-omx=disabled
163 -D gallium-va=false
164 -D gallium-xa=false
165 -D gallium-nine=false
166 -D gallium-opencl=disabled
167
Eric Engestromba26bc42019-01-29 08:57:17 +0000168build:meson-glvnd:
169 extends: .meson-build
170 variables:
171 UNWIND: "true"
172 DRI_LOADERS: >
173 -D glvnd=true
174 -D egl=true
175 -D gbm=true
176 -D glx=dri
177 DRI_DRIVERS: "i965"
178 GALLIUM_ST: >
179 -D gallium-vdpau=false
180 -D gallium-xvmc=false
181 -D gallium-omx=disabled
182 -D gallium-va=false
183 -D gallium-xa=false
184 -D gallium-nine=false
185 -D gallium-opencl=disabled
186
Eric Engestrom360c8142019-01-28 17:42:59 +0000187# 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.
190build:meson-gallium-swr:
191 extends: .meson-build
192 variables:
193 UNWIND: "true"
194 DRI_LOADERS: >
195 -D glx=disabled
196 -D egl=false
197 -D gbm=false
198 GALLIUM_ST: >
199 -D dri3=false
200 -D gallium-vdpau=false
201 -D gallium-xvmc=false
202 -D gallium-omx=disabled
203 -D gallium-va=false
204 -D gallium-xa=false
205 -D gallium-nine=false
206 -D gallium-opencl=disabled
207 GALLIUM_DRIVERS: "swr"
208 LLVM_VERSION: "6.0"
209
Eric Engestrom06e8f192019-01-28 17:45:26 +0000210build:meson-gallium-radeonsi:
211 extends: .meson-build
212 variables:
213 UNWIND: "true"
214 DRI_LOADERS: >
215 -D glx=disabled
216 -D egl=false
217 -D gbm=false
218 GALLIUM_ST: >
219 -D dri3=false
220 -D gallium-vdpau=false
221 -D gallium-xvmc=false
222 -D gallium-omx=disabled
223 -D gallium-va=false
224 -D gallium-xa=false
225 -D gallium-nine=false
226 -D gallium-opencl=disabled
227 GALLIUM_DRIVERS: "radeonsi"
228 LLVM_VERSION: "7"
229
Eric Engestromd407ead2019-01-28 17:47:09 +0000230build:meson-gallium-drivers-other:
231 extends: .meson-build
232 variables:
233 UNWIND: "true"
234 DRI_LOADERS: >
235 -D glx=disabled
236 -D egl=false
237 -D gbm=false
238 GALLIUM_ST: >
239 -D dri3=false
240 -D gallium-vdpau=false
241 -D gallium-xvmc=false
242 -D gallium-omx=disabled
243 -D gallium-va=false
244 -D gallium-xa=false
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"
248 LLVM_VERSION: "5.0"
249
Eric Engestromb5a70af2019-01-28 18:05:22 +0000250build:meson-gallium-clover-llvm5:
251 extends: .meson-build
252 variables:
253 UNWIND: "true"
254 DRI_LOADERS: >
255 -D glx=disabled
256 -D egl=false
257 -D gbm=false
258 GALLIUM_ST: >
259 -D dri3=false
260 -D gallium-vdpau=false
261 -D gallium-xvmc=false
262 -D gallium-omx=disabled
263 -D gallium-va=false
264 -D gallium-xa=false
265 -D gallium-nine=false
266 -D gallium-opencl=icd
267 GALLIUM_DRIVERS: "r600"
268 LLVM_VERSION: "5.0"
269
Eric Engestrom8744ac02019-01-28 18:07:31 +0000270build:meson-gallium-clover-llvm6:
271 extends: build:meson-gallium-clover-llvm5
272 variables:
273 LLVM_VERSION: "6.0"
274
Eric Engestrom8dab7072019-01-28 18:09:24 +0000275build:meson-gallium-clover-llvm7:
276 extends: build:meson-gallium-clover-llvm5
277 variables:
278 GALLIUM_DRIVERS: "r600,radeonsi"
279 LLVM_VERSION: "7"
280
Eric Engestromf33517b2019-01-28 18:13:55 +0000281build:meson-gallium-st-other:
282 extends: .meson-build
283 variables:
284 UNWIND: "true"
285 DRI_LOADERS: >
286 -D glx=disabled
287 -D egl=false
288 -D gbm=false
289 GALLIUM_ST: >
290 -D dri3=true
291 -D gallium-vdpau=true
292 -D gallium-xvmc=true
293 -D gallium-omx=bellagio
294 -D gallium-va=true
295 -D gallium-xa=true
296 -D gallium-nine=true
297 -D gallium-opencl=disabled
298 -D osmesa=gallium
299 GALLIUM_DRIVERS: "nouveau,swrast"
300 LLVM_VERSION: "5.0"
301
Eric Engestrom89a74672019-01-21 09:42:37 +0000302build:make-vulkan:
303 extends: .make-build
304 variables:
305 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
306 LLVM_VERSION: "7"
307 DRI_LOADERS: >
308 --disable-glx
309 --disable-gbm
310 --disable-egl
311 --with-platforms=x11,wayland,drm
312 DRI_DRIVERS: ""
313 GALLIUM_ST: >
314 --enable-dri
315 --enable-dri3
316 --disable-opencl
317 --disable-xa
318 --disable-nine
319 --disable-xvmc
320 --disable-vdpau
321 --disable-va
322 --disable-omx-bellagio
323 --disable-gallium-osmesa
324 VULKAN_DRIVERS: intel,radeon
325 LIBUNWIND_FLAGS: --disable-libunwind
Eric Engestrom06b245b2019-01-23 15:46:10 +0000326
Eric Engestrombbdc5632019-01-28 20:13:33 +0000327build:make-loader-classic-dri:
328 extends: .make-build
329 variables:
330 MAKE_CHECK_COMMAND: "make check"
331 DRI_LOADERS: >
332 --enable-glx
333 --enable-gbm
334 --enable-egl
335 --with-platforms=x11,wayland,drm,surfaceless
336 --enable-osmesa
337 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
338 GALLIUM_ST: >
339 --enable-dri
340 --disable-opencl
341 --disable-xa
342 --disable-nine
343 --disable-xvmc
344 --disable-vdpau
345 --disable-va
346 --disable-omx-bellagio
347 --disable-gallium-osmesa
348 LIBUNWIND_FLAGS: --disable-libunwind
349
Eric Engestrom7b26a192019-01-28 20:17:12 +0000350# 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.
353build:make-gallium-drivers-swr:
354 extends: .make-build
355 variables:
356 MAKE_CHECK_COMMAND: "true"
357 LLVM_VERSION: "6.0"
358 DRI_LOADERS: >
359 --disable-glx
360 --disable-gbm
361 --disable-egl
362 GALLIUM_ST: >
363 --enable-dri
364 --disable-opencl
365 --disable-xa
366 --disable-nine
367 --disable-xvmc
368 --disable-vdpau
369 --disable-va
370 --disable-omx-bellagio
371 --disable-gallium-osmesa
372 GALLIUM_DRIVERS: "swr"
373 LIBUNWIND_FLAGS: --enable-libunwind
374
Eric Engestrom055cfbc2019-01-28 20:21:44 +0000375build:make-gallium-drivers-radeonsi:
376 extends: build:make-gallium-drivers-swr
377 variables:
378 LLVM_VERSION: "7"
379 GALLIUM_DRIVERS: "radeonsi"
380
Eric Engestromd0dff242019-01-28 20:24:04 +0000381build:make-gallium-drivers-other:
382 extends: build:make-gallium-drivers-swr
383 variables:
384 LLVM_VERSION: "3.9"
385 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
386
Eric Engestrom984e2952019-01-28 20:29:59 +0000387build:make-gallium-st-clover-llvm-39:
388 extends: .make-build
389 variables:
390 MAKE_CHECK_COMMAND: "true"
391 LLVM_VERSION: "3.9"
392 DRI_LOADERS: >
393 --disable-glx
394 --disable-gbm
395 --disable-egl
396 GALLIUM_ST: >
397 --disable-dri
398 --enable-opencl
399 --enable-opencl-icd
400 --enable-llvm
401 --disable-xa
402 --disable-nine
403 --disable-xvmc
404 --disable-vdpau
405 --disable-va
406 --disable-omx-bellagio
407 --disable-gallium-osmesa
408 GALLIUM_DRIVERS: "r600"
409 LIBUNWIND_FLAGS: --enable-libunwind
410
Eric Engestromcc85f502019-01-28 20:36:25 +0000411build:make-gallium-st-clover-llvm-4:
412 extends: build:make-gallium-st-clover-llvm-39
413 variables:
414 LLVM_VERSION: "4.0"
415
Eric Engestrome80f88c2019-01-28 20:37:03 +0000416build:make-gallium-st-clover-llvm-5:
417 extends: build:make-gallium-st-clover-llvm-39
418 variables:
419 LLVM_VERSION: "5.0"
420
Eric Engestrom39315a72019-01-28 20:39:22 +0000421build:make-gallium-st-clover-llvm-6:
422 extends: build:make-gallium-st-clover-llvm-39
423 variables:
424 LLVM_VERSION: "6.0"
425
Eric Engestrom360a7bf2019-01-28 20:40:25 +0000426build:make-gallium-st-clover-llvm-7:
427 extends: build:make-gallium-st-clover-llvm-39
428 variables:
429 LLVM_VERSION: "7"
430 GALLIUM_DRIVERS: "r600,radeonsi"
431
Eric Engestrom73275142019-01-28 20:48:37 +0000432build:make-gallium-st-other:
433 extends: .make-build
434 variables:
435 MAKE_CHECK_COMMAND: "true"
436 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
437 LLVM_VERSION: "3.9"
438 DRI_LOADERS: >
439 --disable-glx
440 --disable-gbm
441 --disable-egl
442 GALLIUM_ST: >
443 --enable-dri
444 --disable-opencl
445 --enable-xa
446 --enable-nine
447 --enable-xvmc
448 --enable-vdpau
449 --enable-va
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
457
Eric Engestrom06b245b2019-01-23 15:46:10 +0000458build:scons-nollvm:
459 extends: .scons-build
460 variables:
461 SCONS_TARGET: "llvm=0"
462 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000463
464build:scons-llvm:
465 extends: .scons-build
466 variables:
467 SCONS_TARGET: "llvm=1"
468 SCONS_CHECK_COMMAND: "scons llvm=1 check"
469 LLVM_VERSION: "3.9"
Eric Engestrom6a19ec92019-01-28 16:33:22 +0000470
471build:scons-swr:
472 extends: .scons-build
473 variables:
474 SCONS_TARGET: "swr=1"
475 SCONS_CHECK_COMMAND: "true"
476 LLVM_VERSION: "6.0"