-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
122 lines (114 loc) · 3.87 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
language: cpp
sudo: required
dist: trusty
notifications:
on_success: change
on_failure: always
on_start: false
cache: ccache
matrix:
include:
- os: linux
env: USE_CC=gcc-4.9 USE_CXX=g++-4.9
addons: &gcc49
apt:
packages:
- libstdc++-5-dev
- libluajit-5.1-dev
sources:
- ubuntu-toolchain-r-test
install:
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.9 gdb
- os: linux
env: USE_CC=gcc-5 USE_CXX=g++-5
addons: &gcc5
apt:
packages:
- g++-5
- libstdc++-5-dev
- libluajit-5.1-dev
sources:
- ubuntu-toolchain-r-test
install:
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.9 gdb
- os: linux
env: USE_CC=/usr/local/bin/clang USE_CXX=/usr/local/bin/clang++ CLANG_VER=3.6.2
addons:
apt:
packages:
#- clang-3.6
- libluajit-5.1-dev
sources:
#- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
install:
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.9 gdb
- os: linux
env: USE_CC=/usr/local/bin/clang USE_CXX=/usr/local/bin/clang++ CLANG_VER=3.7.1
addons:
apt:
packages:
#- clang-3.6
- libluajit-5.1-dev
sources:
#- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
install:
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.9 gdb
- os: linux
env: USE_CC=/usr/local/bin/clang USE_CXX=/usr/local/bin/clang++ CLANG_VER=3.8.0
addons:
apt:
packages:
#- clang-3.6
- libluajit-5.1-dev
sources:
#- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
install:
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.9 gdb
before_install:
- if [ "$USE_CC" = "/usr/local/bin/clang" ]; then curl http://llvm.org/releases/$CLANG_VER/clang+llvm-$CLANG_VER-x86_64-linux-gnu-ubuntu-14.04.tar.xz | sudo tar xJ -C /usr/local --strip-components=1; fi
before_script:
- export CC=$USE_CC; export CXX=$USE_CXX
- export BUILD_ROOT=$(pwd)
- cd $HOME
- curl https://netcologne.dl.sourceforge.net/project/boost/boost/1.62.0/boost_1_62_0.tar.bz2 | tar xj
- pushd "boost_1_62_0"
- export GCC=$(which $CXX)
- echo -e "using gcc \x3a \x3a $GCC ;" > user-config.jam; cat user-config.jam
- ./bootstrap.sh --prefix=/usr/local/boost --with-libraries=fiber,context,thread,date_time,filesystem,system,program_options,test,atomic
- ./b2 -q -d0 --user-config=user-config.jam headers
- sudo ./b2 -q -d0 --user-config=user-config.jam cxxflags="-std=c++11 -fPIC" threading=multi link=static install
- popd
- curl -L https://github.com/tatsuhiro-t/nghttp2/releases/download/v1.7.0/nghttp2-1.7.0.tar.bz2 | tar xj
- pushd "nghttp2-1.7.0"
- ./configure --with-boost=/usr/local/boost --enable-asio-lib
- sudo make install
- popd
- cd $BUILD_ROOT
script:
- mkdir build && cd build
- cmake -DBOOST_ROOT=/usr/local/boost ..
- make
- export LD_LIBRARY_PATH=/usr/local/lib
- ldd src/petrel
- ctest --output-on-failure
# tests can be run in gdb to get stack traces using the script below:
#- echo "errors=0; count=0" > runtest.sh
#- echo "for t in test/test_*; do" >> runtest.sh
#- echo " let count=\$count+1" >> runtest.sh
#- echo " echo -e \"\nTest \$count (\$t)\"" >> runtest.sh
#- echo " gdb -batch -ex r -ex bt \$t" >> runtest.sh
#- echo " let errors=\$errors+\$?" >> runtest.sh
#- echo "done" >> runtest.sh
#- echo "echo -e \"\n\$errors out of \$count tests failed\"" >> runtest.sh
#- echo "if [ \$error -gt 0 ]; then" >> runtest.sh
#- echo " exit 1" >> runtest.sh
#- echo "fi" >> runtest.sh
#- bash runtest.sh