-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy path.travis.yml
30 lines (27 loc) · 1.75 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
language: cpp
compiler:
- gcc
before_install:
# Add software package repository, containing updated build toochain, i.e. GNU GCC 4.9
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
- sudo add-apt-repository ppa:kalakris/cmake --yes
- sudo apt-get update -qq
# Download boost 1.5 and extract the source archive
- wget --no-verbose --output-document=boost_1_56_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.bz2/download
- export BOOST_ROOT="$TRAVIS_BUILD_DIR/../boost"
- mkdir -p $BOOST_ROOT
- tar jxf boost_1_56_0.tar.bz2 --strip-components=1 -C $BOOST_ROOT
- wget http://www.us.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz
- export THRIFT_ROOT="$TRAVIS_BUILD_DIR/../thrift"
- mkdir -p $THRIFT_ROOT
- tar xf thrift-0.9.2.tar.gz --strip-components=1 -C $THRIFT_ROOT
install:
# Install GNU GCC 4.9 required by use of C++11
- sudo apt-get install -qq g++-4.9 gcc-4.9 libssl-dev zlib1g-dev cmake redis-server automake libtool flex bison pkg-config
- (sudo rm -f /usr/bin/gcc; sudo ln -sf /usr/bin/gcc-4.9 /usr/bin/gcc)
- (sudo rm -f /usr/bin/g++; sudo ln -sf /usr/bin/g++-4.9 /usr/bin/g++)
# Build boost libraries required by ledger
- (cd $BOOST_ROOT; ./bootstrap.sh --with-libraries=atomic,chrono,context,coroutine,iostreams,system,test,thread)
- (cd $BOOST_ROOT; sudo ./b2 threading=multi --prefix=/usr/local -d0 install)
- (cd $THRIFT_ROOT; ./configure --with-qt4=no --with-c_glib=no --with-csharp=no --with-java=no --with-erlang=no --with-nodejs=no --with-lua=no --with-python=no --with-perl=no --with-php=no --with-php_extensioo --with-ruby=no --with-haskell=no --with-go=no --with-d=no; sudo make -j4 install)
script: mkdir build && cd build && cmake ../ && make -j4 && make test