-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
55 lines (47 loc) · 2.21 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
language: cpp
compiler:
- gcc
# - clang
os:
- linux
- osx
before_install:
# g++4.8.1
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
# Get Clang 3.4
- if [ "$CXX" == "clang++" ]; then wget https://github.com/Viq111/travis-container-packets/releases/download/clang%2Blibcxx-3.4.2/clang_libcxx.tar.bz2; fi
- if [ "$CXX" == "clang++" ]; then tar -xjf clang_libcxx.tar.bz2; fi
- if [ "$CXX" == "clang++" ]; then rm clang_libcxx.tar.bz2 && mv clang_libcxx clang; fi
- if [ "$CXX" == "clang++" ]; then export PATH=$(pwd)/clang/bin:$PATH; fi
- if [ "$CXX" == "clang++" ]; then export LIBRARY_PATH=$(pwd)/clang/lib:$LIBRARY_PATH; fi
- if [ "$CXX" == "clang++" ]; then export LD_LIBRARY_PATH=$(pwd)/clang/lib:$LD_LIBRARY_PATH; fi
- if [ "$CXX" == "clang++" ]; then export CPLUS_INCLUDE_PATH=$(pwd)/clang/include/c++/v1:$CPLUS_INCLUDE_PATH; fi
- if [ "$CXX" == "clang++" ]; then export CXXFLAGS="-stdlib=libc++"; fi
- sudo apt-get update -qq
install:
# g++4.8.1
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
# Get boost
- wget https://github.com/Viq111/travis-container-packets/releases/download/boost-1.57.0/boost.tar.bz2
- tar -xjf boost.tar.bz2
- rm boost.tar.bz2
- export BOOST_ROOT=$(pwd)/boost
# Get CMake 3.1
- wget https://github.com/Viq111/travis-container-packets/releases/download/cmake-3.1.2/cmake.tar.bz2
- tar -xjf cmake.tar.bz2
- rm cmake.tar.bz2
- export PATH=$(pwd)/cmake/bin:$PATH
#thrift
- sudo apt-get update -qq
- sudo apt-get install libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
- wget http://mirror.netcologne.de/apache.org/thrift/0.9.2/thrift-0.9.2.tar.gz
- tar xfz thrift-0.9.2.tar.gz
- cd thrift-0.9.2 && ./configure --with-boost=$BOOST_ROOT --with-boost-libdir=$BOOST_ROOT/lib --with-c_glib=no --with-java=no --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-cpp=yes && sudo make install && cd ..
script:
- mkdir -p build || exit $?
- cd build || exit $?
- cmake .. || exit $?
- make all || exit $?
# - LD_LIBRARY_PATH=/usr/local/lib ./test_all || exit $?
- cd .. || exit $?