OSDN Git Service

travis: split the make target to three separate ones
[android-x86/external-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       addons:
136         apt:
137           packages:
138             - scons
139             # Common
140             - x11proto-xf86vidmode-dev
141             - libexpat1-dev
142             - libx11-xcb-dev
143             - libelf-dev
144     - env:
145         - LABEL="scons LLVM"
146         - BUILD=scons
147         - SCONSFLAGS="-j4"
148         - SCONS_TARGET="llvm=1"
149         - LLVM_VERSION=3.3
150         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
151       addons:
152         apt:
153           packages:
154             - scons
155             # LLVM packaging is broken and misses these dependencies
156             - libedit-dev
157             - llvm-3.3-dev
158             # Common
159             - x11proto-xf86vidmode-dev
160             - libexpat1-dev
161             - libx11-xcb-dev
162             - libelf-dev
163     - env:
164         - LABEL="scons SWR"
165         - BUILD=scons
166         - SCONSFLAGS="-j4"
167         - SCONS_TARGET="swr=1"
168         - LLVM_VERSION=3.9
169         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
170         - OVERRIDE_CC="gcc-5"
171         - OVERRIDE_CXX="g++-5"
172       addons:
173         apt:
174           sources:
175             - ubuntu-toolchain-r-test
176             - llvm-toolchain-trusty-3.9
177           packages:
178             - scons
179             # LLVM packaging is broken and misses these dependencies
180             - libedit-dev
181             # From sources above
182             - g++-5
183             - llvm-3.9-dev
184             # Common
185             - x11proto-xf86vidmode-dev
186             - libexpat1-dev
187             - libx11-xcb-dev
188             - libelf-dev
189
190 install:
191   - pip install --user mako
192
193   # Since libdrm gets updated in configure.ac regularly, try to pick up the
194   # latest version from there.
195   - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
196       old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
197       new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
198       if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
199         export LIBDRM_VERSION="libdrm-$new_ver";
200       fi;
201     done
202
203   # Install dependencies where we require specific versions (or where
204   # disallowed by Travis CI's package whitelisting).
205
206   - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
207   - tar -jxvf $XORGMACROS_VERSION.tar.bz2
208   - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
209
210   - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
211   - tar -jxvf $GLPROTO_VERSION.tar.bz2
212   - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
213
214   - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
215   - tar -jxvf $DRI2PROTO_VERSION.tar.bz2
216   - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
217
218   - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
219   - tar -jxvf $XCBPROTO_VERSION.tar.bz2
220   - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
221
222   - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
223   - tar -jxvf $LIBXCB_VERSION.tar.bz2
224   - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
225
226   - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
227   - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
228   - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
229
230   - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
231   - tar -jxvf $LIBDRM_VERSION.tar.bz2
232   - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
233
234   - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
235   - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
236   - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
237
238   # libtxc-dxtn uses the patented S3 Texture Compression
239   # algorithm. Therefore, we don't want to use this library but it is
240   # still possible through setting the USE_TXC_DXTN variable to yes in
241   # the travis web UI.
242   #
243   # According to Wikipedia, the patent expires on October 2, 2017:
244   # https://en.wikipedia.org/wiki/S3_Texture_Compression#Patent
245   - if test "x$USE_TXC_DXTN" = xyes; then
246       wget https://people.freedesktop.org/~cbrill/libtxc_dxtn/$LIBTXC_DXTN_VERSION.tar.bz2;
247       tar -jxvf $LIBTXC_DXTN_VERSION.tar.bz2;
248       (cd $LIBTXC_DXTN_VERSION && ./configure --prefix=$HOME/prefix && make install);
249     fi
250
251   # Generate the header since one is missing on the Travis instance
252   - mkdir -p linux
253   - printf "%s\n" \
254            "#ifndef _LINUX_MEMFD_H" \
255            "#define _LINUX_MEMFD_H" \
256            "" \
257            "#define __NR_memfd_create 319" \
258            "#define SYS_memfd_create __NR_memfd_create" \
259            "" \
260            "#define MFD_CLOEXEC             0x0001U" \
261            "#define MFD_ALLOW_SEALING       0x0002U" \
262            "" \
263            "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
264
265 script:
266   - if test "x$BUILD" = xmake; then
267       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
268       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
269       export CC="$CC -isystem`pwd`";
270
271       ./autogen.sh --enable-debug
272         $DRI_LOADERS
273         --with-dri-drivers=$DRI_DRIVERS
274         --with-gallium-drivers=$GALLIUM_DRIVERS
275         --with-vulkan-drivers=$VULKAN_DRIVERS
276         --disable-llvm-shared-libs
277         &&
278       make && eval $MAKE_CHECK_COMMAND;
279     fi
280
281   - if test "x$BUILD" = xscons; then
282       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
283       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
284       scons $SCONS_TARGET && scons $SCONS_TARGET check;
285     fi