gbm: don't return void
[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 UPSTREAM_REPO: mesa/mesa
20 DEBIAN_TAG: "2019-04-16"
21 DEBIAN_VERSION: stretch-slim
22 DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
23
24 include:
25 - project: 'wayland/ci-templates'
26 ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
27 file: '/templates/debian.yml'
28
29 stages:
30 - containers-build
31 - build+test
32
33
34 # When to automatically run the CI
35 .ci-run-policy: &ci-run-policy
36 only:
37 - branches@mesa/mesa
38 - merge_requests
39 - /^ci([-/].*)?$/
40 retry:
41 max: 2
42 when:
43 - runner_system_failure
44
45
46 # CONTAINERS
47
48 debian:
49 extends: .debian@container-ifnot-exists
50 stage: containers-build
51 <<: *ci-run-policy
52 variables:
53 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
54 DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
55
56
57 # BUILD
58
59 .build:
60 <<: *ci-run-policy
61 image: $DEBIAN_IMAGE
62 stage: build+test
63 cache:
64 paths:
65 - ccache
66 artifacts:
67 when: on_failure
68 untracked: true
69 variables:
70 CCACHE_COMPILERCHECK: "content"
71 # Use ccache transparently, and print stats before/after
72 before_script:
73 - export PATH="/usr/lib/ccache:$PATH"
74 - export CCACHE_BASEDIR="$PWD"
75 - export CCACHE_DIR="$PWD/ccache"
76 - ccache --zero-stats || true
77 - ccache --show-stats || true
78 after_script:
79 - export CCACHE_DIR="$PWD/ccache"
80 - ccache --show-stats
81
82 .meson-build:
83 extends: .build
84 script:
85 # We need to control the version of llvm-config we're using, so we'll
86 # generate a native file to do so. This requires meson >=0.49
87 - if test -n "$LLVM_VERSION"; then
88 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
89 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
90 $LLVM_CONFIG --version;
91 else
92 touch native.file;
93 fi
94 - meson --version
95 - meson _build
96 --native-file=native.file
97 -D buildtype=debug
98 -D build-tests=true
99 -D libunwind=${UNWIND}
100 ${DRI_LOADERS}
101 -D dri-drivers=${DRI_DRIVERS:-[]}
102 ${GALLIUM_ST}
103 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
104 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
105 -D I-love-half-baked-turnips=true
106 - cd _build
107 - meson configure
108 - ninja -j4
109 - LC_ALL=C.UTF-8 ninja test
110
111 .scons-build:
112 extends: .build
113 variables:
114 SCONSFLAGS: "-j4"
115 script:
116 - if test -n "$LLVM_VERSION"; then
117 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
118 fi
119 - scons $SCONS_TARGET
120 - eval $SCONS_CHECK_COMMAND
121
122 # NOTE: Building SWR is 2x (yes two) times slower than all the other
123 # gallium drivers combined.
124 # Start this early so that it doesn't limit the total run time.
125 meson-gallium-swr:
126 extends: .meson-build
127 variables:
128 UNWIND: "true"
129 DRI_LOADERS: >
130 -D glx=disabled
131 -D egl=false
132 -D gbm=false
133 GALLIUM_ST: >
134 -D dri3=false
135 -D gallium-vdpau=false
136 -D gallium-xvmc=false
137 -D gallium-omx=disabled
138 -D gallium-va=false
139 -D gallium-xa=false
140 -D gallium-nine=false
141 -D gallium-opencl=disabled
142 GALLIUM_DRIVERS: "swr"
143 LLVM_VERSION: "6.0"
144
145 meson-clang:
146 extends: .meson-build
147 variables:
148 UNWIND: "true"
149 DRI_DRIVERS: "auto"
150 GALLIUM_DRIVERS: "auto"
151 CC: "ccache clang-8"
152 CXX: "ccache clang++-8"
153 before_script:
154 - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache"
155 - ccache --zero-stats --show-stats || true
156 # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so
157 - apt-get remove -y libgcc-8-dev
158
159 meson-vulkan:
160 extends: .meson-build
161 variables:
162 UNWIND: "false"
163 DRI_LOADERS: >
164 -D glx=disabled
165 -D gbm=false
166 -D egl=false
167 -D platforms=x11,wayland,drm
168 -D osmesa=none
169 GALLIUM_ST: >
170 -D dri3=true
171 -D gallium-vdpau=false
172 -D gallium-xvmc=false
173 -D gallium-omx=disabled
174 -D gallium-va=false
175 -D gallium-xa=false
176 -D gallium-nine=false
177 -D gallium-opencl=disabled
178 VULKAN_DRIVERS: intel,amd,freedreno
179 LLVM_VERSION: "7"
180
181 meson-loader-classic-dri:
182 extends: .meson-build
183 variables:
184 UNWIND: "false"
185 DRI_LOADERS: >
186 -D glx=dri
187 -D gbm=true
188 -D egl=true
189 -D platforms=x11,wayland,drm,surfaceless
190 -D osmesa=classic
191 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
192 GALLIUM_ST: >
193 -D dri3=true
194 -D gallium-vdpau=false
195 -D gallium-xvmc=false
196 -D gallium-omx=disabled
197 -D gallium-va=false
198 -D gallium-xa=false
199 -D gallium-nine=false
200 -D gallium-opencl=disabled
201
202 meson-glvnd:
203 extends: .meson-build
204 variables:
205 UNWIND: "true"
206 DRI_LOADERS: >
207 -D glvnd=true
208 -D egl=true
209 -D gbm=true
210 -D glx=dri
211 DRI_DRIVERS: "i965"
212 GALLIUM_ST: >
213 -D gallium-vdpau=false
214 -D gallium-xvmc=false
215 -D gallium-omx=disabled
216 -D gallium-va=false
217 -D gallium-xa=false
218 -D gallium-nine=false
219 -D gallium-opencl=disabled
220
221 meson-gallium-radeonsi:
222 extends: .meson-build
223 variables:
224 UNWIND: "true"
225 DRI_LOADERS: >
226 -D glx=disabled
227 -D egl=false
228 -D gbm=false
229 GALLIUM_ST: >
230 -D dri3=false
231 -D gallium-vdpau=false
232 -D gallium-xvmc=false
233 -D gallium-omx=disabled
234 -D gallium-va=false
235 -D gallium-xa=false
236 -D gallium-nine=false
237 -D gallium-opencl=disabled
238 GALLIUM_DRIVERS: "radeonsi"
239 LLVM_VERSION: "7"
240
241 meson-gallium-drivers-other:
242 extends: .meson-build
243 variables:
244 UNWIND: "true"
245 DRI_LOADERS: >
246 -D glx=disabled
247 -D egl=false
248 -D gbm=false
249 GALLIUM_ST: >
250 -D dri3=false
251 -D gallium-vdpau=false
252 -D gallium-xvmc=false
253 -D gallium-omx=disabled
254 -D gallium-va=false
255 -D gallium-xa=false
256 -D gallium-nine=false
257 -D gallium-opencl=disabled
258 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima"
259 LLVM_VERSION: "5.0"
260
261 meson-gallium-clover-llvm:
262 extends: .meson-build
263 variables:
264 UNWIND: "true"
265 DRI_LOADERS: >
266 -D glx=disabled
267 -D egl=false
268 -D gbm=false
269 GALLIUM_ST: >
270 -D dri3=false
271 -D gallium-vdpau=false
272 -D gallium-xvmc=false
273 -D gallium-omx=disabled
274 -D gallium-va=false
275 -D gallium-xa=false
276 -D gallium-nine=false
277 -D gallium-opencl=icd
278 GALLIUM_DRIVERS: "r600,radeonsi"
279
280 meson-gallium-clover-llvm39:
281 extends: meson-gallium-clover-llvm
282 variables:
283 GALLIUM_DRIVERS: "r600"
284 LLVM_VERSION: "3.9"
285
286 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-extra-hud=true
297 -D gallium-vdpau=true
298 -D gallium-xvmc=true
299 -D gallium-omx=bellagio
300 -D gallium-va=true
301 -D gallium-xa=true
302 -D gallium-nine=true
303 -D gallium-opencl=disabled
304 -D osmesa=gallium
305 GALLIUM_DRIVERS: "nouveau,swrast"
306 LLVM_VERSION: "5.0"
307
308 scons-nollvm:
309 extends: .scons-build
310 variables:
311 SCONS_TARGET: "llvm=0"
312 SCONS_CHECK_COMMAND: "scons llvm=0 check"
313
314 scons-llvm:
315 extends: .scons-build
316 variables:
317 SCONS_TARGET: "llvm=1"
318 SCONS_CHECK_COMMAND: "scons llvm=1 check"
319 LLVM_VERSION: "3.4"
320 # LLVM 3.4 packages were built with an old libstdc++ ABI
321 CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0"
322
323 scons-swr:
324 extends: .scons-build
325 variables:
326 SCONS_TARGET: "swr=1"
327 SCONS_CHECK_COMMAND: "true"
328 LLVM_VERSION: "6.0"