Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 1 | language: c |
| 2 | |
Rhys Kidd | 1572d11 | 2017-04-02 16:48:39 -0400 | [diff] [blame^] | 3 | sudo: required |
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: |
| 7 | directories: |
| 8 | - $HOME/.ccache |
| 9 | |
| 10 | addons: |
| 11 | apt: |
| 12 | packages: |
| 13 | - libdrm-dev |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 14 | - x11proto-xf86vidmode-dev |
| 15 | - libexpat1-dev |
| 16 | - libxcb-dri2-0-dev |
| 17 | - libx11-xcb-dev |
Rhys Kidd | 1572d11 | 2017-04-02 16:48:39 -0400 | [diff] [blame^] | 18 | # LLVM packaging is broken and misses these dependencies |
Eric Anholt | 78ab62b | 2016-08-18 14:10:57 -0700 | [diff] [blame] | 19 | - libedit-dev |
Rhys Kidd | 1572d11 | 2017-04-02 16:48:39 -0400 | [diff] [blame^] | 20 | - libelf-dev |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 21 | - scons |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 22 | |
| 23 | env: |
| 24 | global: |
| 25 | - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual |
| 26 | - XCB_RELEASES=http://xcb.freedesktop.org/dist |
| 27 | - XORGMACROS_VERSION=util-macros-1.19.0 |
| 28 | - GLPROTO_VERSION=glproto-1.4.17 |
| 29 | - DRI2PROTO_VERSION=dri2proto-2.8 |
| 30 | - DRI3PROTO_VERSION=dri3proto-1.0 |
| 31 | - PRESENTPROTO_VERSION=presentproto-1.0 |
| 32 | - LIBPCIACCESS_VERSION=libpciaccess-0.13.4 |
Rhys Kidd | cba8086 | 2017-01-12 23:06:34 -0500 | [diff] [blame] | 33 | - LIBDRM_VERSION=libdrm-2.4.74 |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 34 | - XCBPROTO_VERSION=xcb-proto-1.11 |
| 35 | - LIBXCB_VERSION=libxcb-1.11 |
| 36 | - LIBXSHMFENCE_VERSION=libxshmfence-1.2 |
Rhys Kidd | 1572d11 | 2017-04-02 16:48:39 -0400 | [diff] [blame^] | 37 | - LLVM_VERSION=3.9 |
| 38 | - LLVM_PACKAGE="llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev" |
| 39 | - LLVM_CONFIG="llvm-config-${LLVM_VERSION}" |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 40 | - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig |
Emil Velikov | bef4d74 | 2017-02-02 02:50:12 +0000 | [diff] [blame] | 41 | - MAKEFLAGS=-j2 |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 42 | matrix: |
| 43 | - BUILD=make |
| 44 | - BUILD=scons |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 45 | |
| 46 | install: |
| 47 | - export PATH="/usr/lib/ccache:$PATH" |
| 48 | - pip install --user mako |
| 49 | |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 50 | # Since libdrm gets updated in configure.ac regularly, try to pick up the |
| 51 | # latest version from there. |
Emil Velikov | 96d86b1 | 2017-02-01 22:30:25 +0000 | [diff] [blame] | 52 | - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do |
Eric Anholt | ecbc76c | 2016-08-18 12:29:31 -0700 | [diff] [blame] | 53 | old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`; |
| 54 | new_ver=`echo $line | sed 's/.*REQUIRED=//'`; |
| 55 | if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then |
| 56 | export LIBDRM_VERSION="libdrm-$new_ver"; |
| 57 | fi; |
| 58 | done |
| 59 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 60 | # Install dependencies where we require specific versions (or where |
| 61 | # disallowed by Travis CI's package whitelisting). |
| 62 | |
| 63 | - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2 |
| 64 | - tar -jxvf $XORGMACROS_VERSION.tar.bz2 |
| 65 | - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 66 | |
| 67 | - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2 |
| 68 | - tar -jxvf $GLPROTO_VERSION.tar.bz2 |
| 69 | - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 70 | |
| 71 | - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2 |
| 72 | - tar -jxvf $DRI2PROTO_VERSION.tar.bz2 |
| 73 | - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 74 | |
| 75 | - wget $XORG_RELEASES/proto/$DRI3PROTO_VERSION.tar.bz2 |
| 76 | - tar -jxvf $DRI3PROTO_VERSION.tar.bz2 |
| 77 | - (cd $DRI3PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 78 | |
| 79 | - wget $XORG_RELEASES/proto/$PRESENTPROTO_VERSION.tar.bz2 |
| 80 | - tar -jxvf $PRESENTPROTO_VERSION.tar.bz2 |
| 81 | - (cd $PRESENTPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 82 | |
| 83 | - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2 |
| 84 | - tar -jxvf $XCBPROTO_VERSION.tar.bz2 |
| 85 | - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 86 | |
| 87 | - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2 |
| 88 | - tar -jxvf $LIBXCB_VERSION.tar.bz2 |
| 89 | - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 90 | |
| 91 | - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2 |
| 92 | - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2 |
| 93 | - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 94 | |
| 95 | - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2 |
| 96 | - tar -jxvf $LIBDRM_VERSION.tar.bz2 |
Emil Velikov | 3026717 | 2017-02-01 22:30:26 +0000 | [diff] [blame] | 97 | - (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] | 98 | |
| 99 | - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2 |
| 100 | - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2 |
| 101 | - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install) |
| 102 | |
Rhys Kidd | 1572d11 | 2017-04-02 16:48:39 -0400 | [diff] [blame^] | 103 | # Install LLVM directly via apt-get (not Travis-CI's apt addon) |
| 104 | # See https://github.com/travis-ci/apt-source-whitelist/pull/205#issuecomment-216054237 |
| 105 | |
| 106 | - wget -nv -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - |
| 107 | - sudo apt-add-repository -y 'deb http://llvm.org/apt/trusty llvm-toolchain-trusty-3.9 main' |
| 108 | - sudo apt-add-repository -y 'deb http://llvm.org/apt/trusty llvm-toolchain-trusty main' |
| 109 | - sudo apt-get update -qq |
| 110 | - sudo apt-get install -qq -y $LLVM_PACKAGE |
| 111 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 112 | script: |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 113 | - if test "x$BUILD" = xmake; then |
| 114 | ./autogen.sh --enable-debug |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 115 | --with-egl-platforms=x11,drm |
| 116 | --with-dri-drivers=i915,i965,radeon,r200,swrast,nouveau |
Emil Velikov | 3026717 | 2017-02-01 22:30:26 +0000 | [diff] [blame] | 117 | --with-gallium-drivers=i915,nouveau,r300,r600,freedreno,svga,swrast,vc4,virgl,etnaviv,imx |
Eric Anholt | 78ab62b | 2016-08-18 14:10:57 -0700 | [diff] [blame] | 118 | --disable-llvm-shared-libs |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 119 | ; |
| 120 | make && make check; |
| 121 | elif test x$BUILD = xscons; then |
Emil Velikov | af9a4d9 | 2017-02-16 14:09:41 +0000 | [diff] [blame] | 122 | scons llvm=1 && scons llvm=1 check; |
Eric Anholt | 18f8da7 | 2015-12-01 11:57:49 -0800 | [diff] [blame] | 123 | fi |