blob: 23c4bb53d752f014636e8b228958100c262834ad [file] [log] [blame]
Eric Anholt1c0ac192015-11-23 16:25:29 -08001language: c
2
Rhys Kidd1572d112017-04-02 16:48:39 -04003sudo: required
Eric Anholt80a872f2016-08-18 13:12:18 -07004dist: trusty
Eric Anholt1c0ac192015-11-23 16:25:29 -08005
6cache:
7 directories:
8 - $HOME/.ccache
9
10addons:
11 apt:
12 packages:
13 - libdrm-dev
Eric Anholt1c0ac192015-11-23 16:25:29 -080014 - x11proto-xf86vidmode-dev
15 - libexpat1-dev
16 - libxcb-dri2-0-dev
17 - libx11-xcb-dev
Rhys Kidd1572d112017-04-02 16:48:39 -040018 # LLVM packaging is broken and misses these dependencies
Eric Anholt78ab62b2016-08-18 14:10:57 -070019 - libedit-dev
Rhys Kidd1572d112017-04-02 16:48:39 -040020 - libelf-dev
Eric Anholt18f8da72015-12-01 11:57:49 -080021 - scons
Eric Anholt1c0ac192015-11-23 16:25:29 -080022
23env:
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 Kiddcba80862017-01-12 23:06:34 -050033 - LIBDRM_VERSION=libdrm-2.4.74
Eric Anholt1c0ac192015-11-23 16:25:29 -080034 - XCBPROTO_VERSION=xcb-proto-1.11
35 - LIBXCB_VERSION=libxcb-1.11
36 - LIBXSHMFENCE_VERSION=libxshmfence-1.2
Rhys Kidd1572d112017-04-02 16:48:39 -040037 - LLVM_VERSION=3.9
38 - LLVM_PACKAGE="llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev"
39 - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
Eric Anholt1c0ac192015-11-23 16:25:29 -080040 - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig
Emil Velikovbef4d742017-02-02 02:50:12 +000041 - MAKEFLAGS=-j2
Eric Anholt18f8da72015-12-01 11:57:49 -080042 matrix:
43 - BUILD=make
44 - BUILD=scons
Eric Anholt1c0ac192015-11-23 16:25:29 -080045
46install:
47 - export PATH="/usr/lib/ccache:$PATH"
48 - pip install --user mako
49
Eric Anholtecbc76c2016-08-18 12:29:31 -070050 # Since libdrm gets updated in configure.ac regularly, try to pick up the
51 # latest version from there.
Emil Velikov96d86b12017-02-01 22:30:25 +000052 - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
Eric Anholtecbc76c2016-08-18 12:29:31 -070053 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 Anholt1c0ac192015-11-23 16:25:29 -080060 # 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 Velikov30267172017-02-01 22:30:26 +000097 - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
Eric Anholt1c0ac192015-11-23 16:25:29 -080098
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 Kidd1572d112017-04-02 16:48:39 -0400103 # 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 Anholt1c0ac192015-11-23 16:25:29 -0800112script:
Eric Anholt18f8da72015-12-01 11:57:49 -0800113 - if test "x$BUILD" = xmake; then
114 ./autogen.sh --enable-debug
Eric Anholt18f8da72015-12-01 11:57:49 -0800115 --with-egl-platforms=x11,drm
116 --with-dri-drivers=i915,i965,radeon,r200,swrast,nouveau
Rhys Kidd115e6842017-04-04 23:56:04 -0400117 --with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx
Rhys Kidd787ab422017-04-04 23:58:59 -0400118 --with-vulkan-drivers=radeon
Eric Anholt78ab62b2016-08-18 14:10:57 -0700119 --disable-llvm-shared-libs
Eric Anholt18f8da72015-12-01 11:57:49 -0800120 ;
121 make && make check;
122 elif test x$BUILD = xscons; then
Emil Velikovaf9a4d92017-02-16 14:09:41 +0000123 scons llvm=1 && scons llvm=1 check;
Eric Anholt18f8da72015-12-01 11:57:49 -0800124 fi