gitlab-ci: add make Gallium Drivers "Other" build
[mesa.git] / .travis.yml
1 language: c
2
3 dist: xenial
4
5 cache:
6 apt: true
7 ccache: true
8
9 env:
10 global:
11 - XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
12 - XCB_RELEASES=https://xcb.freedesktop.org/dist
13 - WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
14 - XORGMACROS_VERSION=util-macros-1.19.0
15 - GLPROTO_VERSION=glproto-1.4.17
16 - DRI2PROTO_VERSION=dri2proto-2.8
17 - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
18 - LIBDRM_VERSION=libdrm-2.4.97
19 - XCBPROTO_VERSION=xcb-proto-1.13
20 - RANDRPROTO_VERSION=randrproto-1.3.0
21 - LIBXRANDR_VERSION=libXrandr-1.3.0
22 - LIBXCB_VERSION=libxcb-1.13
23 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
24 - LIBVDPAU_VERSION=libvdpau-1.1
25 - LIBVA_VERSION=libva-1.7.0
26 - LIBWAYLAND_VERSION=wayland-1.15.0
27 - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
28 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
29 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
30 - PATH="$HOME/prefix/bin:$PATH"
31
32 matrix:
33 include:
34 - env:
35 - LABEL="make Gallium ST Clover LLVM-3.9"
36 - BUILD=make
37 - MAKEFLAGS="-j4"
38 - MAKE_CHECK_COMMAND="true"
39 - LLVM_VERSION=3.9
40 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
41 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
42 - DRI_DRIVERS=""
43 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
44 - GALLIUM_DRIVERS="r600"
45 - VULKAN_DRIVERS=""
46 - LIBUNWIND_FLAGS="--enable-libunwind"
47 addons:
48 apt:
49 packages:
50 - libclc-dev
51 # LLVM packaging is broken and misses these dependencies
52 - libedit-dev
53 - llvm-3.9-dev
54 - clang-3.9
55 - libclang-3.9-dev
56 # Common
57 - xz-utils
58 - libexpat1-dev
59 - libx11-xcb-dev
60 - libelf-dev
61 - libunwind8-dev
62 - python3-pip
63 - python3-setuptools
64 - env:
65 - LABEL="make Gallium ST Clover LLVM-4.0"
66 - BUILD=make
67 - MAKEFLAGS="-j4"
68 - MAKE_CHECK_COMMAND="true"
69 - LLVM_VERSION=4.0
70 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
71 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
72 - DRI_DRIVERS=""
73 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
74 - GALLIUM_DRIVERS="r600"
75 - VULKAN_DRIVERS=""
76 - LIBUNWIND_FLAGS="--enable-libunwind"
77 addons:
78 apt:
79 packages:
80 - libclc-dev
81 # LLVM packaging is broken and misses these dependencies
82 - libedit-dev
83 - llvm-4.0-dev
84 - clang-4.0
85 - libclang-4.0-dev
86 # Common
87 - xz-utils
88 - libexpat1-dev
89 - libx11-xcb-dev
90 - libelf-dev
91 - libunwind8-dev
92 - python3-pip
93 - python3-setuptools
94 - env:
95 - LABEL="make Gallium ST Clover LLVM-5.0"
96 - BUILD=make
97 - MAKEFLAGS="-j4"
98 - MAKE_CHECK_COMMAND="true"
99 - LLVM_VERSION=5.0
100 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
101 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
102 - DRI_DRIVERS=""
103 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
104 - GALLIUM_DRIVERS="r600"
105 - VULKAN_DRIVERS=""
106 - LIBUNWIND_FLAGS="--enable-libunwind"
107 addons:
108 apt:
109 packages:
110 - libclc-dev
111 # LLVM packaging is broken and misses these dependencies
112 - libedit-dev
113 - llvm-5.0-dev
114 - clang-5.0
115 - libclang-5.0-dev
116 # Common
117 - xz-utils
118 - libexpat1-dev
119 - libx11-xcb-dev
120 - libelf-dev
121 - libunwind8-dev
122 - python3-pip
123 - python3-setuptools
124 - env:
125 - LABEL="make Gallium ST Clover LLVM-6.0"
126 - BUILD=make
127 - MAKEFLAGS="-j4"
128 - MAKE_CHECK_COMMAND="true"
129 - LLVM_VERSION=6.0
130 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
131 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
132 - DRI_DRIVERS=""
133 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
134 - GALLIUM_DRIVERS="r600"
135 - VULKAN_DRIVERS=""
136 - LIBUNWIND_FLAGS="--enable-libunwind"
137 addons:
138 apt:
139 packages:
140 - libclc-dev
141 - llvm-6.0-dev
142 - clang-6.0
143 - libclang-6.0-dev
144 # Common
145 - xz-utils
146 - libexpat1-dev
147 - libx11-xcb-dev
148 - libelf-dev
149 - libunwind8-dev
150 - python3-pip
151 - python3-setuptools
152 - env:
153 - LABEL="make Gallium ST Clover LLVM-7"
154 - BUILD=make
155 - MAKEFLAGS="-j4"
156 - MAKE_CHECK_COMMAND="true"
157 - LLVM_VERSION=7
158 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
159 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
160 - DRI_DRIVERS=""
161 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
162 - GALLIUM_DRIVERS="r600,radeonsi"
163 - VULKAN_DRIVERS=""
164 - LIBUNWIND_FLAGS="--enable-libunwind"
165 addons:
166 apt:
167 sources:
168 - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
169 key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
170 packages:
171 - libclc-dev
172 # From sources above
173 - llvm-7-dev
174 - clang-7
175 - libclang-7-dev
176 # Common
177 - xz-utils
178 - libexpat1-dev
179 - libx11-xcb-dev
180 - libelf-dev
181 - libunwind8-dev
182 - env:
183 - LABEL="make Gallium ST Other"
184 - BUILD=make
185 - MAKEFLAGS="-j4"
186 - MAKE_CHECK_COMMAND="true"
187 - LLVM_VERSION=3.5
188 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
189 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
190 - DRI_DRIVERS=""
191 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
192 # We need swrast for osmesa and nine.
193 # i915 most likely doesn't work with most ST.
194 # Regardless - we're doing a quick build test here.
195 - GALLIUM_DRIVERS="i915,swrast"
196 - VULKAN_DRIVERS=""
197 - LIBUNWIND_FLAGS="--enable-libunwind"
198 addons:
199 apt:
200 packages:
201 # We actually want to test against llvm-3.3, yet 3.5 is available
202 - llvm-3.5-dev
203 # Nine requires gcc 4.6... which is the one we have right ?
204 - libxvmc-dev
205 # Build locally, for now.
206 #- libvdpau-dev
207 #- libva-dev
208 - libomxil-bellagio-dev
209 # LLVM packaging is broken and misses these dependencies
210 - libedit-dev
211 # Common
212 - xz-utils
213 - libexpat1-dev
214 - libx11-xcb-dev
215 - libelf-dev
216 - libunwind8-dev
217 - python3-pip
218 - python3-setuptools
219 - env:
220 - LABEL="macOS make"
221 - BUILD=make
222 - MAKEFLAGS="-j4"
223 - MAKE_CHECK_COMMAND="make check"
224 - DRI_LOADERS="--with-platforms=x11 --disable-egl"
225 os: osx
226 - env:
227 - LABEL="macOS meson"
228 - BUILD=meson
229 - UNWIND="false"
230 - DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
231 - GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
232 os: osx
233
234 before_install:
235 - |
236 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
237 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
238 # Set PATH for homebrew pip3 installs
239 PATH="$HOME/Library/Python/3.6/bin:${PATH}"
240 # Set PKG_CONFIG_PATH for keg-only expat
241 PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
242 # Set PATH for keg-only gettext
243 PATH="/usr/local/opt/gettext/bin:${PATH}"
244
245 # Install xquartz for prereqs ...
246 XQUARTZ_VERSION="2.7.11"
247 wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
248 hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
249 sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
250 hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
251 # ... and set paths
252 PATH="/opt/X11/bin:${PATH}"
253 PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
254 ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
255 fi
256
257 install:
258 # Install a more modern meson from pip, since the version in the
259 # ubuntu repos is often quite old.
260 - if test "x$BUILD" = xmeson; then
261 pip3 install --user meson;
262 pip3 install --user mako;
263 fi
264
265 # Install autotools build dependencies
266 - if test "x$BUILD" = xmake; then
267 pip2 install --user mako;
268 fi
269
270 # Install a more modern scons from pip.
271 - if test "x$BUILD" = xscons; then
272 pip2 install --user "scons>=2.4";
273 pip2 install --user mako;
274 fi
275
276 # Install dependencies where we require specific versions (or where
277 # disallowed by Travis CI's package whitelisting).
278
279 - |
280 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
281 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
282 tar -jxvf $XORGMACROS_VERSION.tar.bz2
283 (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
284
285 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
286 tar -jxvf $GLPROTO_VERSION.tar.bz2
287 (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
288
289 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
290 tar -jxvf $DRI2PROTO_VERSION.tar.bz2
291 (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
292
293 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
294 tar -jxvf $XCBPROTO_VERSION.tar.bz2
295 (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
296
297 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
298 tar -jxvf $LIBXCB_VERSION.tar.bz2
299 (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
300
301 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
302 tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
303 (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
304
305 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
306 tar -jxvf $LIBDRM_VERSION.tar.bz2
307 (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
308
309 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
310 tar -jxvf $RANDRPROTO_VERSION.tar.bz2
311 (cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
312
313 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
314 tar -jxvf $LIBXRANDR_VERSION.tar.bz2
315 (cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
316
317 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
318 tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
319 (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
320
321 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
322 tar -jxvf $LIBVDPAU_VERSION.tar.bz2
323 (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
324
325 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
326 tar -jxvf $LIBVA_VERSION.tar.bz2
327 (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
328
329 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
330 tar -axvf $LIBWAYLAND_VERSION.tar.xz
331 (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
332
333 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
334 tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
335 (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
336
337 # Meson requires ninja >= 1.6, but xenial has 1.3.x
338 wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
339 unzip ninja-linux.zip
340 mv ninja $HOME/prefix/bin/
341
342 # Generate this header since one is missing on the Travis instance
343 mkdir -p linux
344 printf "%s\n" \
345 "#ifndef _LINUX_MEMFD_H" \
346 "#define _LINUX_MEMFD_H" \
347 "" \
348 "#define MFD_CLOEXEC 0x0001U" \
349 "#define MFD_ALLOW_SEALING 0x0002U" \
350 "" \
351 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
352
353 # Generate this header, including the missing SYS_memfd_create
354 # macro, which is not provided by the header in the Travis
355 # instance
356 mkdir -p sys
357 printf "%s\n" \
358 "#ifndef _SYSCALL_H" \
359 "#define _SYSCALL_H 1" \
360 "" \
361 "#include <asm/unistd.h>" \
362 "" \
363 "#ifndef _LIBC" \
364 "# include <bits/syscall.h>" \
365 "#endif" \
366 "" \
367 "#ifndef __NR_memfd_create" \
368 "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
369 "#endif" \
370 "" \
371 "#ifndef SYS_memfd_create" \
372 "# define SYS_memfd_create __NR_memfd_create" \
373 "#endif" \
374 "" \
375 "#endif" > sys/syscall.h
376 fi
377
378 script:
379 - if test "x$BUILD" = xmake; then
380 export CFLAGS="$CFLAGS -isystem`pwd`";
381
382 mkdir build &&
383 cd build &&
384 ../autogen.sh
385 --enable-autotools
386 --enable-debug
387 $LIBUNWIND_FLAGS
388 $DRI_LOADERS
389 --with-dri-drivers=$DRI_DRIVERS
390 $GALLIUM_ST
391 --with-gallium-drivers=$GALLIUM_DRIVERS
392 --with-vulkan-drivers=$VULKAN_DRIVERS
393 --disable-llvm-shared-libs
394 &&
395 make && eval $MAKE_CHECK_COMMAND;
396 fi
397
398 - if test "x$BUILD" = xscons; then
399 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
400 fi
401
402 - |
403 if test "x$BUILD" = xmeson; then
404 if test -n "$LLVM_CONFIG"; then
405 # We need to control the version of llvm-config we're using, so we'll
406 # generate a native file to do so. This requires meson >=0.49
407 #
408 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
409
410 $LLVM_CONFIG --version
411 else
412 : > native.file
413 fi
414
415 export CFLAGS="$CFLAGS -isystem`pwd`"
416 meson _build \
417 --native-file=native.file \
418 -Dbuild-tests=true \
419 -Dlibunwind=${UNWIND} \
420 ${DRI_LOADERS} \
421 -Ddri-drivers=${DRI_DRIVERS:-[]} \
422 ${GALLIUM_ST} \
423 -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
424 -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
425 meson configure _build
426 ninja -C _build
427 ninja -C _build test
428 fi