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}" |
| 34 | addons: |
| 35 | apt: |
| 36 | sources: |
| 37 | - llvm-toolchain-trusty-3.9 |
| 38 | packages: |
| 39 | # LLVM packaging is broken and misses these dependencies |
| 40 | - libedit-dev |
| 41 | # From sources above |
| 42 | - llvm-3.9-dev |
| 43 | # Common |
| 44 | - x11proto-xf86vidmode-dev |
| 45 | - libexpat1-dev |
| 46 | - libx11-xcb-dev |
| 47 | - libelf-dev |
| 48 | - env: |
| 49 | - LABEL="scons" |
| 50 | - BUILD=scons |
| 51 | - SCONSFLAGS="-j4" |
| 52 | # Explicitly disable. |
| 53 | - SCONS_TARGET="llvm=0" |
| 54 | addons: |
| 55 | apt: |
| 56 | packages: |
| 57 | - scons |
| 58 | # Common |
| 59 | - x11proto-xf86vidmode-dev |
| 60 | - libexpat1-dev |
| 61 | - libx11-xcb-dev |
| 62 | - libelf-dev |
Emil Velikov | 56ba252 | 2017-04-06 14:38:40 +0100 | [diff] [blame] | 63 | - env: |
| 64 | - LABEL="scons LLVM" |
| 65 | - BUILD=scons |
| 66 | - SCONSFLAGS="-j4" |
| 67 | - SCONS_TARGET="llvm=1" |
Emil Velikov | 85ee2c6 | 2017-04-06 14:41:44 +0100 | [diff] [blame] | 68 | - LLVM_VERSION=3.3 |
| 69 | - LLVM_CONFIG="llvm-config-${LLVM_VERSION}" |
| 70 | addons: |
| 71 | apt: |
| 72 | packages: |
| 73 | - scons |
| 74 | # LLVM packaging is broken and misses these dependencies |
| 75 | - libedit-dev |
| 76 | - llvm-3.3-dev |
| 77 | # Common |
| 78 | - x11proto-xf86vidmode-dev |
| 79 | - libexpat1-dev |
| 80 | - libx11-xcb-dev |
| 81 | - libelf-dev |
Emil Velikov | f55d98a | 2017-04-06 16:23:21 +0100 | [diff] [blame^] | 82 | - env: |
| 83 | - LABEL="scons SWR" |
| 84 | - BUILD=scons |
| 85 | - SCONSFLAGS="-j4" |
| 86 | - SCONS_TARGET="swr=1" |
| 87 | - LLVM_VERSION=3.9 |
| 88 | - LLVM_CONFIG="llvm-config-${LLVM_VERSION}" |
| 89 | - OVERRIDE_CC="gcc-5" |
| 90 | - OVERRIDE_CXX="g++-5" |
| 91 | addons: |
| 92 | apt: |
| 93 | sources: |
| 94 | - ubuntu-toolchain-r-test |
| 95 | - llvm-toolchain-trusty-3.9 |
| 96 | packages: |
| 97 | - scons |
| 98 | # LLVM packaging is broken and misses these dependencies |
| 99 | - libedit-dev |
| 100 | # From sources above |
| 101 | - g++-5 |
| 102 | - llvm-3.9-dev |
| 103 | # Common |
| 104 | - x11proto-xf86vidmode-dev |
| 105 | - libexpat1-dev |
| 106 | - libx11-xcb-dev |
| 107 | - libelf-dev |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 108 | |
| 109 | install: |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 110 | - pip install --user mako |
| 111 | |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 112 | # Since libdrm gets updated in configure.ac regularly, try to pick up the |
| 113 | # latest version from there. |
Emil Velikov | 96d86b1 | 2017-02-01 22:30:25 +0000 | [diff] [blame] | 114 | - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 115 | old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`; |
| 116 | new_ver=`echo $line | sed 's/.*REQUIRED=//'`; |
| 117 | if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then |
| 118 | export LIBDRM_VERSION="libdrm-$new_ver"; |
| 119 | fi; |
| 120 | done |
| 121 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 122 | # Install dependencies where we require specific versions (or where |
| 123 | # disallowed by Travis CI's package whitelisting). |
| 124 | |
| 125 | - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2 |
| 126 | - tar -jxvf $XORGMACROS_VERSION.tar.bz2 |
| 127 | - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 128 | |
| 129 | - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2 |
| 130 | - tar -jxvf $GLPROTO_VERSION.tar.bz2 |
| 131 | - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 132 | |
| 133 | - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2 |
| 134 | - tar -jxvf $DRI2PROTO_VERSION.tar.bz2 |
| 135 | - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 136 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 137 | - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2 |
| 138 | - tar -jxvf $XCBPROTO_VERSION.tar.bz2 |
| 139 | - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 140 | |
| 141 | - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2 |
| 142 | - tar -jxvf $LIBXCB_VERSION.tar.bz2 |
| 143 | - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 144 | |
| 145 | - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2 |
| 146 | - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2 |
| 147 | - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 148 | |
| 149 | - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2 |
| 150 | - tar -jxvf $LIBDRM_VERSION.tar.bz2 |
Emil Velikov | 3026717 | 2017-02-01 22:30:26 +0000 | [diff] [blame] | 151 | - (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] | 152 | |
| 153 | - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2 |
| 154 | - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2 |
| 155 | - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 156 | |
Andres Gomez | 29322da | 2017-04-07 15:16:21 +0300 | [diff] [blame] | 157 | # libtxc-dxtn uses the patented S3 Texture Compression |
| 158 | # algorithm. Therefore, we don't want to use this library but it is |
| 159 | # still possible through setting the USE_TXC_DXTN variable to yes in |
| 160 | # the travis web UI. |
| 161 | # |
| 162 | # According to Wikipedia, the patent expires on October 2, 2017: |
| 163 | # https://en.wikipedia.org/wiki/S3_Texture_Compression#Patent |
| 164 | - if test "x$USE_TXC_DXTN" = xyes; then |
| 165 | wget https://people.freedesktop.org/~cbrill/libtxc_dxtn/$LIBTXC_DXTN_VERSION.tar.bz2; |
| 166 | tar -jxvf $LIBTXC_DXTN_VERSION.tar.bz2; |
| 167 | (cd $LIBTXC_DXTN_VERSION && ./configure --prefix=$HOME/prefix && make install); |
| 168 | fi |
| 169 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 170 | script: |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 171 | - if test "x$BUILD" = xmake; then |
| 172 | ./autogen.sh --enable-debug |
Emil Velikov | 7748c3f | 2017-04-17 13:29:41 +0100 | [diff] [blame] | 173 | --with-platforms=x11,drm |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 174 | --with-dri-drivers=i915,i965,radeon,r200,swrast,nouveau |
Rhys Kidd | 115e684 | 2017-04-04 23:56:04 -0400 | [diff] [blame] | 175 | --with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx |
Rhys Kidd | 787ab42 | 2017-04-04 23:58:59 -0400 | [diff] [blame] | 176 | --with-vulkan-drivers=radeon |
Eric Anholt | 78ab62b | 2016-08-18 14:10:57 -0700 | [diff] [blame] | 177 | --disable-llvm-shared-libs |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 178 | ; |
| 179 | make && make check; |
Emil Velikov | abcfea2 | 2017-04-06 14:23:36 +0100 | [diff] [blame] | 180 | fi |
| 181 | |
| 182 | - if test "x$BUILD" = xscons; then |
Emil Velikov | f55d98a | 2017-04-06 16:23:21 +0100 | [diff] [blame^] | 183 | test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC"; |
| 184 | test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX"; |
Emil Velikov | 56ba252 | 2017-04-06 14:38:40 +0100 | [diff] [blame] | 185 | scons $SCONS_TARGET && scons $SCONS_TARGET check; |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 186 | fi |