forked from DGtal-team/DGtal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (74 loc) · 3.56 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
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
osx_image: xcode61
cache: apt
notifications:
slack: dgtal:FObxCZFoeQkkaRuktJD5uhnN
########
# matrix details:
# - one build for the documentation on macosx (clang) and only for commits on
# DGtal-team repo (no pull request). Encrypted var. required.
# - code coverage only for gcc on linux and first config (Magick, GMP)
# - No gcc on macosx
# - Otherwise, 2 os x 2 configs
#
########
env:
- CONFIG="Debug,Magick,GMP,Coverage"
- CONFIG="Debug,Cairo,QGLviewer,HDF5"
- CONFIG="Documentation,Debug,Cairo,GMP"
matrix:
fast_finish: true
exclude:
- os: linux
env: CONFIG="Documentation,Debug,Cairo,GMP"
- compiler: gcc
os: osx
env: CONFIG="Documentation,Debug,Cairo,GMP"
- os: osx
compiler: gcc
before_install:
- COVERAGE="false"
- DOC="false"
- NEEDBUILD="true";
- if [ $CONFIG == "Documentation,Debug,Cairo,GMP" ]; then NEEDBUILD="false"; if [ $OriginalRepo == "true" ]; then if [ $TRAVIS_PULL_REQUEST == "false" ]; then DOC="true"; fi; fi; fi
- if [ $CONFIG == "Debug,Magick,GMP,Coverage" ]; then BTYPE="-DCMAKE_BUILD_TYPE=Debug -DWITH_MAGICK=true -DWITH_GMP=true -DBUILD_TESTING=ON -DWARNING_AS_ERROR=ON -DWITH_COVERAGE=true"; COVERAGE="true"; fi
- if [ $CONFIG == "Debug,Cairo,QGLviewer,HDF5" ]; then BTYPE="-DCMAKE_BUILD_TYPE=Debug -DWITH_HDF5=true -DWITH_CAIRO=true -DWITH_QGLVIEWER=true -DBUILD_TESTING=ON -DWARNING_AS_ERROR=OFF"; fi
- if [ $DOC == "true" ]; then BTYPE="-DCMAKE_BUILD_TYPE=Debug -DWITH_CAIRO=true -DWITH_GMP=true"; DOC="true"; openssl aes-256-cbc -K $encrypted_47769ec71275_key -iv $encrypted_47769ec71275_iv -in .travis/dgtal_rsa.enc -out .travis/dgtal_rsa -d; chmod 600 .travis/dgtal_rsa; DOC="true"; fi
########
# Deps.
########
before_script:
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get -qq update && sudo apt-get -qq install libhdf5-serial-dev libboost-program-options-dev libcairo2-dev doxygen graphviz libgraphicsmagick++1-dev libboost-system-dev libgmp-dev libqglviewer-qt4-dev libinsighttoolkit3-dev libgdcm2-dev lcov; fi
- if [ $COVERAGE == "true" ]; then gem install coveralls-lcov; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update; brew install boost doxygen homebrew/science/hdf5 graphviz graphicsmagick gmp libqglviewer; echo "done";fi
############
# Main rules
############
script:
- cmake . $BTYPE
- echo $DOC
- echo $BTYPE
- if [ $NEEDBUILD == "true" ]; then make DGtal && make DGtalIO; fi
- if [ $NEEDBUILD == "true" ]; then cd examples && make ; fi
- if [ $NEEDBUILD == "true" ]; then cd ../tests && make && cd .. ; fi
- if [ $NEEDBUILD == "true" ]; then make test; fi
############
# Coverage
############
after_script:
- if [ $COVERAGE == "true" ]; then make lcov; fi
- if [ $COVERAGE == "true" ]; then coveralls-lcov --source-encoding=ISO-8859-1 coverage/stap.info; fi
###########
## Building the documentation
###########
after_success:
- if [ $DOC == "true" ]; then make doc; fi
- if [ $DOC == "true" ]; then rsync -azv --delete --delete-after -e 'ssh -oStrictHostKeyChecking=no -i .travis/dgtal_rsa' html/ dgtal@liris.cnrs.fr:/home/dgtal/public_html/doc/nightly/; fi
- if [ $DOC == "true" ]; then cd html; make ; wget http://dgtal.org/doc/docset/template.tgz ; tar zxvf template.tgz ; mv template/* org.dgtal.docset ; tar zcvf DGtal-devel.tgz org.dgtal.docset ; cd .. ;rsync -azv --delete --delete-after -e 'ssh -oStrictHostKeyChecking=no -i .travis/dgtal_rsa' html/DGtal-devel.tgz dgtal@liris.cnrs.fr:/home/dgtal/public_html/doc/docset ; fi
- echo "All done..."