forked from ryo-currency/ryo-currency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
216 lines (210 loc) · 5.49 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
language: cpp
sudo: required
cache:
apt: true
os: linux
addons:
apt:
update: true
sources:
- sourceline: 'ppa:mhier/libboost-latest'
packages:
- boost1.67
matrix:
include:
- name: g++-4.9 daemon
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env:
- COMPILERS="CC=gcc-4.9 CXX=g++-4.9"
- COMPILE=main
- name: g++-4.9 test
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env:
- COMPILERS="CC=gcc-4.9 CXX=g++-4.9"
- COMPILE=tests
- name: g++-5 daemon
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- COMPILERS="CC=gcc-5 CXX=g++-5"
- COMPILE=main
- name: g++-5 test
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- COMPILERS="CC=gcc-5 CXX=g++-5"
- COMPILE=tests
- name: g++-6 daemon
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- COMPILERS="CC=gcc-6 CXX=g++-6"
- COMPILE=main
- name: g++-6 test
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- COMPILERS="CC=gcc-6 CXX=g++-6"
- COMPILE=tests
- name: g++-7 daemon
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- COMPILERS="CC=gcc-7 CXX=g++-7"
- COMPILE=main
- name: g++-7 test
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- COMPILERS="CC=gcc-7 CXX=g++-7"
- COMPILE=tests
- name: g++-8 daemon
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env:
- COMPILERS="CC=gcc-8 CXX=g++-8"
- COMPILE=main
- name: g++-8 test
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env:
- COMPILERS="CC=gcc-8 CXX=g++-8"
- COMPILE=tests
- name: clang-3.9 daemon
addons:
apt:
sources:
- llvm-toolchain-precise-3.9
packages:
- clang-3.9
env:
- COMPILERS="CC=clang-3.9 CXX=clang++-3.9"
- COMPILE=main
- name: clang-3.9 test
addons:
apt:
sources:
- llvm-toolchain-precise-3.9
packages:
- clang-3.9
env:
- COMPILERS="CC=clang-3.9 CXX=clang++-3.9"
- COMPILE=tests
- name: clang-5.0 daemon
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- COMPILERS="CC=clang-5.0 CXX=clang++-5.0"
- COMPILE=main
- name: clang-5.0 test
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- COMPILERS="CC=clang-5.0 CXX=clang++-5.0"
- COMPILE=tests
install:
- eval "${COMPILERS}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
export NUMBER_OF_CPUS="$(grep -c '^processor' /proc/cpuinfo)";
elif [ "$TRAVIS_OS_NAME" == "osx" ] ; then
export NUMBER_OF_CPUS="$(sysctl -n hw.logicalcpu_max)";
fi
- if [ $TRAVIS_OS_NAME = linux ] ; then
sudo add-apt-repository ppa:ondrej/php -y;
sudo add-apt-repository ppa:mhier/libboost-latest -y;
sudo apt-get update;
sudo apt-get install -y boost1.67;
sudo apt-get install -y build-essential cmake pkg-config;
sudo apt-get install -y libssl-dev libzmq3-dev libunbound-dev;
sudo apt-get install -y --allow-unauthenticated libsodium-dev;
sudo apt-get install -y libminiupnpc-dev libunwind8-dev liblzma-dev libreadline6-dev;
sudo apt-get install -y libldns-dev;
sudo apt-get install -y libgtest-dev;
sudo apt-get install -y libunwind8-dev;
fi
# clang 5.0 ships libunwind in own lib folder
- if [ "$CC" == "clang-5.0" ] ; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/clang-5.0.0/lib;
fi
script:
- eval "${COMPILERS}"
- cd $HOME
- |
if [ "$COMPILE" == "main" ] ; then
mkdir linux-x64-build &&
cd linux-x64-build &&
cmake -DCMAKE_INSTALL_PREFIX=$HOME/ryo-linux-x64-release -DARCH="x86-64" -DBUILD_64=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TAG="linux-x64-release" $TRAVIS_BUILD_DIR &&
make -j "$NUMBER_OF_CPUS" &&
make install &&
cd bin
# runtime tests are currently disabled because the help is exiting with error code 1
#for prog in $(find . -type f -executable)
#do
# echo "output of '$prog --help'"
# $prog --help
#done
elif [ "$COMPILE" == "tests" ] ; then
# compile tests
cd $HOME &&
mkdir linux-x64-tests-build &&
cd linux-x64-tests-build &&
cmake -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug $TRAVIS_BUILD_DIR &&
# build all tests
make -j "$NUMBER_OF_CPUS" &&
# run unit tests
cd tests &&
ctest -V
else
echo "not supported compile option '$COMPILE'"
exit 1
fi