gitlab-ci: add make Gallium ST Other build
[mesa.git] / .gitlab-ci.yml
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.
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 :)
18 variables:
19 UBUNTU_TAG: 2019-01-31-01
20 UBUNTU_IMAGE: "$CI_REGISTRY/$CI_PROJECT_PATH/ubuntu:$UBUNTU_TAG"
21
22
23 stages:
24 - containers-build
25 - build+test
26
27
28 # CONTAINERS
29
30 containers: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
51
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
90 .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
114 .scons-build:
115 extends: .build
116 variables:
117 SCONSFLAGS: "-j4"
118 script:
119 - if test -n "$LLVM_VERSION"; then
120 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
121 fi
122 - scons $SCONS_TARGET
123 - eval $SCONS_CHECK_COMMAND
124
125 build: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"
146
147 build: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
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
173 variables:
174 UNWIND: "true"
175 DRI_LOADERS: >
176 -D glx=disabled
177 -D egl=false
178 -D gbm=false
179 GALLIUM_ST: >
180 -D dri3=false
181 -D gallium-vdpau=false
182 -D gallium-xvmc=false
183 -D gallium-omx=disabled
184 -D gallium-va=false
185 -D gallium-xa=false
186 -D gallium-nine=false
187 -D gallium-opencl=disabled
188 GALLIUM_DRIVERS: "swr"
189 LLVM_VERSION: "6.0"
190
191 build:meson-gallium-radeonsi:
192 extends: .meson-build
193 variables:
194 UNWIND: "true"
195 DRI_LOADERS: >
196 -D glx=disabled
197 -D egl=false
198 -D gbm=false
199 GALLIUM_ST: >
200 -D dri3=false
201 -D gallium-vdpau=false
202 -D gallium-xvmc=false
203 -D gallium-omx=disabled
204 -D gallium-va=false
205 -D gallium-xa=false
206 -D gallium-nine=false
207 -D gallium-opencl=disabled
208 GALLIUM_DRIVERS: "radeonsi"
209 LLVM_VERSION: "7"
210
211 build:meson-gallium-drivers-other:
212 extends: .meson-build
213 variables:
214 UNWIND: "true"
215 DRI_LOADERS: >
216 -D glx=disabled
217 -D egl=false
218 -D gbm=false
219 GALLIUM_ST: >
220 -D dri3=false
221 -D gallium-vdpau=false
222 -D gallium-xvmc=false
223 -D gallium-omx=disabled
224 -D gallium-va=false
225 -D gallium-xa=false
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"
229 LLVM_VERSION: "5.0"
230
231 build:meson-gallium-clover-llvm5:
232 extends: .meson-build
233 variables:
234 UNWIND: "true"
235 DRI_LOADERS: >
236 -D glx=disabled
237 -D egl=false
238 -D gbm=false
239 GALLIUM_ST: >
240 -D dri3=false
241 -D gallium-vdpau=false
242 -D gallium-xvmc=false
243 -D gallium-omx=disabled
244 -D gallium-va=false
245 -D gallium-xa=false
246 -D gallium-nine=false
247 -D gallium-opencl=icd
248 GALLIUM_DRIVERS: "r600"
249 LLVM_VERSION: "5.0"
250
251 build:meson-gallium-clover-llvm6:
252 extends: build:meson-gallium-clover-llvm5
253 variables:
254 LLVM_VERSION: "6.0"
255
256 build:meson-gallium-clover-llvm7:
257 extends: build:meson-gallium-clover-llvm5
258 variables:
259 GALLIUM_DRIVERS: "r600,radeonsi"
260 LLVM_VERSION: "7"
261
262 build:meson-gallium-st-other:
263 extends: .meson-build
264 variables:
265 UNWIND: "true"
266 DRI_LOADERS: >
267 -D glx=disabled
268 -D egl=false
269 -D gbm=false
270 GALLIUM_ST: >
271 -D dri3=true
272 -D gallium-vdpau=true
273 -D gallium-xvmc=true
274 -D gallium-omx=bellagio
275 -D gallium-va=true
276 -D gallium-xa=true
277 -D gallium-nine=true
278 -D gallium-opencl=disabled
279 -D osmesa=gallium
280 GALLIUM_DRIVERS: "nouveau,swrast"
281 LLVM_VERSION: "5.0"
282
283 build:make-vulkan:
284 extends: .make-build
285 variables:
286 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
287 LLVM_VERSION: "7"
288 DRI_LOADERS: >
289 --disable-glx
290 --disable-gbm
291 --disable-egl
292 --with-platforms=x11,wayland,drm
293 DRI_DRIVERS: ""
294 GALLIUM_ST: >
295 --enable-dri
296 --enable-dri3
297 --disable-opencl
298 --disable-xa
299 --disable-nine
300 --disable-xvmc
301 --disable-vdpau
302 --disable-va
303 --disable-omx-bellagio
304 --disable-gallium-osmesa
305 VULKAN_DRIVERS: intel,radeon
306 LIBUNWIND_FLAGS: --disable-libunwind
307
308 build:make-loader-classic-dri:
309 extends: .make-build
310 variables:
311 MAKE_CHECK_COMMAND: "make check"
312 DRI_LOADERS: >
313 --enable-glx
314 --enable-gbm
315 --enable-egl
316 --with-platforms=x11,wayland,drm,surfaceless
317 --enable-osmesa
318 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
319 GALLIUM_ST: >
320 --enable-dri
321 --disable-opencl
322 --disable-xa
323 --disable-nine
324 --disable-xvmc
325 --disable-vdpau
326 --disable-va
327 --disable-omx-bellagio
328 --disable-gallium-osmesa
329 LIBUNWIND_FLAGS: --disable-libunwind
330
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:
335 extends: .make-build
336 variables:
337 MAKE_CHECK_COMMAND: "true"
338 LLVM_VERSION: "6.0"
339 DRI_LOADERS: >
340 --disable-glx
341 --disable-gbm
342 --disable-egl
343 GALLIUM_ST: >
344 --enable-dri
345 --disable-opencl
346 --disable-xa
347 --disable-nine
348 --disable-xvmc
349 --disable-vdpau
350 --disable-va
351 --disable-omx-bellagio
352 --disable-gallium-osmesa
353 GALLIUM_DRIVERS: "swr"
354 LIBUNWIND_FLAGS: --enable-libunwind
355
356 build:make-gallium-drivers-radeonsi:
357 extends: build:make-gallium-drivers-swr
358 variables:
359 LLVM_VERSION: "7"
360 GALLIUM_DRIVERS: "radeonsi"
361
362 build:make-gallium-drivers-other:
363 extends: build:make-gallium-drivers-swr
364 variables:
365 LLVM_VERSION: "3.9"
366 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
367
368 build:make-gallium-st-clover-llvm-39:
369 extends: .make-build
370 variables:
371 MAKE_CHECK_COMMAND: "true"
372 LLVM_VERSION: "3.9"
373 DRI_LOADERS: >
374 --disable-glx
375 --disable-gbm
376 --disable-egl
377 GALLIUM_ST: >
378 --disable-dri
379 --enable-opencl
380 --enable-opencl-icd
381 --enable-llvm
382 --disable-xa
383 --disable-nine
384 --disable-xvmc
385 --disable-vdpau
386 --disable-va
387 --disable-omx-bellagio
388 --disable-gallium-osmesa
389 GALLIUM_DRIVERS: "r600"
390 LIBUNWIND_FLAGS: --enable-libunwind
391
392 build:make-gallium-st-clover-llvm-4:
393 extends: build:make-gallium-st-clover-llvm-39
394 variables:
395 LLVM_VERSION: "4.0"
396
397 build:make-gallium-st-clover-llvm-5:
398 extends: build:make-gallium-st-clover-llvm-39
399 variables:
400 LLVM_VERSION: "5.0"
401
402 build:make-gallium-st-clover-llvm-6:
403 extends: build:make-gallium-st-clover-llvm-39
404 variables:
405 LLVM_VERSION: "6.0"
406
407 build:make-gallium-st-clover-llvm-7:
408 extends: build:make-gallium-st-clover-llvm-39
409 variables:
410 LLVM_VERSION: "7"
411 GALLIUM_DRIVERS: "r600,radeonsi"
412
413 build:make-gallium-st-other:
414 extends: .make-build
415 variables:
416 MAKE_CHECK_COMMAND: "true"
417 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
418 LLVM_VERSION: "3.9"
419 DRI_LOADERS: >
420 --disable-glx
421 --disable-gbm
422 --disable-egl
423 GALLIUM_ST: >
424 --enable-dri
425 --disable-opencl
426 --enable-xa
427 --enable-nine
428 --enable-xvmc
429 --enable-vdpau
430 --enable-va
431 --enable-omx-bellagio
432 --enable-gallium-osmesa
433 # We need swrast for osmesa and nine.
434 # i915 most likely doesn't work with most ST.
435 # Regardless - we're doing a quick build test here.
436 GALLIUM_DRIVERS: "i915,swrast"
437 LIBUNWIND_FLAGS: --enable-libunwind
438
439 build:scons-nollvm:
440 extends: .scons-build
441 variables:
442 SCONS_TARGET: "llvm=0"
443 SCONS_CHECK_COMMAND: "scons llvm=0 check"
444
445 build:scons-llvm:
446 extends: .scons-build
447 variables:
448 SCONS_TARGET: "llvm=1"
449 SCONS_CHECK_COMMAND: "scons llvm=1 check"
450 LLVM_VERSION: "3.9"
451
452 build:scons-swr:
453 extends: .scons-build
454 variables:
455 SCONS_TARGET: "swr=1"
456 SCONS_CHECK_COMMAND: "true"
457 LLVM_VERSION: "6.0"