forked from ITISFoundation/osparc-iseg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (42 loc) · 1.94 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
language: cpp
sudo: false
matrix:
include:
# OSX C++14 Clang builds
- os: osx
osx_image: xcode10
compiler: clang
env: COMPILER='clang++' BUILD_TYPE='Release'
cache:
directories:
- '${TRAVIS_BUILD_DIR}/deps/itk'
before_cache:
- rm -r ${TRAVIS_BUILD_DIR}/deps/itk/build
- rm -r ${TRAVIS_BUILD_DIR}/deps/itk/src
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.13/cmake-3.13.0-rc1-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
which cmake || brew install cmake
brew ls --versions boost || brew install boost
brew ls --versions hdf5 || brew install hdf5
brew ls --versions vtk || brew install vtk
brew ls --versions eigen || brew install eigen
brew tap cartr/qt4 && brew tap-pin cartr/qt4 && brew install qt@4
# could not find tap for ITK
ITK_URL="http://downloads.sourceforge.net/project/itk/itk/4.13/InsightToolkit-4.13.1.tar.gz"
test -d ${DEPS_DIR}/itk/lib || (mkdir -p itk/src && travis_retry wget --no-check-certificate --quiet -O - ${ITK_URL} | tar --strip-components=1 -xz -C itk/src && mkdir itk/build && cd itk/build && cmake ../src -DCMAKE_INSTALL_PREFIX=$PWD/.. -DModule_ITKReview=ON -DCMAKE_RULE_MESSAGES=OFF && make -j4 && make install && cd ${DEPS_DIR})
fi
before_script:
- export CXX=${COMPILER}
- cd ${TRAVIS_BUILD_DIR}
- cmake -H. -BCIBuild -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBOOST_ROOT=/usr/local/opt/boost -DHDF5_ROOT=/usr/local/opt/hdf5 -DVTK_DIR=/usr/local/opt/vtk -DITK_DIR=`ls -d -1 ${DEPS_DIR}/itk/lib/cmake/ITK*` -DQT_QMAKE_EXECUTABLE=/usr/local/bin/qmake -Wdev
- cd CIBuild
script:
- make -j 2
- ctest -V