blob: 5f489a47fb7963ec49fbf425bae7c869e190edec [file] [log] [blame]
Eric Anholt1c0ac192015-11-23 16:25:29 -08001language: c
2
Eric Anholt80a872f2016-08-18 13:12:18 -07003sudo: true
4dist: trusty
Eric Anholt1c0ac192015-11-23 16:25:29 -08005
6cache:
7 directories:
8 - $HOME/.ccache
9
10addons:
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 Anholt78ab62b2016-08-18 14:10:57 -070019 - 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 Anholt18f8da72015-12-01 11:57:49 -080024 - scons
Eric Anholt1c0ac192015-11-23 16:25:29 -080025
26env:
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 Anholt18f8da72015-12-01 11:57:49 -080041 matrix:
42 - BUILD=make
43 - BUILD=scons
Eric Anholt1c0ac192015-11-23 16:25:29 -080044
45install:
46 - export PATH="/usr/lib/ccache:$PATH"
47 - pip install --user mako
48
Eric Anholtecbc76c2016-08-18 12:29:31 -070049 # 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 Anholt1c0ac192015-11-23 16:25:29 -080059 # 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 Anholt084678c2016-08-18 13:43:12 -070096 - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 && make install)
Eric Anholt1c0ac192015-11-23 16:25:29 -080097
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 Anholt1c0ac192015-11-23 16:25:29 -0800102script:
Eric Anholt18f8da72015-12-01 11:57:49 -0800103 - if test "x$BUILD" = xmake; then
104 ./autogen.sh --enable-debug
Eric Anholt18f8da72015-12-01 11:57:49 -0800105 --with-egl-platforms=x11,drm
106 --with-dri-drivers=i915,i965,radeon,r200,swrast,nouveau
Eric Anholt78ab62b2016-08-18 14:10:57 -0700107 --with-gallium-drivers=svga,swrast,vc4,virgl,r300,r600
108 --disable-llvm-shared-libs
Eric Anholt18f8da72015-12-01 11:57:49 -0800109 ;
110 make && make check;
111 elif test x$BUILD = xscons; then
112 scons;
113 fi