-
Notifications
You must be signed in to change notification settings - Fork 396
/
.travis.yml
219 lines (195 loc) · 7.79 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
217
218
219
language: cpp
dist: trusty
sudo: true
env:
global:
secure: FNZOWYO89qsT9kQKngrYbpnqCTMCSCSQ2rnZ3l17KHctOfS554TTDS+dfxPYz2XHm6azYDVcyBSs2gWJ6TmXZZZqEfr3X4VV4ooAa9PoeIkvVlT654zjZwxeXPYXrHFXZh/ImLUGWjsxRaUHYOv5SzyNGcZv07dtLKVd0ykhbH4=
matrix:
include:
- env: BUILD_TYPE=Debug ASAN=Off RUN_TEST=On EXCEPTIONS=On
os: osx
osx_image: xcode8
- env: BUILD_TYPE=Debug ASAN=Off LLVM_VERSION=3.8.0 RUN_TEST=On EXCEPTIONS=On
os: linux
compiler: clang
- env: BUILD_TYPE=Release ASAN=Off GCC_VERSION=4.9 RUN_TEST=On EXCEPTIONS=On
os: linux
compiler: gcc
addons:
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- env: BUILD_TYPE=Release ASAN=Off GCC_VERSION=7 RUN_TEST=On EXCEPTIONS=On
os: linux
compiler: gcc
addons: &gcc7
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- env: BUILD_TYPE=Debug ASAN=Off GCC_VERSION=8 RUN_TEST=On EXCEPTIONS=Off
os: linux
compiler: gcc
addons: &gcc8
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
- env: BUILD_TYPE=Release ASAN=Off GCC_VERSION=8 RUN_TEST=On EXCEPTIONS=On
os: linux
compiler: gcc
addons: &gcc8
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
- env: BUILD_TYPE=Debug ASAN=Off LLVM_VERSION=3.8.0 RUN_TEST=Off EXCEPTIONS=On PROJECT=doc PUBLISH_DOCS=On DOXYGEN_VERSION=1.8.11
os: linux
compiler: clang
addons:
apt:
packages:
- graphviz
sources:
- ubuntu-toolchain-r-test
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.0
- ${TRAVIS_BUILD_DIR}/deps/cmake-3.5.2
- ${TRAVIS_BUILD_DIR}/deps/doxygen-1.8.11
install:
############################################################################
# All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
############################################################################
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
############################################################################
# Install Clang, libc++ and libc++abi
############################################################################
- |
if [[ "${LLVM_VERSION}" != "" ]]; then
LLVM_DIR=${DEPS_DIR}/llvm-${LLVM_VERSION}
if [[ -z "$(ls -A ${LLVM_DIR})" ]]; then
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
CLANG_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
mkdir -p ${LLVM_DIR} ${LLVM_DIR}/build ${LLVM_DIR}/projects/libcxx ${LLVM_DIR}/projects/libcxxabi ${LLVM_DIR}/clang
travis_retry wget --quiet -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}
travis_retry wget --quiet -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxx
travis_retry wget --quiet -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxxabi
travis_retry wget --quiet -O - ${CLANG_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/clang
(cd ${LLVM_DIR}/build && cmake .. -DCMAKE_INSTALL_PREFIX=${LLVM_DIR}/install -DCMAKE_CXX_COMPILER=clang++)
(cd ${LLVM_DIR}/build/projects/libcxx && make install -j2)
(cd ${LLVM_DIR}/build/projects/libcxxabi && make install -j2)
fi
export CXXFLAGS="-nostdinc++ -isystem ${LLVM_DIR}/install/include/c++/v1"
export LDFLAGS="-L ${LLVM_DIR}/install/lib -l c++ -l c++abi"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_DIR}/install/lib"
export PATH="${LLVM_DIR}/clang/bin:${PATH}"
$LLVM_DIR/clang/bin/clang++ --version
fi
############################################################################
# Use gcc
############################################################################
- |
if [ -n "$GCC_VERSION" ]; then
export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}";
g++-${GCC_VERSION} --version
fi
- $CXX --version
############################################################################
# Install a recent Doxygen
############################################################################
- |
if [ -n "$DOXYGEN_VERSION" ]; then
DOXYGEN_DIR=${DEPS_DIR}/doxygen-${DOXYGEN_VERSION}
if [[ -z "$(ls -A ${DOXYGEN_DIR})" ]]; then
DOXYGEN_URL="https://downloads.sourceforge.net/doxygen/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
mkdir -p ${DOXYGEN_DIR} && travis_retry wget --quiet -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C ${DOXYGEN_DIR}
fi
export PATH=${DOXYGEN_DIR}/bin:${PATH}
doxygen --version
fi
############################################################################
# Install a recent CMake (unless already installed on OS X)
############################################################################
- |
if [ -z "$CMAKE_VERSION" ]; then
CMAKE_VERSION=3.5.2;
fi;
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_DIR=${DEPS_DIR}/cmake-${CMAKE_VERSION}
if [[ -z "$(ls -A ${CMAKE_DIR})" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
mkdir -p ${CMAKE_DIR} && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR}
fi
export PATH=${CMAKE_DIR}/bin:${PATH}
else
if ! brew ls --version cmake &>/dev/null; then brew install cmake; fi
fi
cmake --version
before_script:
- |
if [ -z "$BUILD_TYPE" ]; then
BUILD_TYPE=Release;
fi;
if [ -z "$EXCEPTIONS" ]; then
EXCEPTIONS=On;
fi;
if [[ "${ASAN}" == "On" ]]; then
export CXXFLAGS="${CXXFLAGS} -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow";
fi;
if [ -n "$LLVM_VERSION" ]; then
export CXXFLAGS="${CXXFLAGS} -D__extern_always_inline=inline";
fi;
############################################################################
# generate build
############################################################################
- cd ${TRAVIS_BUILD_DIR}
- cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DRX_USE_EXCEPTIONS=${EXCEPTIONS}
script:
############################################################################
# Run build
############################################################################
- make VERBOSE=1 $PROJECT
############################################################################
# Test build
############################################################################
- cd build/test/
- if [[ "${RUN_TEST}" == "On" ]]; then ctest -V; fi
- cd ../../
after_success:
############################################################################
# Publish documentation
############################################################################
- |
if [[ "${PUBLISH_DOCS}" == "On" ]]; then
sh projects/scripts/travis-doxygen.sh;
fi;
branches:
only:
- main
notifications:
email:
recipients:
on_success: always
on_failure: always
slack: reactivex:eq4FFCchRIzufO2ZmpuuiJ9E
webhooks:
urls:
- https://webhooks.gitter.im/e/fcf05f21f5d4102e12e7
deploy:
- provider: releases
api_key:
secure: sMyo0U4WxZ0kOlQ9SzKfeuU2/5y0Ngt8A0B0N6bb0TcGIyLhQv2q216Q+T0rkQKc04WnLY0Vr1/q9LonAA46nGq7zAiWcC3TY0zVUKRmKWrotQb/QqW1tvVEARKwG7CO+HCcGT3XCeM69XA/L7WiXRskTxS1+5Vy46/tVZBKofg=
file: ''
on:
tags: true
repo: Reactive-Extensions/RxCpp