Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 1 | language: c |
| 2 | |
Eric Anholt | 80a872f | 2016-08-18 13:12:18 -0700 | [diff] [blame] | 3 | sudo: true |
| 4 | dist: trusty |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 5 | |
| 6 | cache: |
| 7 | directories: |
| 8 | - $HOME/.ccache |
| 9 | |
| 10 | addons: |
| 11 | apt: |
| 12 | packages: |
| 13 | - libdrm-dev |
| 14 | - libudev-dev |
| 15 | - x11proto-xf86vidmode-dev |
| 16 | - libexpat1-dev |
| 17 | - libxcb-dri2-0-dev |
| 18 | - libx11-xcb-dev |
Eric Anholt | 78ab62b | 2016-08-18 14:10:57 -0700 | [diff] [blame] | 19 | - llvm-3.5-dev |
| 20 | # llvm-config is not in the dev package? |
| 21 | - llvm-3.5 |
| 22 | # LLVM packaging is broken and misses this dep. |
| 23 | - libedit-dev |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 24 | - scons |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 25 | |
| 26 | env: |
| 27 | global: |
| 28 | - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual |
| 29 | - XCB_RELEASES=http://xcb.freedesktop.org/dist |
| 30 | - XORGMACROS_VERSION=util-macros-1.19.0 |
| 31 | - GLPROTO_VERSION=glproto-1.4.17 |
| 32 | - DRI2PROTO_VERSION=dri2proto-2.8 |
| 33 | - DRI3PROTO_VERSION=dri3proto-1.0 |
| 34 | - PRESENTPROTO_VERSION=presentproto-1.0 |
| 35 | - LIBPCIACCESS_VERSION=libpciaccess-0.13.4 |
| 36 | - LIBDRM_VERSION=libdrm-2.4.65 |
| 37 | - XCBPROTO_VERSION=xcb-proto-1.11 |
| 38 | - LIBXCB_VERSION=libxcb-1.11 |
| 39 | - LIBXSHMFENCE_VERSION=libxshmfence-1.2 |
| 40 | - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 41 | matrix: |
| 42 | - BUILD=make |
| 43 | - BUILD=scons |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 44 | |
| 45 | install: |
| 46 | - export PATH="/usr/lib/ccache:$PATH" |
| 47 | - pip install --user mako |
| 48 | |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 49 | # Since libdrm gets updated in configure.ac regularly, try to pick up the |
| 50 | # latest version from there. |
| 51 | - for line in `grep "^LIBDRM_.*_REQUIRED=" configure.ac`; do |
| 52 | old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`; |
| 53 | new_ver=`echo $line | sed 's/.*REQUIRED=//'`; |
| 54 | if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then |
| 55 | export LIBDRM_VERSION="libdrm-$new_ver"; |
| 56 | fi; |
| 57 | done |
| 58 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 59 | # Install dependencies where we require specific versions (or where |
| 60 | # disallowed by Travis CI's package whitelisting). |
| 61 | |
| 62 | - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2 |
| 63 | - tar -jxvf $XORGMACROS_VERSION.tar.bz2 |
| 64 | - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 65 | |
| 66 | - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2 |
| 67 | - tar -jxvf $GLPROTO_VERSION.tar.bz2 |
| 68 | - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 69 | |
| 70 | - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2 |
| 71 | - tar -jxvf $DRI2PROTO_VERSION.tar.bz2 |
| 72 | - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 73 | |
| 74 | - wget $XORG_RELEASES/proto/$DRI3PROTO_VERSION.tar.bz2 |
| 75 | - tar -jxvf $DRI3PROTO_VERSION.tar.bz2 |
| 76 | - (cd $DRI3PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 77 | |
| 78 | - wget $XORG_RELEASES/proto/$PRESENTPROTO_VERSION.tar.bz2 |
| 79 | - tar -jxvf $PRESENTPROTO_VERSION.tar.bz2 |
| 80 | - (cd $PRESENTPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 81 | |
| 82 | - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2 |
| 83 | - tar -jxvf $XCBPROTO_VERSION.tar.bz2 |
| 84 | - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 85 | |
| 86 | - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2 |
| 87 | - tar -jxvf $LIBXCB_VERSION.tar.bz2 |
| 88 | - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 89 | |
| 90 | - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2 |
| 91 | - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2 |
| 92 | - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 93 | |
| 94 | - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2 |
| 95 | - tar -jxvf $LIBDRM_VERSION.tar.bz2 |
Eric Anholt | 084678c | 2016-08-18 13:43:12 -0700 | [diff] [blame] | 96 | - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 && make install) |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 97 | |
| 98 | - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2 |
| 99 | - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2 |
| 100 | - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 101 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 102 | script: |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 103 | - if test "x$BUILD" = xmake; then |
| 104 | ./autogen.sh --enable-debug |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 105 | --with-egl-platforms=x11,drm |
| 106 | --with-dri-drivers=i915,i965,radeon,r200,swrast,nouveau |
Eric Anholt | 78ab62b | 2016-08-18 14:10:57 -0700 | [diff] [blame] | 107 | --with-gallium-drivers=svga,swrast,vc4,virgl,r300,r600 |
| 108 | --disable-llvm-shared-libs |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 109 | ; |
| 110 | make && make check; |
| 111 | elif test x$BUILD = xscons; then |
| 112 | scons; |
| 113 | fi |