egl/android: droid_open_device_drm_gralloc --> droid_open_device
[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 stages:
24 - containers-build
25 - build+test
26
27
28 # When to automatically run the CI
29 .ci-run-policy:
30 only:
31 - master
32 - merge_requests
33 - /^ci([-/].*)?$/
34 retry:
35 max: 2
36 when:
37 - runner_system_failure
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 cache:
73 paths:
74 - ccache
75 artifacts:
76 when: on_failure
77 untracked: true
78 # Use ccache transparently, and print stats before/after
79 before_script:
80 - export PATH="/usr/lib/ccache:$PATH"
81 - export CCACHE_BASEDIR="$PWD"
82 - export CCACHE_DIR="$PWD/ccache"
83 - export CCACHE_COMPILERCHECK=content
84 - ccache --zero-stats || true
85 - ccache --show-stats || true
86 after_script:
87 - export CCACHE_DIR="$PWD/ccache"
88 - ccache --show-stats
89
90 .meson-build:
91 extends: .build
92 script:
93 # We need to control the version of llvm-config we're using, so we'll
94 # generate a native file to do so. This requires meson >=0.49
95 - if test -n "$LLVM_VERSION"; then
96 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
97 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
98 $LLVM_CONFIG --version;
99 else
100 touch native.file;
101 fi
102 - meson --version
103 - meson _build
104 --native-file=native.file
105 -D build-tests=true
106 -D libunwind=${UNWIND}
107 ${DRI_LOADERS}
108 -D dri-drivers=${DRI_DRIVERS:-[]}
109 ${GALLIUM_ST}
110 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
111 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
112 -D I-love-half-baked-turnips=true
113 - cd _build
114 - meson configure
115 - ninja -j4
116 - ninja test
117
118 .scons-build:
119 extends: .build
120 variables:
121 SCONSFLAGS: "-j4"
122 script:
123 - if test -n "$LLVM_VERSION"; then
124 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
125 fi
126 - scons $SCONS_TARGET
127 - eval $SCONS_CHECK_COMMAND
128
129 autotools:
130 extends: .build
131 variables:
132 MAKEFLAGS: "-j8"
133 LLVM_CONFIG: llvm-config-7
134 script:
135 - mkdir build
136 - cd build
137 - ../autogen.sh
138 --enable-autotools
139 --enable-debug
140 --disable-llvm-shared-libs
141 - make
142 - make check
143
144 # NOTE: Building SWR is 2x (yes two) times slower than all the other
145 # gallium drivers combined.
146 # Start this early so that it doesn't limit the total run time.
147 meson-gallium-swr:
148 extends: .meson-build
149 variables:
150 UNWIND: "true"
151 DRI_LOADERS: >
152 -D glx=disabled
153 -D egl=false
154 -D gbm=false
155 GALLIUM_ST: >
156 -D dri3=false
157 -D gallium-vdpau=false
158 -D gallium-xvmc=false
159 -D gallium-omx=disabled
160 -D gallium-va=false
161 -D gallium-xa=false
162 -D gallium-nine=false
163 -D gallium-opencl=disabled
164 GALLIUM_DRIVERS: "swr"
165 LLVM_VERSION: "6.0"
166
167 meson-clang:
168 extends: .meson-build
169 variables:
170 UNWIND: "true"
171 DRI_DRIVERS: "auto"
172 GALLIUM_DRIVERS: "auto"
173 CC: "ccache clang-7"
174 CXX: "ccache clang++-7"
175
176 meson-vulkan:
177 extends: .meson-build
178 variables:
179 UNWIND: "false"
180 DRI_LOADERS: >
181 -D glx=disabled
182 -D gbm=false
183 -D egl=false
184 -D platforms=x11,wayland,drm
185 -D osmesa=none
186 GALLIUM_ST: >
187 -D dri3=true
188 -D gallium-vdpau=false
189 -D gallium-xvmc=false
190 -D gallium-omx=disabled
191 -D gallium-va=false
192 -D gallium-xa=false
193 -D gallium-nine=false
194 -D gallium-opencl=disabled
195 VULKAN_DRIVERS: intel,amd,freedreno
196 LLVM_VERSION: "7"
197
198 meson-loader-classic-dri:
199 extends: .meson-build
200 variables:
201 UNWIND: "false"
202 DRI_LOADERS: >
203 -D glx=dri
204 -D gbm=true
205 -D egl=true
206 -D platforms=x11,wayland,drm,surfaceless
207 -D osmesa=classic
208 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
209 GALLIUM_ST: >
210 -D dri3=true
211 -D gallium-vdpau=false
212 -D gallium-xvmc=false
213 -D gallium-omx=disabled
214 -D gallium-va=false
215 -D gallium-xa=false
216 -D gallium-nine=false
217 -D gallium-opencl=disabled
218
219 meson-glvnd:
220 extends: .meson-build
221 variables:
222 UNWIND: "true"
223 DRI_LOADERS: >
224 -D glvnd=true
225 -D egl=true
226 -D gbm=true
227 -D glx=dri
228 DRI_DRIVERS: "i965"
229 GALLIUM_ST: >
230 -D gallium-vdpau=false
231 -D gallium-xvmc=false
232 -D gallium-omx=disabled
233 -D gallium-va=false
234 -D gallium-xa=false
235 -D gallium-nine=false
236 -D gallium-opencl=disabled
237
238 meson-gallium-radeonsi:
239 extends: .meson-build
240 variables:
241 UNWIND: "true"
242 DRI_LOADERS: >
243 -D glx=disabled
244 -D egl=false
245 -D gbm=false
246 GALLIUM_ST: >
247 -D dri3=false
248 -D gallium-vdpau=false
249 -D gallium-xvmc=false
250 -D gallium-omx=disabled
251 -D gallium-va=false
252 -D gallium-xa=false
253 -D gallium-nine=false
254 -D gallium-opencl=disabled
255 GALLIUM_DRIVERS: "radeonsi"
256 LLVM_VERSION: "7"
257
258 meson-gallium-drivers-other:
259 extends: .meson-build
260 variables:
261 UNWIND: "true"
262 DRI_LOADERS: >
263 -D glx=disabled
264 -D egl=false
265 -D gbm=false
266 GALLIUM_ST: >
267 -D dri3=false
268 -D gallium-vdpau=false
269 -D gallium-xvmc=false
270 -D gallium-omx=disabled
271 -D gallium-va=false
272 -D gallium-xa=false
273 -D gallium-nine=false
274 -D gallium-opencl=disabled
275 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost"
276 LLVM_VERSION: "5.0"
277
278 meson-gallium-clover-llvm:
279 extends: .meson-build
280 variables:
281 UNWIND: "true"
282 DRI_LOADERS: >
283 -D glx=disabled
284 -D egl=false
285 -D gbm=false
286 GALLIUM_ST: >
287 -D dri3=false
288 -D gallium-vdpau=false
289 -D gallium-xvmc=false
290 -D gallium-omx=disabled
291 -D gallium-va=false
292 -D gallium-xa=false
293 -D gallium-nine=false
294 -D gallium-opencl=icd
295 GALLIUM_DRIVERS: "r600,radeonsi"
296
297 meson-gallium-clover-llvm39:
298 extends: meson-gallium-clover-llvm
299 variables:
300 GALLIUM_DRIVERS: "r600"
301 LLVM_VERSION: "3.9"
302
303 meson-gallium-st-other:
304 extends: .meson-build
305 variables:
306 UNWIND: "true"
307 DRI_LOADERS: >
308 -D glx=disabled
309 -D egl=false
310 -D gbm=false
311 GALLIUM_ST: >
312 -D dri3=true
313 -D gallium-vdpau=true
314 -D gallium-xvmc=true
315 -D gallium-omx=bellagio
316 -D gallium-va=true
317 -D gallium-xa=true
318 -D gallium-nine=true
319 -D gallium-opencl=disabled
320 -D osmesa=gallium
321 GALLIUM_DRIVERS: "nouveau,swrast"
322 LLVM_VERSION: "5.0"
323
324 scons-nollvm:
325 extends: .scons-build
326 variables:
327 SCONS_TARGET: "llvm=0"
328 SCONS_CHECK_COMMAND: "scons llvm=0 check"
329
330 scons-llvm:
331 extends: .scons-build
332 variables:
333 SCONS_TARGET: "llvm=1"
334 SCONS_CHECK_COMMAND: "scons llvm=1 check"
335 LLVM_VERSION: "3.9"
336
337 scons-swr:
338 extends: .scons-build
339 variables:
340 SCONS_TARGET: "swr=1"
341 SCONS_CHECK_COMMAND: "true"
342 LLVM_VERSION: "6.0"