travis: add "make swr" to the build matrix
[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"
30 - BUILD=make
31 - MAKEFLAGS=-j2
32 - LLVM_VERSION=3.9
33 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
34 - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
35 - GALLIUM_DRIVERS="i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
36 - VULKAN_DRIVERS="radeon"
37 addons:
38 apt:
39 sources:
40 - llvm-toolchain-trusty-3.9
41 packages:
42 # LLVM packaging is broken and misses these dependencies
43 - libedit-dev
44 # From sources above
45 - llvm-3.9-dev
46 # Common
47 - x11proto-xf86vidmode-dev
48 - libexpat1-dev
49 - libx11-xcb-dev
50 - libelf-dev
51 - env:
52 # NOTE: Building SWR is 2x (yes two) times slower than all the other
53 # gallium drivers combined.
54 # Start this early so that it doesn't hunder the run time.
55 - LABEL="make Gallium Drivers SWR"
56 - BUILD=make
57 - MAKEFLAGS=-j2
58 - LLVM_VERSION=3.9
59 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
60 - OVERRIDE_CC="gcc-5"
61 - OVERRIDE_CXX="g++-5"
62 - DRI_DRIVERS=""
63 - GALLIUM_DRIVERS="swr"
64 - VULKAN_DRIVERS=""
65 addons:
66 apt:
67 sources:
68 - ubuntu-toolchain-r-test
69 - llvm-toolchain-trusty-3.9
70 packages:
71 # LLVM packaging is broken and misses these dependencies
72 - libedit-dev
73 # From sources above
74 - g++-5
75 - llvm-3.9-dev
76 # Common
77 - x11proto-xf86vidmode-dev
78 - libexpat1-dev
79 - libx11-xcb-dev
80 - libelf-dev
81 - env:
82 - LABEL="scons"
83 - BUILD=scons
84 - SCONSFLAGS="-j4"
85 # Explicitly disable.
86 - SCONS_TARGET="llvm=0"
87 addons:
88 apt:
89 packages:
90 - scons
91 # Common
92 - x11proto-xf86vidmode-dev
93 - libexpat1-dev
94 - libx11-xcb-dev
95 - libelf-dev
96 - env:
97 - LABEL="scons LLVM"
98 - BUILD=scons
99 - SCONSFLAGS="-j4"
100 - SCONS_TARGET="llvm=1"
101 - LLVM_VERSION=3.3
102 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
103 addons:
104 apt:
105 packages:
106 - scons
107 # LLVM packaging is broken and misses these dependencies
108 - libedit-dev
109 - llvm-3.3-dev
110 # Common
111 - x11proto-xf86vidmode-dev
112 - libexpat1-dev
113 - libx11-xcb-dev
114 - libelf-dev
115 - env:
116 - LABEL="scons SWR"
117 - BUILD=scons
118 - SCONSFLAGS="-j4"
119 - SCONS_TARGET="swr=1"
120 - LLVM_VERSION=3.9
121 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
122 - OVERRIDE_CC="gcc-5"
123 - OVERRIDE_CXX="g++-5"
124 addons:
125 apt:
126 sources:
127 - ubuntu-toolchain-r-test
128 - llvm-toolchain-trusty-3.9
129 packages:
130 - scons
131 # LLVM packaging is broken and misses these dependencies
132 - libedit-dev
133 # From sources above
134 - g++-5
135 - llvm-3.9-dev
136 # Common
137 - x11proto-xf86vidmode-dev
138 - libexpat1-dev
139 - libx11-xcb-dev
140 - libelf-dev
141
142 install:
143 - pip install --user mako
144
145 # Since libdrm gets updated in configure.ac regularly, try to pick up the
146 # latest version from there.
147 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
148 old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
149 new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
150 if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
151 export LIBDRM_VERSION="libdrm-$new_ver";
152 fi;
153 done
154
155 # Install dependencies where we require specific versions (or where
156 # disallowed by Travis CI's package whitelisting).
157
158 - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
159 - tar -jxvf $XORGMACROS_VERSION.tar.bz2
160 - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
161
162 - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
163 - tar -jxvf $GLPROTO_VERSION.tar.bz2
164 - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
165
166 - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
167 - tar -jxvf $DRI2PROTO_VERSION.tar.bz2
168 - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
169
170 - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
171 - tar -jxvf $XCBPROTO_VERSION.tar.bz2
172 - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
173
174 - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
175 - tar -jxvf $LIBXCB_VERSION.tar.bz2
176 - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
177
178 - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
179 - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
180 - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
181
182 - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
183 - tar -jxvf $LIBDRM_VERSION.tar.bz2
184 - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
185
186 - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
187 - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
188 - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
189
190 # libtxc-dxtn uses the patented S3 Texture Compression
191 # algorithm. Therefore, we don't want to use this library but it is
192 # still possible through setting the USE_TXC_DXTN variable to yes in
193 # the travis web UI.
194 #
195 # According to Wikipedia, the patent expires on October 2, 2017:
196 # https://en.wikipedia.org/wiki/S3_Texture_Compression#Patent
197 - if test "x$USE_TXC_DXTN" = xyes; then
198 wget https://people.freedesktop.org/~cbrill/libtxc_dxtn/$LIBTXC_DXTN_VERSION.tar.bz2;
199 tar -jxvf $LIBTXC_DXTN_VERSION.tar.bz2;
200 (cd $LIBTXC_DXTN_VERSION && ./configure --prefix=$HOME/prefix && make install);
201 fi
202
203 script:
204 - if test "x$BUILD" = xmake; then
205 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
206 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
207 ./autogen.sh --enable-debug
208 --with-platforms=x11,drm
209 --with-dri-drivers=$DRI_DRIVERS
210 --with-gallium-drivers=$GALLIUM_DRIVERS
211 --with-vulkan-drivers=$VULKAN_DRIVERS
212 --disable-llvm-shared-libs
213 ;
214 make && make check;
215 fi
216
217 - if test "x$BUILD" = xscons; then
218 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
219 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
220 scons $SCONS_TARGET && scons $SCONS_TARGET check;
221 fi