This repository has been archived by the owner on May 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
146 lines (126 loc) · 5.67 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
language: c++
os: linux
sudo: false
branches:
only:
- master
matrix:
include:
- env: DOCUMENTATION=true COMPILER=clang++-3.7 STD=11 STDLIB=libc++ CONFIGURATION=Debug
addons: &clang37
apt:
sources:
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages: clang-3.7
- env: COMPILER=clang++-3.7 STD=11 STDLIB=libc++ CONFIGURATION=Release
addons: *clang37
- env: COMPILER=g++-5 STD=11 CONFIGURATION=Debug
addons: &gcc5
apt:
sources: ubuntu-toolchain-r-test
packages: g++-5
- env: COMPILER=g++-5 STD=11 CONFIGURATION=Release
addons: *gcc5
- env: COMPILER=clang++-3.7 STD=14 STDLIB=libc++ CONFIGURATION=Debug
addons: *clang37
- env: COMPILER=clang++-3.7 STD=14 STDLIB=libc++ CONFIGURATION=Release
addons: *clang37
- env: COMPILER=g++-5 STD=14 CONFIGURATION=Debug
addons: *gcc5
- env: COMPILER=g++-5 STD=14 CONFIGURATION=Release
addons: *gcc5
env:
matrix: COMPILER=clang++-3.7 STDLIB=libc++ VALGRIND=true
global:
- secure: "mDpSOuQ4tVkmqZPmqpd4VmRcHJmRlU2P4u9RlqVFnmpf1DO9lT8KlGB1sqr6qHJaGN6IYi6gDMhD3F8qNOW1ZlYO++76c/wSnLwVP/fx17uugcj21O4za61WqW3Xhkz/q8SNE7+HtXhcv4YTJ3+3UqLl9Qg/tb9K9q6bcLQonsvV74I8P+EPPuURM/Vkq/c6aoj7uqmB4YtKEtQ9LuswiyY2zl+Wa1oUL4BenbA4xMLAVbY2GoFH68TIUe4sW8geo11u+x1Ek2iv4Ca110KdfhJk/0aRwY32KQ0kZYn1minxTEtMck5RfSnxOfIt/7LJh+KXyNdfGhLguXrxiF1c8de6SyZadP5XeA1E4dZQX7aO7N7uKcDu2z5pMnvlCuBtvMtDveMtklykbtXTegdX1BIcobLY9SY2GCwB0svTbQuAvOPEJDWf8+iOfEnvlEK0Zav25iRlVZ/nmfYnp3IIMquy2KO1GDRS6S7yq8/0A59DiZNaq9QPGEM3hV+fZuIyvW1vstjlpE62/lXwTeryV3q6QY/6K1jIto7m/aNAr+XzkgvzRkHLzhF1Lo3L881CQFlP6uIlTS7F/Mx2qPgoElYTdOMgQqCe5gORMGyiVYs4GmBwYsz00qjnYmZD+I8DzHp+uihO5haMAM14VtdWdZ1GOga5FOXkMayHyGGmYWs="
addons:
apt:
sources:
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages:
- clang-3.7
- valgrind
install:
# All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
# Install google test sources
- git clone https://github.com/google/googletest.git
- export GTEST_PATH=${DEPS_DIR}/googletest/googletest
# Install a recent CMake
- CMAKE_URL="http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz"
- mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
- export PATH=${DEPS_DIR}/cmake/bin:${PATH}
# Install doxygen
- |
if [[ "${DOCUMENTATION}" == "true" ]]; then
DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.linux.bin.tar.gz"
mkdir doxygen && travis_retry wget --quiet -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen
export PATH=${DEPS_DIR}/doxygen/bin:${PATH}
fi
# Install boost
- BOOST_URL="http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz"
- mkdir boost && travis_retry wget --quiet -O - ${BOOST_URL} | tar --strip-components=1 -xz -C boost
- export BOOST_PATH=${DEPS_DIR}/boost
# Install libc++ and libc++abi
- |
if [[ "${STDLIB}" == "libc++" ]]; then
VERSION=3.7.0
LLVM_URL="http://llvm.org/releases/${VERSION}/llvm-${VERSION}.src.tar.xz"
LIBCXX_URL="http://llvm.org/releases/${VERSION}/libcxx-${VERSION}.src.tar.xz"
LIBCXXABI_URL="http://llvm.org/releases/${VERSION}/libcxxabi-${VERSION}.src.tar.xz"
mkdir -p llvm llvm/build llvm/projects/libcxx llvm/projects/libcxxabi
travis_retry wget --quiet -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C llvm
travis_retry wget --quiet -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxx
travis_retry wget --quiet -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxxabi
(cd llvm/build && cmake .. -DCMAKE_CXX_COMPILER=clang++ && make cxxabi cxx -j2)
export CXXFLAGS="-Wno-reserved-id-macro \
-I ${DEPS_DIR}/llvm/build/include \
-I ${DEPS_DIR}/llvm/build/include/c++/v1 \
-stdlib=libc++"
export LDFLAGS="-L ${DEPS_DIR}/llvm/build/lib -l c++ -l c++abi"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DEPS_DIR}/llvm/build/lib"
fi
before_script:
- git config --global user.name "Travis bot"
- git config --global user.email $USER@$HOSTNAME
- cd ${TRAVIS_BUILD_DIR}
- mkdir build && cd build
- ${COMPILER} --version
- |
cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} \
-DCMAKE_BUILD_TYPE=${CONFIGURATION} \
-DCMAKE_CXX_STANDARD=${STD} \
-DGTEST_SOURCE=${GTEST_PATH} \
-DBOOST_ROOT=${BOOST_PATH}
script:
- cmake --build .
- |
if [[ "${VALGRIND}" == "true" ]]; then
VALGRIND_CMD="valgrind --leak-check=full --error-exitcode=1"
true \
&& ${VALGRIND_CMD} ./atria-test-all \
&& ${VALGRIND_CMD} ./atria-benchmark-xform -i 1 -m 1 -s 10
else
ctest -V
fi
after_success:
- |
if [[ "${DOCUMENTATION}" == "true" ]]; then
if [[ "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then
cd ..
doxygen doxy/doxygen.config
# Suppress output to avoid leaking the token when the command fails
git clone https://arximboldi:${GH_TOKEN}@github.com/ableton/atria --depth 1 --branch=gh-pages gh-pages &>/dev/null
rm -rf gh-pages/{search,*.png,*.css,*.js,*.html}
cp -R output-doc/* gh-pages/
pushd gh-pages
git add --all .
git commit --allow-empty -m "Update to ${TRAVIS_COMMIT:0:7}"
# Suppress output to avoid leaking the token
travis_retry git push origin gh-pages &>/dev/null
popd
fi
fi