563d9e25379394559173d1becd6a0964a7bed107
[mesa.git] / .travis.yml
1 language: c
2
3 sudo: false
4 dist: trusty
5
6 cache:
7 apt: true
8 ccache: true
9
10 env:
11 global:
12 - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual
13 - XCB_RELEASES=http://xcb.freedesktop.org/dist
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.74
19 - XCBPROTO_VERSION=xcb-proto-1.11
20 - LIBXCB_VERSION=libxcb-1.11
21 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
22 - LIBTXC_DXTN_VERSION=libtxc_dxtn-1.0.1
23 - LIBVDPAU_VERSION=libvdpau-1.1
24 - LIBVA_VERSION=libva-1.6.2
25 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig
26 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
27
28 matrix:
29 include:
30 - env:
31 - LABEL="make loaders/classic DRI"
32 - BUILD=make
33 - MAKEFLAGS=-j2
34 - MAKE_CHECK_COMMAND="make check"
35 # XXX: Add wayland platform
36 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless --enable-osmesa"
37 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
38 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx --disable-gallium-osmesa"
39 - GALLIUM_DRIVERS=""
40 - VULKAN_DRIVERS=""
41 addons:
42 apt:
43 packages:
44 - x11proto-xf86vidmode-dev
45 - libexpat1-dev
46 - libx11-xcb-dev
47 - env:
48 # NOTE: Building SWR is 2x (yes two) times slower than all the other
49 # gallium drivers combined.
50 # Start this early so that it doesn't hunder the run time.
51 - LABEL="make Gallium Drivers SWR"
52 - BUILD=make
53 - MAKEFLAGS=-j2
54 - MAKE_CHECK_COMMAND="true"
55 - LLVM_VERSION=3.9
56 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
57 - OVERRIDE_CC="gcc-5"
58 - OVERRIDE_CXX="g++-5"
59 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
60 - DRI_DRIVERS=""
61 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx --disable-gallium-osmesa"
62 - GALLIUM_DRIVERS="swr"
63 - VULKAN_DRIVERS=""
64 addons:
65 apt:
66 sources:
67 - ubuntu-toolchain-r-test
68 - llvm-toolchain-trusty-3.9
69 packages:
70 # LLVM packaging is broken and misses these dependencies
71 - libedit-dev
72 # From sources above
73 - g++-5
74 - llvm-3.9-dev
75 # Common
76 - x11proto-xf86vidmode-dev
77 - libexpat1-dev
78 - libx11-xcb-dev
79 - libelf-dev
80 - env:
81 - LABEL="make Gallium Drivers Other"
82 - BUILD=make
83 - MAKEFLAGS=-j2
84 - MAKE_CHECK_COMMAND="true"
85 - LLVM_VERSION=3.9
86 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
87 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
88 - DRI_DRIVERS=""
89 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx --disable-gallium-osmesa"
90 - GALLIUM_DRIVERS="i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
91 - VULKAN_DRIVERS=""
92 addons:
93 apt:
94 sources:
95 - llvm-toolchain-trusty-3.9
96 packages:
97 # LLVM packaging is broken and misses these dependencies
98 - libedit-dev
99 # From sources above
100 - llvm-3.9-dev
101 # Common
102 - x11proto-xf86vidmode-dev
103 - libexpat1-dev
104 - libx11-xcb-dev
105 - libelf-dev
106 - env:
107 # NOTE: Analogous to SWR above, building Clover is quite slow.
108 - LABEL="make Gallium ST Clover"
109 - BUILD=make
110 - MAKEFLAGS=-j2
111 - MAKE_CHECK_COMMAND="true"
112 - LLVM_VERSION=3.6
113 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
114 - OVERRIDE_CC=gcc-4.7
115 - OVERRIDE_CXX=g++-4.7
116 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
117 - DRI_DRIVERS=""
118 - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx --disable-gallium-osmesa"
119 # i915 most likely doesn't work with OpenCL.
120 # Regardless - we're doing a quick build test here.
121 - GALLIUM_DRIVERS="i915"
122 - VULKAN_DRIVERS=""
123 addons:
124 apt:
125 sources:
126 - llvm-toolchain-trusty-3.6
127 packages:
128 - libclc-dev
129 # LLVM packaging is broken and misses these dependencies
130 - libedit-dev
131 - g++-4.7
132 # From sources above
133 - llvm-3.6-dev
134 - clang-3.6
135 - libclang-3.6-dev
136 # Common
137 - x11proto-xf86vidmode-dev
138 - libexpat1-dev
139 - libx11-xcb-dev
140 - libelf-dev
141 - env:
142 - LABEL="make Gallium ST Other"
143 - BUILD=make
144 - MAKEFLAGS=-j2
145 - MAKE_CHECK_COMMAND="true"
146 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
147 - DRI_DRIVERS=""
148 - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx --enable-gallium-osmesa"
149 # We need swrast for osmesa and nine.
150 # i915 most likely doesn't work with most ST.
151 # Regardless - we're doing a quick build test here.
152 - GALLIUM_DRIVERS="i915,swrast"
153 - VULKAN_DRIVERS=""
154 addons:
155 apt:
156 packages:
157 # Nine requires gcc 4.6... which is the one we have right ?
158 - libxvmc-dev
159 # Build locally, for now.
160 #- libvdpau-dev
161 #- libva-dev
162 - libomxil-bellagio-dev
163 # LLVM packaging is broken and misses these dependencies
164 - libedit-dev
165 # Common
166 - x11proto-xf86vidmode-dev
167 - libexpat1-dev
168 - libx11-xcb-dev
169 - libelf-dev
170 - env:
171 - LABEL="make Vulkan"
172 - BUILD=make
173 - MAKEFLAGS=-j2
174 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
175 - LLVM_VERSION=3.9
176 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
177 # XXX: we want to test the WSI, but those are enabled via the EGL toggles
178 # XXX: Add wayland platform
179 # XXX: Platform X11 dependencies are checked when --enable-glx is set
180 - DRI_LOADERS="--enable-glx --disable-gbm --enable-egl --with-platforms=x11"
181 - DRI_DRIVERS=""
182 # XXX: enable DRI for EGL above
183 - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx --disable-gallium-osmesa"
184 - GALLIUM_DRIVERS=""
185 - VULKAN_DRIVERS="intel,radeon"
186 addons:
187 apt:
188 sources:
189 - llvm-toolchain-trusty-3.9
190 packages:
191 # LLVM packaging is broken and misses these dependencies
192 - libedit-dev
193 # From sources above
194 - llvm-3.9-dev
195 # Common
196 - x11proto-xf86vidmode-dev
197 - libexpat1-dev
198 - libx11-xcb-dev
199 - libelf-dev
200 - env:
201 - LABEL="scons"
202 - BUILD=scons
203 - SCONSFLAGS="-j4"
204 # Explicitly disable.
205 - SCONS_TARGET="llvm=0"
206 # Keep it symmetrical to the make build.
207 - SCONS_CHECK_COMMAND="scons llvm=0 check"
208 addons:
209 apt:
210 packages:
211 - scons
212 # Common
213 - x11proto-xf86vidmode-dev
214 - libexpat1-dev
215 - libx11-xcb-dev
216 - libelf-dev
217 - env:
218 - LABEL="scons LLVM"
219 - BUILD=scons
220 - SCONSFLAGS="-j4"
221 - SCONS_TARGET="llvm=1"
222 # Keep it symmetrical to the make build.
223 - SCONS_CHECK_COMMAND="scons llvm=1 check"
224 - LLVM_VERSION=3.3
225 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
226 addons:
227 apt:
228 packages:
229 - scons
230 # LLVM packaging is broken and misses these dependencies
231 - libedit-dev
232 - llvm-3.3-dev
233 # Common
234 - x11proto-xf86vidmode-dev
235 - libexpat1-dev
236 - libx11-xcb-dev
237 - libelf-dev
238 - env:
239 - LABEL="scons SWR"
240 - BUILD=scons
241 - SCONSFLAGS="-j4"
242 - SCONS_TARGET="swr=1"
243 - LLVM_VERSION=3.9
244 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
245 # Keep it symmetrical to the make build. There's no actual SWR, yet.
246 - SCONS_CHECK_COMMAND="true"
247 - OVERRIDE_CC="gcc-5"
248 - OVERRIDE_CXX="g++-5"
249 addons:
250 apt:
251 sources:
252 - ubuntu-toolchain-r-test
253 - llvm-toolchain-trusty-3.9
254 packages:
255 - scons
256 # LLVM packaging is broken and misses these dependencies
257 - libedit-dev
258 # From sources above
259 - g++-5
260 - llvm-3.9-dev
261 # Common
262 - x11proto-xf86vidmode-dev
263 - libexpat1-dev
264 - libx11-xcb-dev
265 - libelf-dev
266
267 install:
268 - pip install --user mako
269
270 # Since libdrm gets updated in configure.ac regularly, try to pick up the
271 # latest version from there.
272 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
273 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
274 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
275 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
276 export LIBDRM_VERSION="libdrm-$new_ver";
277 fi;
278 done
279
280 # Install dependencies where we require specific versions (or where
281 # disallowed by Travis CI's package whitelisting).
282
283 - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
284 - tar -jxvf $XORGMACROS_VERSION.tar.bz2
285 - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
286
287 - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
288 - tar -jxvf $GLPROTO_VERSION.tar.bz2
289 - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
290
291 - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
292 - tar -jxvf $DRI2PROTO_VERSION.tar.bz2
293 - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
294
295 - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
296 - tar -jxvf $XCBPROTO_VERSION.tar.bz2
297 - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
298
299 - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
300 - tar -jxvf $LIBXCB_VERSION.tar.bz2
301 - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
302
303 - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
304 - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
305 - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
306
307 - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
308 - tar -jxvf $LIBDRM_VERSION.tar.bz2
309 - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
310
311 - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
312 - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
313 - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
314
315 # libtxc-dxtn uses the patented S3 Texture Compression
316 # algorithm. Therefore, we don't want to use this library but it is
317 # still possible through setting the USE_TXC_DXTN variable to yes in
318 # the travis web UI.
319 #
320 # According to Wikipedia, the patent expires on October 2, 2017:
321 # https://en.wikipedia.org/wiki/S3_Texture_Compression#Patent
322 - if test "x$USE_TXC_DXTN" = xyes; then
323 wget https://people.freedesktop.org/~cbrill/libtxc_dxtn/$LIBTXC_DXTN_VERSION.tar.bz2;
324 tar -jxvf $LIBTXC_DXTN_VERSION.tar.bz2;
325 (cd $LIBTXC_DXTN_VERSION && ./configure --prefix=$HOME/prefix && make install);
326 fi
327
328 - wget http://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
329 - tar -jxvf $LIBVDPAU_VERSION.tar.bz2
330 - (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
331
332 - wget http://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
333 - tar -jxvf $LIBVA_VERSION.tar.bz2
334 - (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
335
336 # Generate the header since one is missing on the Travis instance
337 - mkdir -p linux
338 - printf "%s\n" \
339 "#ifndef _LINUX_MEMFD_H" \
340 "#define _LINUX_MEMFD_H" \
341 "" \
342 "#define __NR_memfd_create 319" \
343 "#define SYS_memfd_create __NR_memfd_create" \
344 "" \
345 "#define MFD_CLOEXEC 0x0001U" \
346 "#define MFD_ALLOW_SEALING 0x0002U" \
347 "" \
348 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
349
350 script:
351 - if test "x$BUILD" = xmake; then
352 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
353 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
354 export CC="$CC -isystem`pwd`";
355
356 ./autogen.sh --enable-debug
357 $DRI_LOADERS
358 --with-dri-drivers=$DRI_DRIVERS
359 $GALLIUM_ST
360 --with-gallium-drivers=$GALLIUM_DRIVERS
361 --with-vulkan-drivers=$VULKAN_DRIVERS
362 --disable-llvm-shared-libs
363 &&
364 make && eval $MAKE_CHECK_COMMAND;
365 fi
366
367 - if test "x$BUILD" = xscons; then
368 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
369 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
370 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
371 fi