OSDN Git Service

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