v3d: Emit a simpler negate for the iabs implementation.
[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_IMAGE/ubuntu:$UBUNTU_TAG"
21 UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
22
23
24 stages:
25 - containers-build
26 - build+test
27
28
29 # CONTAINERS
30
31 containers:ubuntu:
32 stage: containers-build
33 image: docker:stable
34 services:
35 - docker:dind
36 variables:
37 DOCKER_HOST: tcp://docker:2375
38 DOCKER_DRIVER: overlay2
39 script:
40 # Enable experimental features such as `docker manifest inspect`
41 - mkdir -p ~/.docker
42 - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
43 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
44 # Check if the image (with the specific tag) already exists
45 - docker manifest inspect $UBUNTU_IMAGE && exit || true
46 # Try to re-use the image from the main repository's registry
47 - docker image pull $UBUNTU_IMAGE_MAIN &&
48 docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE &&
49 docker image push $UBUNTU_IMAGE && exit || true
50 - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
51 - docker push $UBUNTU_IMAGE
52 only:
53 changes:
54 - .gitlab-ci.yml
55 - .gitlab-ci/Dockerfile.ubuntu
56
57
58 # BUILD
59
60 .build:
61 image: $UBUNTU_IMAGE
62 stage: build+test
63 artifacts:
64 when: on_failure
65 untracked: true
66
67 .meson-build:
68 extends: .build
69 before_script:
70 # We need to control the version of llvm-config we're using, so we'll
71 # generate a native file to do so. This requires meson >=0.49
72 - if test -n "$LLVM_VERSION"; then
73 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
74 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
75 $LLVM_CONFIG --version;
76 else
77 touch native.file;
78 fi
79 - meson --version
80 - meson _build
81 --native-file=native.file
82 -D build-tests=true
83 -D libunwind=${UNWIND}
84 ${DRI_LOADERS}
85 -D dri-drivers=${DRI_DRIVERS:-[]}
86 ${GALLIUM_ST}
87 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
88 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
89 - cd _build
90 - meson configure
91 script:
92 - ninja -j4
93 - ninja test
94
95 .make-build:
96 extends: .build
97 variables:
98 MAKEFLAGS: "-j4"
99 before_script:
100 - if test -n "$LLVM_VERSION"; then
101 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
102 fi
103 - mkdir build
104 - cd build
105 - ../autogen.sh
106 --enable-autotools
107 --enable-debug
108 $LIBUNWIND_FLAGS
109 $DRI_LOADERS
110 --with-dri-drivers=$DRI_DRIVERS
111 $GALLIUM_ST
112 --with-gallium-drivers=$GALLIUM_DRIVERS
113 --with-vulkan-drivers=$VULKAN_DRIVERS
114 --disable-llvm-shared-libs
115 script:
116 - make
117 - eval $MAKE_CHECK_COMMAND
118
119 .scons-build:
120 extends: .build
121 variables:
122 SCONSFLAGS: "-j4"
123 script:
124 - if test -n "$LLVM_VERSION"; then
125 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
126 fi
127 - scons $SCONS_TARGET
128 - eval $SCONS_CHECK_COMMAND
129
130 build:meson-vulkan:
131 extends: .meson-build
132 variables:
133 UNWIND: "false"
134 DRI_LOADERS: >
135 -D glx=disabled
136 -D gbm=false
137 -D egl=false
138 -D platforms=x11,wayland,drm
139 -D osmesa=none
140 GALLIUM_ST: >
141 -D dri3=true
142 -D gallium-vdpau=false
143 -D gallium-xvmc=false
144 -D gallium-omx=disabled
145 -D gallium-va=false
146 -D gallium-xa=false
147 -D gallium-nine=false
148 -D gallium-opencl=disabled
149 VULKAN_DRIVERS: intel,amd
150 LLVM_VERSION: "7"
151
152 build:meson-loader-classic-dri:
153 extends: .meson-build
154 variables:
155 UNWIND: "false"
156 DRI_LOADERS: >
157 -D glx=dri
158 -D gbm=true
159 -D egl=true
160 -D platforms=x11,wayland,drm,surfaceless
161 -D osmesa=classic
162 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
163 GALLIUM_ST: >
164 -D dri3=true
165 -D gallium-vdpau=false
166 -D gallium-xvmc=false
167 -D gallium-omx=disabled
168 -D gallium-va=false
169 -D gallium-xa=false
170 -D gallium-nine=false
171 -D gallium-opencl=disabled
172
173 build:meson-glvnd:
174 extends: .meson-build
175 variables:
176 UNWIND: "true"
177 DRI_LOADERS: >
178 -D glvnd=true
179 -D egl=true
180 -D gbm=true
181 -D glx=dri
182 DRI_DRIVERS: "i965"
183 GALLIUM_ST: >
184 -D gallium-vdpau=false
185 -D gallium-xvmc=false
186 -D gallium-omx=disabled
187 -D gallium-va=false
188 -D gallium-xa=false
189 -D gallium-nine=false
190 -D gallium-opencl=disabled
191
192 # NOTE: Building SWR is 2x (yes two) times slower than all the other
193 # gallium drivers combined.
194 # Start this early so that it doesn't hunder the run time.
195 build:meson-gallium-swr:
196 extends: .meson-build
197 variables:
198 UNWIND: "true"
199 DRI_LOADERS: >
200 -D glx=disabled
201 -D egl=false
202 -D gbm=false
203 GALLIUM_ST: >
204 -D dri3=false
205 -D gallium-vdpau=false
206 -D gallium-xvmc=false
207 -D gallium-omx=disabled
208 -D gallium-va=false
209 -D gallium-xa=false
210 -D gallium-nine=false
211 -D gallium-opencl=disabled
212 GALLIUM_DRIVERS: "swr"
213 LLVM_VERSION: "6.0"
214
215 build:meson-gallium-radeonsi:
216 extends: .meson-build
217 variables:
218 UNWIND: "true"
219 DRI_LOADERS: >
220 -D glx=disabled
221 -D egl=false
222 -D gbm=false
223 GALLIUM_ST: >
224 -D dri3=false
225 -D gallium-vdpau=false
226 -D gallium-xvmc=false
227 -D gallium-omx=disabled
228 -D gallium-va=false
229 -D gallium-xa=false
230 -D gallium-nine=false
231 -D gallium-opencl=disabled
232 GALLIUM_DRIVERS: "radeonsi"
233 LLVM_VERSION: "7"
234
235 build:meson-gallium-drivers-other:
236 extends: .meson-build
237 variables:
238 UNWIND: "true"
239 DRI_LOADERS: >
240 -D glx=disabled
241 -D egl=false
242 -D gbm=false
243 GALLIUM_ST: >
244 -D dri3=false
245 -D gallium-vdpau=false
246 -D gallium-xvmc=false
247 -D gallium-omx=disabled
248 -D gallium-va=false
249 -D gallium-xa=false
250 -D gallium-nine=false
251 -D gallium-opencl=disabled
252 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
253 LLVM_VERSION: "5.0"
254
255 build:meson-gallium-clover-llvm5:
256 extends: .meson-build
257 variables:
258 UNWIND: "true"
259 DRI_LOADERS: >
260 -D glx=disabled
261 -D egl=false
262 -D gbm=false
263 GALLIUM_ST: >
264 -D dri3=false
265 -D gallium-vdpau=false
266 -D gallium-xvmc=false
267 -D gallium-omx=disabled
268 -D gallium-va=false
269 -D gallium-xa=false
270 -D gallium-nine=false
271 -D gallium-opencl=icd
272 GALLIUM_DRIVERS: "r600"
273 LLVM_VERSION: "5.0"
274
275 build:meson-gallium-clover-llvm6:
276 extends: build:meson-gallium-clover-llvm5
277 variables:
278 LLVM_VERSION: "6.0"
279
280 build:meson-gallium-clover-llvm7:
281 extends: build:meson-gallium-clover-llvm5
282 variables:
283 GALLIUM_DRIVERS: "r600,radeonsi"
284 LLVM_VERSION: "7"
285
286 build:meson-gallium-st-other:
287 extends: .meson-build
288 variables:
289 UNWIND: "true"
290 DRI_LOADERS: >
291 -D glx=disabled
292 -D egl=false
293 -D gbm=false
294 GALLIUM_ST: >
295 -D dri3=true
296 -D gallium-vdpau=true
297 -D gallium-xvmc=true
298 -D gallium-omx=bellagio
299 -D gallium-va=true
300 -D gallium-xa=true
301 -D gallium-nine=true
302 -D gallium-opencl=disabled
303 -D osmesa=gallium
304 GALLIUM_DRIVERS: "nouveau,swrast"
305 LLVM_VERSION: "5.0"
306
307 build:make-vulkan:
308 extends: .make-build
309 variables:
310 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
311 LLVM_VERSION: "7"
312 DRI_LOADERS: >
313 --disable-glx
314 --disable-gbm
315 --disable-egl
316 --with-platforms=x11,wayland,drm
317 DRI_DRIVERS: ""
318 GALLIUM_ST: >
319 --enable-dri
320 --enable-dri3
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 VULKAN_DRIVERS: intel,radeon
330 LIBUNWIND_FLAGS: --disable-libunwind
331
332 build:make-loader-classic-dri:
333 extends: .make-build
334 variables:
335 MAKE_CHECK_COMMAND: "make check"
336 DRI_LOADERS: >
337 --enable-glx
338 --enable-gbm
339 --enable-egl
340 --with-platforms=x11,wayland,drm,surfaceless
341 --enable-osmesa
342 DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
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 LIBUNWIND_FLAGS: --disable-libunwind
354
355 # NOTE: Building SWR is 2x (yes two) times slower than all the other
356 # gallium drivers combined.
357 # Start this early so that it doesn't hunder the run time.
358 build:make-gallium-drivers-swr:
359 extends: .make-build
360 variables:
361 MAKE_CHECK_COMMAND: "true"
362 LLVM_VERSION: "6.0"
363 DRI_LOADERS: >
364 --disable-glx
365 --disable-gbm
366 --disable-egl
367 GALLIUM_ST: >
368 --enable-dri
369 --disable-opencl
370 --disable-xa
371 --disable-nine
372 --disable-xvmc
373 --disable-vdpau
374 --disable-va
375 --disable-omx-bellagio
376 --disable-gallium-osmesa
377 GALLIUM_DRIVERS: "swr"
378 LIBUNWIND_FLAGS: --enable-libunwind
379
380 build:make-gallium-drivers-radeonsi:
381 extends: build:make-gallium-drivers-swr
382 variables:
383 LLVM_VERSION: "7"
384 GALLIUM_DRIVERS: "radeonsi"
385
386 build:make-gallium-drivers-other:
387 extends: build:make-gallium-drivers-swr
388 variables:
389 LLVM_VERSION: "3.9"
390 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
391
392 build:make-gallium-st-clover-llvm-39:
393 extends: .make-build
394 variables:
395 MAKE_CHECK_COMMAND: "true"
396 LLVM_VERSION: "3.9"
397 DRI_LOADERS: >
398 --disable-glx
399 --disable-gbm
400 --disable-egl
401 GALLIUM_ST: >
402 --disable-dri
403 --enable-opencl
404 --enable-opencl-icd
405 --enable-llvm
406 --disable-xa
407 --disable-nine
408 --disable-xvmc
409 --disable-vdpau
410 --disable-va
411 --disable-omx-bellagio
412 --disable-gallium-osmesa
413 GALLIUM_DRIVERS: "r600"
414 LIBUNWIND_FLAGS: --enable-libunwind
415
416 build:make-gallium-st-clover-llvm-4:
417 extends: build:make-gallium-st-clover-llvm-39
418 variables:
419 LLVM_VERSION: "4.0"
420
421 build:make-gallium-st-clover-llvm-5:
422 extends: build:make-gallium-st-clover-llvm-39
423 variables:
424 LLVM_VERSION: "5.0"
425
426 build:make-gallium-st-clover-llvm-6:
427 extends: build:make-gallium-st-clover-llvm-39
428 variables:
429 LLVM_VERSION: "6.0"
430
431 build:make-gallium-st-clover-llvm-7:
432 extends: build:make-gallium-st-clover-llvm-39
433 variables:
434 LLVM_VERSION: "7"
435 GALLIUM_DRIVERS: "r600,radeonsi"
436
437 build:make-gallium-st-other:
438 extends: .make-build
439 variables:
440 MAKE_CHECK_COMMAND: "true"
441 # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
442 LLVM_VERSION: "3.9"
443 DRI_LOADERS: >
444 --disable-glx
445 --disable-gbm
446 --disable-egl
447 GALLIUM_ST: >
448 --enable-dri
449 --disable-opencl
450 --enable-xa
451 --enable-nine
452 --enable-xvmc
453 --enable-vdpau
454 --enable-va
455 --enable-omx-bellagio
456 --enable-gallium-osmesa
457 # We need swrast for osmesa and nine.
458 # i915 most likely doesn't work with most ST.
459 # Regardless - we're doing a quick build test here.
460 GALLIUM_DRIVERS: "i915,swrast"
461 LIBUNWIND_FLAGS: --enable-libunwind
462
463 build:scons-nollvm:
464 extends: .scons-build
465 variables:
466 SCONS_TARGET: "llvm=0"
467 SCONS_CHECK_COMMAND: "scons llvm=0 check"
468
469 build:scons-llvm:
470 extends: .scons-build
471 variables:
472 SCONS_TARGET: "llvm=1"
473 SCONS_CHECK_COMMAND: "scons llvm=1 check"
474 LLVM_VERSION: "3.9"
475
476 build:scons-swr:
477 extends: .scons-build
478 variables:
479 SCONS_TARGET: "swr=1"
480 SCONS_CHECK_COMMAND: "true"
481 LLVM_VERSION: "6.0"