-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
182 lines (165 loc) · 6.25 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
# Based on : https://github.com/boostorg/hana/blob/master/.travis.yml
# Project language
language: c++
# sudo
#sudo: required
# Global variable
env:
global:
- DEPS_ROOT=~/deps
- OPENBLAS_ROOT=$DEPS_ROOT/openblas
- OPENCV_ROOT=$DEPS_ROOT/opencv
- DOXYGEN_ROOT=$DEPS_ROOT/doyxgen
- CMAKE_OPTIONS=-DWITH_EXAMPLES=ON
# Define list of OS and compiler to test on
matrix:
include:
# Linux - GCC
- os: linux
dist: trusty
env:
- NSTRIP=1 CMAKE_URL=https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && FC=gfortran-5"
compiler: gcc
addons:
apt:
sources: &sources
- ubuntu-toolchain-r-test
packages:
- g++-5
- gfortran-5
- nasm
# Linux - Clang
- os: linux
dist: trusty
env:
- NSTRIP=1 CMAKE_URL=https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz MATRIX_EVAL="FC=gfortran"
compiler: clang
addons:
apt:
packages:
# Add libc++ https://github.com/mapbox/mapbox-gl-native/issues/287
- libc++1
- libc++-dev
- gfortran
# Libjpeg
- nasm
# OSX 10.13 - Clang
- os: osx
osx_image: xcode9.2
env:
- NSTRIP=3 CMAKE_URL=https://cmake.org/files/v3.8/cmake-3.8.0-Darwin-x86_64.tar.gz
compiler: clang
# OSX 10.12 - Clang
- os: osx
osx_image: xcode8.3
env:
- NSTRIP=3 CMAKE_URL=https://cmake.org/files/v3.8/cmake-3.8.0-Darwin-x86_64.tar.gz
compiler: clang
# Doc Generator
- os: linux
dist: trusty
env:
- NSTRIP=1 CMAKE_URL=https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && FC=gfortran-5" DOCUMENTATION=TRUE NSTRIP=1 DOXYGEN_URL=http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.linux.bin.tar.gz CMAKE_OPTIONS="${CMAKE_OPTIONS} -DWITH_DOCS=ON"
compiler: gcc
addons:
apt:
sources: *sources
packages:
- g++-5
- gfortran-5
# Doxygen
- graphviz
- flex
- bison
- libiconv-hook*
# Libjpeg
- nasm
# Cache dependencies
cache:
directories:
- $OPENBLAS_ROOT
- $OPENCV_ROOT
- $DOXYGEN_ROOT
# Limit cloning depth
git:
depth: 1
# Install dependencies needed by library
before_install:
- eval "${MATRIX_EVAL}"
install:
# Check gcc version is properly update to 5.x
- $CC --version
############################################################################
# All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
############################################################################
- mkdir -p $DEPS_ROOT && cd $DEPS_ROOT
############################################################################
# Install a recent CMake
############################################################################
- |
mkdir cmake && curl -o cmake.tar.gz -O ${CMAKE_URL} && tar -C cmake/ --strip-components=${NSTRIP} -xzf cmake.tar.gz
export PATH=$DEPS_ROOT/cmake/bin:${PATH}
- cmake --version
############################################################################
# Install OpenBLAS (only on linux)
############################################################################
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
source $TRAVIS_BUILD_DIR/travis/install-openblas.sh $OPENBLAS_ROOT
fi
############################################################################
# Install nasm for jpeg-turbo lib
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew upgrade nasm || brew install nasm
fi
nasm -v && which nasm
############################################################################
# Install OpenCV
############################################################################
- $TRAVIS_BUILD_DIR/travis/install-opencv.sh $OPENCV_ROOT
############################################################################
# Install a recent Doxygen
############################################################################
- |
if [[ "$DOCUMENTATION" == "TRUE" ]]; then
$TRAVIS_BUILD_DIR/travis/install-doxygen.sh $DOXYGEN_ROOT
fi
before_script:
############################################################################
# Set the git identity (for pushing the documentation and the benchmarks)
############################################################################
- git config --global user.name "Travis bot"
- git config --global user.email "<>"
# Compilation scripts start here
script:
- $TRAVIS_BUILD_DIR/travis/build-library.sh
# Run UnitTest
- $TRAVIS_BUILD_DIR/travis/test-library.sh
# Build docs
- $TRAVIS_BUILD_DIR/travis/build-doc.sh
after_failure:
- |
if [ -f $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log ]; then
cat $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log
fi
# Setup SSH for deployment
before_deploy:
- |
cd $TRAVIS_BUILD_DIR
openssl aes-256-cbc -K $encrypted_59ae97b0ca3d_key -iv $encrypted_59ae97b0ca3d_iv -in travis/.deploy-key.enc -out deploy-key -d
chmod 600 deploy-key
eval `ssh-agent -s`
ssh-add deploy-key
# Push freshly build documentation online
deploy:
provider: script
skip_cleanup: true
script: $TRAVIS_BUILD_DIR/travis/deploy-doc.sh
on:
branch: develop
# Notifications
notifications:
slack:
secure: ItARuy/RFKJEr2VtpPnxaKlrdElHaVfeeVzbWnfjnPrzCcqHc++P/O52DTtGyGuqd3+szNuvVcnAH1vPP5TlbxG/Gxox2fU9Kdwt56Ll5hz6jHqeV2tSuzp6MTE3k35AGStVtXI6RHdlwfO3HkX5c9XAN6dyeOGzfi5YU1it2Easo0hm9aaXVZPBtvIUkU39vzHa0W0ZgZlvO9XsBGScIbMGdLm81gEhPB0J7w/vijisityVlhw50DXoApFLFL5QUAYcBf7ATm/kl36GY2cTAO/KBEdPNBE6Vu0swXwFAX/HYhyzXjPC/VBkFgUG722CO61M4S8M3TylJTtqZantA5hakYuNVNEnhlzmVkBF9qmMrW0PGIcApyZZ4pKZ498PrSU4NYEz+c8VUlyQXxE6QmVTI2hfMk1SbqrpQg+dalbjj0Osp3c+kR1rR4CVYqhTT1JeiKqs+Wz/rWn3J6BHPNIEMv2uVP8XWqpdBXbJEGJLa40x6ylfbr2+WKHBZsOCkzup00EjAMzzQLym0EvdomkIF5F1gJqTbCMkZSWLb0F8zTxqbQZ0Agz9n/XSJraKyBO1TLpYCgsxF5WP8XD1Xw1cDsunidvwTP1xeVvfN9jwxBOQYPBfWI2oqG/u5rHQJ4K7JImuhlfu3d1NZlGX+eNUKghMrCakQTHzKYj9tlA=