This repository has been archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy path.travis.yml
328 lines (314 loc) · 11.2 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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
language: cpp
notifications:
email: false
# gitter
webhooks:
urls:
- https://webhooks.gitter.im/e/b43314c68a0082edd974
on_success: always
on_failure: always
git:
depth: 500
stages:
- before_install
- install
- before_script
- script
- after_success
- name: after_script
if: branch = master
jobs:
include:
- compiler: gcc-9
os: linux
dist: bionic
python: 3.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- libfftw3-dev
- libsndfile-dev
- swig
- libatlas-base-dev
- curl
- doxygen
sonarcloud:
organization: "mbrucher-github"
env:
- MY_NAME: Static Analysis
- COMPILER=g++-9
- PLATFORM=gcc-9
- ENABLE_PYTHON=OFF
- ENABLE_STATIC_ANALYSIS=ON
- ENABLE_CODECOVERAGE=ON
- GCOV_VERSION=gcov-9
- Python_ADDITIONAL_VERSIONS=3.8.1
- BUILD_TYPE=Coverage
- CUSTOM_LCOV=ON
- MAKE_WRAPPER="build-wrapper-linux-x86-64 --out-dir bw-outputs "
- ADDITONAL_CMAKE_FLAGS="-DPYTHON_LIBRARY=/opt/python/${Python_ADDITIONAL_VERSIONS}/lib/libpython${PYTHON_VERSION}.so -DPYTHON_INCLUDE_DIR=/opt/python/${Python_ADDITIONAL_VERSIONS}/include/python${PYTHON_VERSION} -DPYTHON_EXECUTABLE=/opt/python/${Python_ADDITIONAL_VERSIONS}/bin/python -DENABLE_CODECOVERAGE=ON -DENABLE_STATIC_LIBRARIES=OFF -DCMAKE_CXX_FLAGS_DEBUG_INIT=\"-O0\""
- compiler: gcc-9
os: linux
dist: bionic
python: 3.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- libfftw3-dev
- libsndfile-dev
- swig
env:
- MY_NAME: GCC 9
- COMPILER=g++-9
- PLATFORM=gcc-9
- ENABLE_PYTHON=ON
- PYTHON_VERSION=3.7
- PYTHON=python3
- Python_ADDITIONAL_VERSIONS=3.8.1
- BUILD_TYPE=Release
- ADDITONAL_CMAKE_FLAGS="-DPYTHON_LIBRARY=/opt/python/${Python_ADDITIONAL_VERSIONS}/lib/libpython${PYTHON_VERSION}.so -DPYTHON_INCLUDE_DIR=/opt/python/${Python_ADDITIONAL_VERSIONS}/include/python${PYTHON_VERSION} -DPYTHON_EXECUTABLE=/opt/python/${Python_ADDITIONAL_VERSIONS}/bin/python -DENABLE_STATIC_LIBRARIES=ON"
- compiler: clang-9
os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- g++-9
- libfftw3-dev
- libsndfile-dev
- swig
- libatlas-base-dev
env:
- MY_NAME=ASAN
- COMPILER=clang++-9
- PLATFORM=clang-9
- ENABLE_PYTHON=OFF
- BUILD_TYPE=Debug
- ASAN_OPTIONS=verbosity=1:detect_stack_use_after_return=true
- LD_PRELOAD_=/usr/lib/llvm-9/lib/clang/9.0.0/lib/linux/libclang_rt.asan-x86_64.so
- ADDITONAL_CMAKE_FLAGS="-DENABLE_ADDRESS_SANITIZER=ON -DENABLE_STATIC_LIBRARIES=OFF -DCMAKE_CXX_FLAGS_DEBUG_INIT=\"-O0\""
- ASAN_OPTIONS=detect_leaks=0
- ASAN_SYMBOLIZER_PATH=llvm-symbolizer
- compiler: clang-9
os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- g++-9
- libfftw3-dev
- libsndfile-dev
- swig
- libatlas-base-dev
- curl
- lcov
sonarcloud:
organization: "mbrucher-github"
env:
- MY_NAME=LLVM coverage
- COMPILER=clang++-9
- PLATFORM=clang-9
- ENABLE_PYTHON=OFF
- BUILD_TYPE=Debug
- ENABLE_STATIC_ANALYSIS=OFF
- ENABLE_CODECOVERAGE=ON
- MAKE_WRAPPER="build-wrapper-linux-x86-64 --out-dir bw-outputs "
- ADDITONAL_CMAKE_FLAGS="-DENABLE_CODECOVERAGE=ON -DLCOV_SCRIPT=--gcov-tool=`pwd`/scripts/llvm-cov.sh -DENABLE_STATIC_LIBRARIES=OFF -DCMAKE_CXX_FLAGS_DEBUG_INIT=\"-O0\""
- compiler: clang-9
os: linux
dist: bionic
python: 3.7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- g++-9
- libfftw3-dev
- libsndfile-dev
- swig
env:
- MY_NAME: clang 9
- COMPILER=clang++-9
- PLATFORM=clang-9
- ENABLE_PYTHON=ON
- PYTHON_VERSION=3.8
- PYTHON=python3
- Python_ADDITIONAL_VERSIONS=3.8.1
- BUILD_TYPE=Release
- ADDITONAL_CMAKE_FLAGS="-DDISABLE_PYTHON_TESTS=ON -DPYTHON_LIBRARY=/opt/python/${Python_ADDITIONAL_VERSIONS}/lib/libpython${PYTHON_VERSION}.so -DPYTHON_INCLUDE_DIR=/opt/python/${Python_ADDITIONAL_VERSIONS}/include/python${PYTHON_VERSION} -DPYTHON_EXECUTABLE=/opt/python/${Python_ADDITIONAL_VERSIONS}/bin/python -DENABLE_STATIC_LIBRARIES=ON"
- os: osx
osx_image: xcode12
python: 3.7
env:
- MY_NAME: XCode 12
- COMPILER=clang++
- PLATFORM=xcode-12
- ADDITONAL_CMAKE_FLAGS=-DDISABLE_PYTHON_TESTS=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" -DENABLE_STATIC_LIBRARIES=ON
- ENABLE_PYTHON=ON
- PYTHON_VERSION=3.7
- PYTHON=python
- Python_ADDITIONAL_VERSIONS=3.7
- BUILD_TYPE=Release
- os: osx
osx_image: xcode11.6
python: 3.7
env:
- MY_NAME: XCode 11
- COMPILER=clang++
- PLATFORM=xcode-11.6
- ADDITONAL_CMAKE_FLAGS=-DDISABLE_PYTHON_TESTS=ON -DCMAKE_OSX_ARCHITECTURES="i386,x86_64" -DENABLE_STATIC_LIBRARIES=ON
- ENABLE_PYTHON=ON
- PYTHON_VERSION=3.7
- PYTHON=python
- Python_ADDITIONAL_VERSIONS=3.7
- BUILD_TYPE=Release
before_install:
- ls /usr/lib
- ls /usr/lib/llvm-*/lib/clang/ || true
- ls /usr/lib/llvm-*/lib/clang/*/lib/linux || true
- mkdir -p $HOME/usr/bin
- export PATH="$HOME/usr/bin:$PATH"
- export PATH="/usr/local/bin:$PATH"
- |
if [[ "${ENABLE_CODECOVERAGE}" = "ON" ]]; then
ln -s /usr/bin/$GCOV_VERSION $HOME/usr/bin/gcov
fi
- |
if [[ "${CUSTOM_LCOV}" = "ON" ]]; then
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.14.orig.tar.gz
tar xzf lcov_1.14.orig.tar.gz
cd lcov-1.14
wget https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7.diff
patch -p1 < ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7.diff
wget https://github.com/linux-test-project/lcov/commit/75fbae1cfc5027f818a0bb865bf6f96fab3202da.diff
patch -p1 < 75fbae1cfc5027f818a0bb865bf6f96fab3202da.diff
sudo make install
cd ..
cpanm --sudo --notest PerlIO::gzip JSON
fi
- |
if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
ls /opt/python/
wget https://cmake.org/files/v3.12/cmake-3.12.1-Linux-x86_64.sh
chmod +x cmake-3.12.1-Linux-x86_64.sh
./cmake-3.12.1-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license
if [[ "$ENABLE_PYTHON" == "ON" ]]; then
/opt/python/${Python_ADDITIONAL_VERSIONS}/bin/python${Python_ADDITIONAL_VERSIONS} -m pip install numpy scipy nose
fi
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
rm -f /usr/local/include/c++
brew install fftw libsndfile swig
brew upgrade cmake
if [[ "$ENABLE_PYTHON" == "ON" ]]; then
if [[ "$PYTHON" == "python3" ]]; then brew upgrade python ; fi
${PYTHON} -V
sudo ${PYTHON} -m pip install numpy scipy nose
fi
fi
- wget --no-verbose --output-document=boost_1_73_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.73.0/boost_1_73_0.tar.bz2/download
- export BOOST_ROOT="$TRAVIS_BUILD_DIR/../boost"
- export BOOST_BUILD="$TRAVIS_BUILD_DIR/../boost-build"
- mkdir -p $BOOST_ROOT
- tar jxf boost_1_73_0.tar.bz2 --strip-components=1 -C $BOOST_ROOT
install:
- "(cd $BOOST_ROOT; ./bootstrap.sh --with-libraries=system,test)"
- "(cd $BOOST_ROOT; ./b2 threading=multi --prefix=$BOOST_BUILD -d0 install)"
before_script:
- mkdir build
- cd build
- ${MAKE_WRAPPER} cmake -DENABLE_GPL=ON -DDISABLE_EIGEN_WARNINGS=ON -DCMAKE_CXX_COMPILER=$COMPILER -DBOOST_ROOT=$BOOST_BUILD -DCMAKE_INSTALL_PREFIX=${HOME}/ATK -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_PYTHON=${ENABLE_PYTHON} ${ADDITONAL_CMAKE_FLAGS} ..
script:
- pwd
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then export LD_LIBRARY_PATH=${HOME}/ATK/lib:$LD_LIBRARY_PATH ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export DYLD_LIBRARY_PATH=${HOME}/ATK/lib:$BOOST_BUILD/lib ; fi
- ${MAKE_WRAPPER} make -j2
- make install
- export PYTHONPATH=${HOME}/ATK/lib/site-packages/:$PYTHONPATH
- echo $DYLD_LIBRARY_PATH
- echo $LD_LIBRARY_PATH
- ls ${HOME}/ATK/lib
- |
if [[ "${ENABLE_CODECOVERAGE}" = "ON" ]]; then
export PATH=${TRAVIS_BUILD_DIR}/script/:${PATH}
VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=TRUE make codecoverage
else
LD_PRELOAD=${LD_PRELOAD_} CTEST_OUTPUT_ON_FAILURE=TRUE make test
fi
after_success:
- |
if [[ "${ENABLE_CODECOVERAGE}" = "ON" ]]; then
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
fi
- cd ${HOME}/ATK
- tar -cvzf ${HOME}/AudioTK.${TRAVIS_OS_NAME}.${PLATFORM}.py${PYTHON_VERSION}-${BUILD_TYPE}.tar.gz *
- |
if [[ "${ENABLE_STATIC_ANALYSIS}" = "ON" ]]; then
cd ..
sonar-scanner
fi
after_script:
- |
if [[ "${ENABLE_STATIC_ANALYSIS}" = "ON" ]]; then
cd ${HOME}
echo "-----BEGIN RSA PRIVATE KEY-----" > ${HOME}/.ssh/key
echo ${SSH_KEY} | awk '{for(i=1;i<length;i+=64) print substr($0,i,64)}' >> ${HOME}/.ssh/key
echo "-----END RSA PRIVATE KEY-----" >> ${HOME}/.ssh/key
chmod 0600 ${HOME}/.ssh/key
GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/key -o \"StrictHostKeyChecking no\"" git clone git+ssh://[email protected]/cov.audio-tk.com.git
cd cov.audio-tk.com
git rm -r *
cp -R ${TRAVIS_BUILD_DIR}/build/coverage htdocs
git add .
git commit -m "Run ${TRAVIS_JOB_ID}"
GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/key -o \"StrictHostKeyChecking no\"" git push
ssh -i ${HOME}/.ssh/key -o "StrictHostKeyChecking no" [email protected] deploy cov.audio-tk.com.git
fi
- |
if [[ "${ENABLE_STATIC_ANALYSIS}" = "ON" ]]; then
cd ${TRAVIS_BUILD_DIR}
doxygen Doxyfile
cd ${HOME}
echo "-----BEGIN RSA PRIVATE KEY-----" > ${HOME}/.ssh/key
echo ${SSH_KEY} | awk '{for(i=1;i<length;i+=64) print substr($0,i,64)}' >> ${HOME}/.ssh/key
echo "-----END RSA PRIVATE KEY-----" >> ${HOME}/.ssh/key
chmod 0600 ${HOME}/.ssh/key
GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/key -o \"StrictHostKeyChecking no\"" git clone git+ssh://[email protected]/doc.audio-tk.com.git
cd doc.audio-tk.com
git rm -r *
cp -R ${TRAVIS_BUILD_DIR}/Doxygen/html htdocs
git add .
git commit -m "Run ${TRAVIS_JOB_ID}"
GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/key -o \"StrictHostKeyChecking no\"" git push
ssh -i ${HOME}/.ssh/key -o "StrictHostKeyChecking no" [email protected] deploy doc.audio-tk.com.git
fi
deploy:
skip_cleanup: true
provider: releases
token: ${GITHUB_OAUTH_TOKEN}
file: ${HOME}/AudioTK.${TRAVIS_OS_NAME}.${PLATFORM}.py${PYTHON_VERSION}-${BUILD_TYPE}.tar.gz
on:
repo: mbrucher/AudioTK
tags: true