0e35b6e275970ab659e20cff0af39903a732d474
[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 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig
24 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
25
26 matrix:
27 include:
28 - env:
29 - LABEL="make loaders/classic DRI"
30 - BUILD=make
31 - MAKEFLAGS=-j2
32 - MAKE_CHECK_COMMAND="make check"
33 # XXX: Add wayland platform
34 - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless --enable-osmesa"
35 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
36 - GALLIUM_DRIVERS=""
37 - VULKAN_DRIVERS=""
38 addons:
39 apt:
40 packages:
41 - x11proto-xf86vidmode-dev
42 - libexpat1-dev
43 - libx11-xcb-dev
44 - env:
45 # NOTE: Building SWR is 2x (yes two) times slower than all the other
46 # gallium drivers combined.
47 # Start this early so that it doesn't hunder the run time.
48 - LABEL="make Gallium Drivers SWR"
49 - BUILD=make
50 - MAKEFLAGS=-j2
51 - MAKE_CHECK_COMMAND="true"
52 - LLVM_VERSION=3.9
53 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
54 - OVERRIDE_CC="gcc-5"
55 - OVERRIDE_CXX="g++-5"
56 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
57 - DRI_DRIVERS=""
58 - GALLIUM_DRIVERS="swr"
59 - VULKAN_DRIVERS=""
60 addons:
61 apt:
62 sources:
63 - ubuntu-toolchain-r-test
64 - llvm-toolchain-trusty-3.9
65 packages:
66 # LLVM packaging is broken and misses these dependencies
67 - libedit-dev
68 # From sources above
69 - g++-5
70 - llvm-3.9-dev
71 # Common
72 - x11proto-xf86vidmode-dev
73 - libexpat1-dev
74 - libx11-xcb-dev
75 - libelf-dev
76 - env:
77 - LABEL="make Gallium Drivers Other"
78 - BUILD=make
79 - MAKEFLAGS=-j2
80 - MAKE_CHECK_COMMAND="true"
81 - LLVM_VERSION=3.9
82 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
83 - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
84 - DRI_DRIVERS=""
85 - GALLIUM_DRIVERS="i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
86 - VULKAN_DRIVERS=""
87 addons:
88 apt:
89 sources:
90 - llvm-toolchain-trusty-3.9
91 packages:
92 # LLVM packaging is broken and misses these dependencies
93 - libedit-dev
94 # From sources above
95 - llvm-3.9-dev
96 # Common
97 - x11proto-xf86vidmode-dev
98 - libexpat1-dev
99 - libx11-xcb-dev
100 - libelf-dev
101 - env:
102 - LABEL="make Vulkan"
103 - BUILD=make
104 - MAKEFLAGS=-j2
105 - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
106 - LLVM_VERSION=3.9
107 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
108 # XXX: we want to test the WSI, but those are enabled via the EGL toggles
109 # XXX: Add wayland platform
110 # XXX: Platform X11 dependencies are checked when --enable-glx is set
111 - DRI_LOADERS="--enable-glx --disable-gbm --enable-egl --with-platforms=x11"
112 - DRI_DRIVERS=""
113 - GALLIUM_DRIVERS=""
114 - VULKAN_DRIVERS="intel,radeon"
115 addons:
116 apt:
117 sources:
118 - llvm-toolchain-trusty-3.9
119 packages:
120 # LLVM packaging is broken and misses these dependencies
121 - libedit-dev
122 # From sources above
123 - llvm-3.9-dev
124 # Common
125 - x11proto-xf86vidmode-dev
126 - libexpat1-dev
127 - libx11-xcb-dev
128 - libelf-dev
129 - env:
130 - LABEL="scons"
131 - BUILD=scons
132 - SCONSFLAGS="-j4"
133 # Explicitly disable.
134 - SCONS_TARGET="llvm=0"
135 # Keep it symmetrical to the make build.
136 - SCONS_CHECK_COMMAND="scons llvm=0 check"
137 addons:
138 apt:
139 packages:
140 - scons
141 # Common
142 - x11proto-xf86vidmode-dev
143 - libexpat1-dev
144 - libx11-xcb-dev
145 - libelf-dev
146 - env:
147 - LABEL="scons LLVM"
148 - BUILD=scons
149 - SCONSFLAGS="-j4"
150 - SCONS_TARGET="llvm=1"
151 # Keep it symmetrical to the make build.
152 - SCONS_CHECK_COMMAND="scons llvm=1 check"
153 - LLVM_VERSION=3.3
154 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
155 addons:
156 apt:
157 packages:
158 - scons
159 # LLVM packaging is broken and misses these dependencies
160 - libedit-dev
161 - llvm-3.3-dev
162 # Common
163 - x11proto-xf86vidmode-dev
164 - libexpat1-dev
165 - libx11-xcb-dev
166 - libelf-dev
167 - env:
168 - LABEL="scons SWR"
169 - BUILD=scons
170 - SCONSFLAGS="-j4"
171 - SCONS_TARGET="swr=1"
172 - LLVM_VERSION=3.9
173 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
174 # Keep it symmetrical to the make build. There's no actual SWR, yet.
175 - SCONS_CHECK_COMMAND="true"
176 - OVERRIDE_CC="gcc-5"
177 - OVERRIDE_CXX="g++-5"
178 addons:
179 apt:
180 sources:
181 - ubuntu-toolchain-r-test
182 - llvm-toolchain-trusty-3.9
183 packages:
184 - scons
185 # LLVM packaging is broken and misses these dependencies
186 - libedit-dev
187 # From sources above
188 - g++-5
189 - llvm-3.9-dev
190 # Common
191 - x11proto-xf86vidmode-dev
192 - libexpat1-dev
193 - libx11-xcb-dev
194 - libelf-dev
195
196 install:
197 - pip install --user mako
198
199 # Since libdrm gets updated in configure.ac regularly, try to pick up the
200 # latest version from there.
201 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
202 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
203 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
204 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
205 export LIBDRM_VERSION="libdrm-$new_ver";
206 fi;
207 done
208
209 # Install dependencies where we require specific versions (or where
210 # disallowed by Travis CI's package whitelisting).
211
212 - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
213 - tar -jxvf $XORGMACROS_VERSION.tar.bz2
214 - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
215
216 - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
217 - tar -jxvf $GLPROTO_VERSION.tar.bz2
218 - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
219
220 - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
221 - tar -jxvf $DRI2PROTO_VERSION.tar.bz2
222 - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
223
224 - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
225 - tar -jxvf $XCBPROTO_VERSION.tar.bz2
226 - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
227
228 - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
229 - tar -jxvf $LIBXCB_VERSION.tar.bz2
230 - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
231
232 - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
233 - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
234 - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
235
236 - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
237 - tar -jxvf $LIBDRM_VERSION.tar.bz2
238 - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
239
240 - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
241 - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
242 - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
243
244 # libtxc-dxtn uses the patented S3 Texture Compression
245 # algorithm. Therefore, we don't want to use this library but it is
246 # still possible through setting the USE_TXC_DXTN variable to yes in
247 # the travis web UI.
248 #
249 # According to Wikipedia, the patent expires on October 2, 2017:
250 # https://en.wikipedia.org/wiki/S3_Texture_Compression#Patent
251 - if test "x$USE_TXC_DXTN" = xyes; then
252 wget https://people.freedesktop.org/~cbrill/libtxc_dxtn/$LIBTXC_DXTN_VERSION.tar.bz2;
253 tar -jxvf $LIBTXC_DXTN_VERSION.tar.bz2;
254 (cd $LIBTXC_DXTN_VERSION && ./configure --prefix=$HOME/prefix && make install);
255 fi
256
257 # Generate the header since one is missing on the Travis instance
258 - mkdir -p linux
259 - printf "%s\n" \
260 "#ifndef _LINUX_MEMFD_H" \
261 "#define _LINUX_MEMFD_H" \
262 "" \
263 "#define __NR_memfd_create 319" \
264 "#define SYS_memfd_create __NR_memfd_create" \
265 "" \
266 "#define MFD_CLOEXEC 0x0001U" \
267 "#define MFD_ALLOW_SEALING 0x0002U" \
268 "" \
269 "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
270
271 script:
272 - if test "x$BUILD" = xmake; then
273 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
274 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
275 export CC="$CC -isystem`pwd`";
276
277 ./autogen.sh --enable-debug
278 $DRI_LOADERS
279 --with-dri-drivers=$DRI_DRIVERS
280 --with-gallium-drivers=$GALLIUM_DRIVERS
281 --with-vulkan-drivers=$VULKAN_DRIVERS
282 --disable-llvm-shared-libs
283 &&
284 make && eval $MAKE_CHECK_COMMAND;
285 fi
286
287 - if test "x$BUILD" = xscons; then
288 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
289 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
290 scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
291 fi