forked from matt-42/silicon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
142 lines (135 loc) · 3.99 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Use new trusty images, should yield newer compilers and packages
sudo: required
dist: trusty
language: cpp
matrix:
include:
- compiler: clang
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
- clang-5.0
- libstdc++-6-dev
env:
- LOCAL_CC=clang++-5.0
- LOCAL_CXX=clang++-5.0
- LOCAL_GCOV=llvm-cov
# - compiler: gcc
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-5
# env:
# - LOCAL_CXX=g++-5
# - LOCAL_GCOV=gcov-5
# - compiler: gcc
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-6
# env:
# - LOCAL_CXX=g++-6
# - LOCAL_GCOV=gcov-6
# - compiler: gcc
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-7
# env:
# - LOCAL_CXX=g++-7
# - LOCAL_GCOV=gcov-7
# - compiler: clang
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.6
# packages:
# - gcc-7 # just for the newer c++ headers
# - clang-3.6
# - llvm-3.6
# env:
# - LOCAL_CXX=clang++-3.6
# - LOCAL_GCOV=llvm-cov-3.6
# - compiler: clang
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.7
# packages:
# - gcc-7 # just for the newer c++ headers
# - clang-3.7
# - llvm-3.7
# env:
# - LOCAL_CXX=clang++-3.7
# - LOCAL_GCOV=llvm-cov-3.7
before_install:
- $LOCAL_CXX --version
- $LOCAL_GCOV --version
- sudo apt-get update -qq
# Install deps
- sudo apt-get install -qq libboost-all-dev libssl-dev lcov libsqlite3-dev
# Create env
- mkdir -p $HOME/build
# Install Rabbitmq-c
- cd $HOME/build
- git clone https://github.com/alanxz/rabbitmq-c.git
- mkdir -p rabbitmq-c/build
- cd rabbitmq-c/build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/local
- make -j 4 install
# Install libmicrohttpd
- cd $HOME/build
- wget http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.48.tar.gz
- tar xzf libmicrohttpd-0.9.48.tar.gz
- cd libmicrohttpd-0.9.48
- ./configure --prefix=$HOME/local
- make -j 4 install
# Install LWan (disabled for now)
#- cd $HOME/build
#- git clone git://github.com/lpereira/lwan
#- mkdir -p lwan/build
#- cd lwan/build
#- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/local
#- make -j 4 install
# Install Iod
- cd $HOME/build
- git clone https://github.com/matt-42/iod.git
- mkdir -p iod/build
- cd iod/build
- cmake .. -DCMAKE_CXX_COMPILER=${LOCAL_CXX} -DCMAKE_INSTALL_PREFIX=$HOME/local
- make -j 4 install
install:
# Install Silicon
- cd $HOME/build/$TRAVIS_REPO_SLUG
- mkdir -p build
- cd build
- cmake .. -DCMAKE_CXX_COMPILER=${LOCAL_CXX} -DCMAKE_INSTALL_PREFIX=$HOME/local
- make -j 4 install
before_script:
- cd $HOME/build/$TRAVIS_REPO_SLUG
- mkdir -p tests/build
- cd tests/build
- lcov --directory . --zerocounters
- cmake .. -DCMAKE_CXX_COMPILER=${LOCAL_CXX} -DCMAKE_INSTALL_PREFIX=$HOME/local
script:
- cd $HOME/build/$TRAVIS_REPO_SLUG/tests/build
- make all test
after_success:
- cd $HOME/build/$TRAVIS_REPO_SLUG/tests/build
- lcov --directory . --capture --gcov-tool `which $LOCAL_GCOV` --output-file coverage.info
- lcov --remove coverage.info 'tests/*' '/usr/*' --gcov-tool `which $LOCAL_GCOV` --output-file coverage.info
- lcov --list coverage.info
- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
after_script:
echo after_script