blob: 6548e85b767be6506b42b141a4179e7f05da4ef4 [file] [log] [blame]
Eric Anholt1c0ac192015-11-23 16:25:29 -08001language: c
2
Andres Gomez7819d262017-04-05 20:27:30 +03003sudo: false
Eric Anholt80a872f2016-08-18 13:12:18 -07004dist: trusty
Eric Anholt1c0ac192015-11-23 16:25:29 -08005
6cache:
Emil Velikov486f28b2017-04-06 16:36:59 +01007 apt: true
Emil Velikov6431b982017-04-06 14:02:38 +01008 ccache: true
Eric Anholt1c0ac192015-11-23 16:25:29 -08009
Eric Anholt1c0ac192015-11-23 16:25:29 -080010env:
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
Eric Anholt1c0ac192015-11-23 16:25:29 -080017 - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
Rhys Kiddcba80862017-01-12 23:06:34 -050018 - LIBDRM_VERSION=libdrm-2.4.74
Eric Anholt1c0ac192015-11-23 16:25:29 -080019 - XCBPROTO_VERSION=xcb-proto-1.11
20 - LIBXCB_VERSION=libxcb-1.11
21 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
Andres Gomez29322da2017-04-07 15:16:21 +030022 - LIBTXC_DXTN_VERSION=libtxc_dxtn-1.0.1
Eric Anholt1c0ac192015-11-23 16:25:29 -080023 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig
Emil Velikovcb820da2017-04-06 13:32:36 +010024 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
Emil Velikov56ba2522017-04-06 14:38:40 +010025
26matrix:
27 include:
28 - env:
29 - LABEL="make"
30 - BUILD=make
31 - MAKEFLAGS=-j2
Emil Velikov85ee2c62017-04-06 14:41:44 +010032 - LLVM_VERSION=3.9
33 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
Emil Velikov8479fd82017-04-06 18:01:19 +010034 - 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"
Emil Velikov85ee2c62017-04-06 14:41:44 +010037 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:
Emil Velikov8479fd82017-04-06 18:01:19 +010052 # 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:
Emil Velikov85ee2c62017-04-06 14:41:44 +010082 - 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
Emil Velikov56ba2522017-04-06 14:38:40 +010096 - env:
97 - LABEL="scons LLVM"
98 - BUILD=scons
99 - SCONSFLAGS="-j4"
100 - SCONS_TARGET="llvm=1"
Emil Velikov85ee2c62017-04-06 14:41:44 +0100101 - 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
Emil Velikovf55d98a2017-04-06 16:23:21 +0100115 - 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
Eric Anholt1c0ac192015-11-23 16:25:29 -0800141
142install:
Eric Anholt1c0ac192015-11-23 16:25:29 -0800143 - pip install --user mako
144
Eric Anholtecbc76c2016-08-18 12:29:31 -0700145 # Since libdrm gets updated in configure.ac regularly, try to pick up the
146 # latest version from there.
Emil Velikov96d86b12017-02-01 22:30:25 +0000147 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
Eric Anholtecbc76c2016-08-18 12:29:31 -0700148 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
Eric Anholt1c0ac192015-11-23 16:25:29 -0800155 # 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
Eric Anholt1c0ac192015-11-23 16:25:29 -0800170 - 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
Emil Velikov30267172017-02-01 22:30:26 +0000184 - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
Eric Anholt1c0ac192015-11-23 16:25:29 -0800185
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
Andres Gomez29322da2017-04-07 15:16:21 +0300190 # 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
Eric Anholt1c0ac192015-11-23 16:25:29 -0800203script:
Eric Anholt18f8da72015-12-01 11:57:49 -0800204 - if test "x$BUILD" = xmake; then
Emil Velikov8479fd82017-04-06 18:01:19 +0100205 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
206 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
Eric Anholt18f8da72015-12-01 11:57:49 -0800207 ./autogen.sh --enable-debug
Emil Velikov7748c3f2017-04-17 13:29:41 +0100208 --with-platforms=x11,drm
Emil Velikov8479fd82017-04-06 18:01:19 +0100209 --with-dri-drivers=$DRI_DRIVERS
210 --with-gallium-drivers=$GALLIUM_DRIVERS
211 --with-vulkan-drivers=$VULKAN_DRIVERS
Eric Anholt78ab62b2016-08-18 14:10:57 -0700212 --disable-llvm-shared-libs
Eric Anholt18f8da72015-12-01 11:57:49 -0800213 ;
214 make && make check;
Emil Velikovabcfea22017-04-06 14:23:36 +0100215 fi
216
217 - if test "x$BUILD" = xscons; then
Emil Velikovf55d98a2017-04-06 16:23:21 +0100218 test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
219 test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
Emil Velikov56ba2522017-04-06 14:38:40 +0100220 scons $SCONS_TARGET && scons $SCONS_TARGET check;
Eric Anholt18f8da72015-12-01 11:57:49 -0800221 fi