Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 1 | language: c |
| 2 | |
Andres Gomez | 7819d26 | 2017-04-05 20:27:30 +0300 | [diff] [blame] | 3 | sudo: false |
Eric Anholt | 80a872f | 2016-08-18 13:12:18 -0700 | [diff] [blame] | 4 | dist: trusty |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 5 | |
| 6 | cache: |
Emil Velikov | 486f28b | 2017-04-06 16:36:59 +0100 | [diff] [blame] | 7 | apt: true |
Emil Velikov | 6431b98 | 2017-04-06 14:02:38 +0100 | [diff] [blame] | 8 | ccache: true |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 9 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 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 |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 17 | - LIBPCIACCESS_VERSION=libpciaccess-0.13.4 |
Rhys Kidd | cba8086 | 2017-01-12 23:06:34 -0500 | [diff] [blame] | 18 | - LIBDRM_VERSION=libdrm-2.4.74 |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 19 | - XCBPROTO_VERSION=xcb-proto-1.11 |
| 20 | - LIBXCB_VERSION=libxcb-1.11 |
| 21 | - LIBXSHMFENCE_VERSION=libxshmfence-1.2 |
Andres Gomez | 29322da | 2017-04-07 15:16:21 +0300 | [diff] [blame] | 22 | - LIBTXC_DXTN_VERSION=libtxc_dxtn-1.0.1 |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 23 | - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig |
Emil Velikov | cb820da | 2017-04-06 13:32:36 +0100 | [diff] [blame] | 24 | - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH" |
Emil Velikov | 56ba252 | 2017-04-06 14:38:40 +0100 | [diff] [blame] | 25 | |
| 26 | matrix: |
| 27 | include: |
| 28 | - env: |
| 29 | - LABEL="make" |
| 30 | - BUILD=make |
| 31 | - MAKEFLAGS=-j2 |
Emil Velikov | 85ee2c6 | 2017-04-06 14:41:44 +0100 | [diff] [blame] | 32 | - LLVM_VERSION=3.9 |
| 33 | - LLVM_CONFIG="llvm-config-${LLVM_VERSION}" |
Emil Velikov | 8479fd8 | 2017-04-06 18:01:19 +0100 | [diff] [blame^] | 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" |
Emil Velikov | 85ee2c6 | 2017-04-06 14:41:44 +0100 | [diff] [blame] | 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: |
Emil Velikov | 8479fd8 | 2017-04-06 18:01:19 +0100 | [diff] [blame^] | 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: |
Emil Velikov | 85ee2c6 | 2017-04-06 14:41:44 +0100 | [diff] [blame] | 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 |
Emil Velikov | 56ba252 | 2017-04-06 14:38:40 +0100 | [diff] [blame] | 96 | - env: |
| 97 | - LABEL="scons LLVM" |
| 98 | - BUILD=scons |
| 99 | - SCONSFLAGS="-j4" |
| 100 | - SCONS_TARGET="llvm=1" |
Emil Velikov | 85ee2c6 | 2017-04-06 14:41:44 +0100 | [diff] [blame] | 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 |
Emil Velikov | f55d98a | 2017-04-06 16:23:21 +0100 | [diff] [blame] | 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 |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 141 | |
| 142 | install: |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 143 | - pip install --user mako |
| 144 | |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 145 | # Since libdrm gets updated in configure.ac regularly, try to pick up the |
| 146 | # latest version from there. |
Emil Velikov | 96d86b1 | 2017-02-01 22:30:25 +0000 | [diff] [blame] | 147 | - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 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 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 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 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 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 |
Emil Velikov | 3026717 | 2017-02-01 22:30:26 +0000 | [diff] [blame] | 184 | - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install) |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 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 | |
Andres Gomez | 29322da | 2017-04-07 15:16:21 +0300 | [diff] [blame] | 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 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 203 | script: |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 204 | - if test "x$BUILD" = xmake; then |
Emil Velikov | 8479fd8 | 2017-04-06 18:01:19 +0100 | [diff] [blame^] | 205 | test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC"; |
| 206 | test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX"; |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 207 | ./autogen.sh --enable-debug |
Emil Velikov | 7748c3f | 2017-04-17 13:29:41 +0100 | [diff] [blame] | 208 | --with-platforms=x11,drm |
Emil Velikov | 8479fd8 | 2017-04-06 18:01:19 +0100 | [diff] [blame^] | 209 | --with-dri-drivers=$DRI_DRIVERS |
| 210 | --with-gallium-drivers=$GALLIUM_DRIVERS |
| 211 | --with-vulkan-drivers=$VULKAN_DRIVERS |
Eric Anholt | 78ab62b | 2016-08-18 14:10:57 -0700 | [diff] [blame] | 212 | --disable-llvm-shared-libs |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 213 | ; |
| 214 | make && make check; |
Emil Velikov | abcfea2 | 2017-04-06 14:23:36 +0100 | [diff] [blame] | 215 | fi |
| 216 | |
| 217 | - if test "x$BUILD" = xscons; then |
Emil Velikov | f55d98a | 2017-04-06 16:23:21 +0100 | [diff] [blame] | 218 | test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC"; |
| 219 | test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX"; |
Emil Velikov | 56ba252 | 2017-04-06 14:38:40 +0100 | [diff] [blame] | 220 | scons $SCONS_TARGET && scons $SCONS_TARGET check; |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 221 | fi |