Skip to content

Commit

Permalink
Merge pull request #332 from kerautret/AddDec
Browse files Browse the repository at this point in the history
add travis conf with EIGEN and OSX compilation
  • Loading branch information
kerautret authored Mar 24, 2018
2 parents cb7ec29 + 6a3d386 commit d309d2c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
language: cpp
dist: trusty



sudo: false

os:
- linux
- osx

compiler:
- gcc
Expand All @@ -28,6 +26,8 @@ matrix:
- compiler: gcc
os: linux
env: CONFIG="DOCUMENTATION"
- os: osx
compiler: gcc

addons:
apt:
Expand Down Expand Up @@ -57,22 +57,23 @@ before_install:
- env
- export SRC_DIR="`pwd`"
- if [ $CXX == "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8" CCOMPILER="gcc-4.8" CXXCOMPILER="g++-4.8"; fi
- source .travis/install_eigen.sh ; cd $TRAVIS_BUILD_DIR;

# Manual boost install since linking fails with libboost-program-options1.46-dev and g++48
# Manual boost install since linking fails with libboost-program-options1.46-dev and g++48

before_script:
- DGTALTYPE="-DBUILD_EXAMPLES=OFF -DDGTAL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_QGLVIEWER=false -DWITH_ITK=false"
- if [ $CONFIG == "Debug,QGLVIEWER" ]; then export DGTALTYPE="-DBUILD_EXAMPLES=OFF -DDGTAL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_QGLVIEWER=true -DWITH_ITK=false"; fi
- ccache -V && ccache --show-stats && ccache --zero-stats
- 'echo "using gcc : : ccache $CXX : <cflags>-std=c11 <cxxflags>-std=c++11 ;" > ~/user-config.jam'
- 'echo "using clang : : ccache $CXX : <cflags>-std=c11 <cxxflags>-std=c++11 ;" >> ~/user-config.jam'
- if [ $TRAVIS_OS_NAME == linux ]; then echo "All done."; fi
- if [ $TRAVIS_OS_NAME == osx ]; then source .travis/install_deps_macos.sh; fi
- DGTALTYPE="-DBUILD_EXAMPLES=OFF -DDGTAL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_QGLVIEWER=false -DWITH_ITK=false -DWITH_EIGEN=true -DEIGEN3_INCLUDE_DIR='$EIGEN_ROOT/include/eigen3'"
- if [ $CONFIG == "Debug,QGLVIEWER" AND $TRAVIS_OS_NAME == osx ]; then export DGTALTYPE="-DBUILD_EXAMPLES=OFF -DDGTAL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_QGLVIEWER=true -DWITH_QT5=true -DWITH_ITK=false -DWITH_EIGEN=true -DEIGEN3_INCLUDE_DIR='$EIGEN_ROOT/include/eigen3'"; fi
- if [ $CONFIG == "Debug,QGLVIEWER" AND $TRAVIS_OS_NAME == linux ]; then export DGTALTYPE="-DBUILD_EXAMPLES=OFF -DDGTAL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_QGLVIEWER=true -DWITH_ITK=false -DWITH_EIGEN=true -DEIGEN3_INCLUDE_DIR='$EIGEN_ROOT/include/eigen3'"; fi
- cd $SRC_DIR
- git clone --depth=1 git://github.com/DGtal-team/DGtal.git
- cd DGtal
- cmake . $DGTALTYPE -DCMAKE_CXX_COMPILER=$CXXCOMPILER -DCMAKE_C_COMPILER=$CCOMPILER
- make
- cd ..
- if [ $DOC == "true" ]; then .travis/install_doxygen.sh; BTYPE="-DDOXYGEN_EXECUTABLE=$HOME/doxygen/doxygen-1.8.10/bin/doxygen -DCMAKE_BUILD_TYPE=Debug -DWITH_CAIRO=true -DWITH_GMP=true"; fi
- if [ $DOC == "true" ]; then .travis/install_doxygen.sh; BTYPE="-DDOXYGEN_EXECUTABLE=$HOME/doxygen/doxygen-1.8.10/bin/doxygen -DCMAKE_BUILD_TYPE=Debug -DWITH_CAIRO=true -DWITH_GMP=true -DWITH_EIGEN=true"; fi
- if [ $DOC == "true" ]; then wget http://dgtal.org/doc/tags/DGtal-tagfile --no-check-certificate ;fi


Expand Down
14 changes: 14 additions & 0 deletions .travis/install_deps_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

#
# Note: gmp and boost already installed
#
brew update
#brew install qt5 doxygen homebrew/science/hdf5 graphviz graphicsmagick fftw eigen
brew install qt5 graphicsmagick fftw eigen
# Explicit install of libqglviewer
brew install http://liris.cnrs.fr/david.coeurjolly/misc/libqglviewer.rb

## Temporary HDF5 build issue
export BTYPE="$BTYPE -DWITH_HDF5=false" && echo "Disabling HDF5 on MacOS";
export BTYPE="$BTYPE -DWITH_QT5=true -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)" && echo "Forcing Qt5 on MacOS";
24 changes: 24 additions & 0 deletions .travis/install_eigen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash


#
# Local install of Eigen on linux system
#

export EIGEN_ROOT="/usr/local/"

if [ $TRAVIS_OS_NAME == linux ];
then
cd deps
wget http://bitbucket.org/eigen/eigen/get/3.2.10.tar.bz2

bunzip2 3.2.10.tar.bz2
tar xvf 3.2.10.tar

cd eigen-eigen-b9cd8366d4e8
mkdir build ; cd build

cmake .. -DCMAKE_INSTALL_PREFIX="${SRC_DIR}/deps/local"
make && make install && cd ${SRC_DIR} && export EIGEN_ROOT="$SRC_DIR/deps/local"

fi

0 comments on commit d309d2c

Please sign in to comment.