forked from MEPP-team/MEPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (87 loc) · 4.76 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
language: cpp
os:
- linux
- osx # default : Xcode 6.1b under Mavericks (OS X 10.9) -> NOW very too old !
sudo: required # need by trusty
dist: trusty
group: deprecated-2017Q4
osx_image: xcode9.2 # Xcode 9.2 under Sierra (OS X 10.12) # -> for now not under High Sierra (OS X 10.13) <-
#osx_image: xcode8.3 # Xcode 8.3.3 under Sierra (OS X 10.12)
#osx_image: xcode7.3 # Xcode 7.3.1 under El Capitan (OS X 10.11)
#osx_image: xcode6.4 # Xcode 6.4 under Yosemite (OS X 10.10)
compiler:
- clang
- gcc
cache: apt # this feature is available only for private repositories
env:
- BTYPE="-DCMAKE_BUILD_TYPE=Debug"
- BTYPE="-DCMAKE_BUILD_TYPE=Release"
#-------------------------------------------------------------------
# matrix details :
#
# - 2x gcc under Linux trusty 14.04 LTS (debug and release)
# - 2x clang under Linux trusty 14.04 LTS (debug and release)
#
# - 2x clang under OS X with Apple LLVM (debug and release)
#-------------------------------------------------------------------
matrix:
fast_finish: true
exclude:
- os: osx
compiler: gcc
addons:
apt:
packages:
- libboost-dev
- libcgal-dev
- libqt4-dev
- libqt4-opengl-dev
- libqglviewer-dev
- libxerces-c-dev
- libassimp-dev
- doxygen
- graphviz
- cmake # or group: deprecated-2017Q4
install:
- cmake --version
#
# osx :
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# ---> because we want cgal48 or cgal49 under osx !!!
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew info cgal; fi # to show cgal version
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink cgal; fi # ---> unlink cgal > v4.9
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula; mv cgal.rb cgal.rb.old; wget --no-check-certificate https://download.gforge.liris.cnrs.fr/meppbin/travis-osx/Formula/cgal491/cgal.rb; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cgal; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 100 brew install cartr/qt4/qt-legacy-formula; fi # but, travis_wait -> in fact : https://github.com/travis-ci/docs-travis-ci-com/pull/439 :-( -> so force Sierra for cartr/qt4 !
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install xerces-c assimp doxygen graphviz; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install homebrew/boneyard/libqglviewer; fi # bad Formula -> install qt5 !!!
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ln -s "/usr/local/Cellar/libqglviewer/2.6.3/lib/QGLViewer.framework" "/Library/Frameworks/QGLViewer.framework"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd /tmp; wget --no-check-certificate https://download.gforge.liris.cnrs.fr/meppbin/src/libQGLViewer-2.6.3.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar zxvf libQGLViewer-2.6.3.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd libQGLViewer-2.6.3/QGLViewer; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then qmake -spec macx-g++; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo make install; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ln -s "/usr/local/lib/QGLViewer.framework" "/Library/Frameworks/QGLViewer.framework"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR; fi
#
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake --version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew info cmake; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew switch cmake 3.0.2; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd /tmp; wget --no-check-certificate https://download.gforge.liris.cnrs.fr/meppbin/travis-osx/cmake-3.4.3-Darwin-x86_64.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar zxvf cmake-3.4.3-Darwin-x86_64.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd $TRAVIS_BUILD_DIR; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir build && cd build && cmake .. $BTYPE; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build && cd build && /tmp/cmake-3.4.3-Darwin-x86_64/CMake.app/Contents/bin/cmake .. $BTYPE; fi
- make -j 3
# - make test
#
# osx only (add qt5 after qt4 in the same job) :
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink qt@4; fi # ---> now unlink qt4
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt5; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd ..; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build_osx_qt5 && cd build_osx_qt5 && /tmp/cmake-3.4.3-Darwin-x86_64/CMake.app/Contents/bin/cmake .. $BTYPE -DWITH_QT5=YES -DQT5_DIR=/usr/local/opt/qt5; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j 3; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make test; fi