forked from RTKConsortium/RTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
108 lines (97 loc) · 4.48 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
language: cpp
python: "2.7.11"
sudo: required
dist: trusty
group: edge
addons:
apt:
packages:
- libfftw3-3
- libfftw3-dev
- kwstyle
matrix:
include:
- os: osx
compiler: clang
env: ITK_VERSION=v4.13.1 CUDA=NONE TESTING=ON APPLICATIONS=OFF
- os: osx
compiler: clang
env: ITK_VERSION=v4.13.1 CUDA=NONE TESTING=OFF APPLICATIONS=ON
- os: linux
compiler: gcc
env: ITK_VERSION=v4.13.1 CUDA=NONE TESTING=OFF APPLICATIONS=ON
- os: linux
compiler: gcc
env: ITK_VERSION=v4.13.1 CUDA=NONE TESTING=ON APPLICATIONS=OFF
- os: linux
compiler: gcc
env: ITK_VERSION=v4.13.1 CUDA=8.0.61-1 TESTING=ON APPLICATIONS=OFF
- os: linux
compiler: gcc
env: ITK_VERSION=v4.13.1 CUDA=8.0.61-1 TESTING=OFF APPLICATIONS=ON
cache:
- directories:
- $HOME/itk-v4.13.1
- $HOME/itk-v4.13.1-build
- $HOME/build/SimonRit/RTK/build/ExternalData
- $HOME/cmake
- timeout: 1000
before_install:
- if test "$CUDA" != NONE; then echo "Installing CUDA library"; fi
- if test "$CUDA" != NONE; then travis_retry wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_${CUDA}_amd64.deb; fi
- if test "$CUDA" != NONE; then travis_retry sudo dpkg -i cuda-repo-ubuntu1404_${CUDA}_amd64.deb; fi
- if test "$CUDA" != NONE; then travis_retry sudo apt-get update -qq; fi
- if test "$CUDA" != NONE; then export CUDA_APT=${CUDA%-*}; fi
- if test "$CUDA" != NONE; then export CUDA_APT=${CUDA_APT/./-}; fi
- if test "$CUDA" != NONE; then export CUDA_APT=${CUDA_APT:0:3}; fi
- if test "$CUDA" != NONE; then travis_retry sudo apt-get install -y cuda-drivers cuda-core-${CUDA_APT} cuda-cudart-dev-${CUDA_APT}; fi
- if test "$CUDA" != NONE; then travis_retry sudo apt-get install -y cuda-cufft-${CUDA_APT} cuda-cufft-dev-${CUDA_APT}; fi
- if test "$CUDA" != NONE; then travis_retry sudo apt-get install -y cuda-cublas-${CUDA_APT} cuda-cublas-dev-${CUDA_APT}; fi
- if test "$CUDA" != NONE; then travis_retry sudo apt-get clean; fi
- if test "$CUDA" != NONE; then export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${CUDA%%-*}; fi
- if test "$CUDA" != NONE; then export PATH=${CUDA_TOOLKIT_ROOT_DIR}/bin:${PATH}; fi
- if test $TRAVIS_OS_NAME == osx ; then HOMEBREW_NO_AUTO_UPDATE=1 brew install fftw || true ; brew link --overwrite fftw || true ; fi
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
- export CXXFLAGS="-fPIC -std=c++11"
install:
- CMAKE_VERSION=3.9.5
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
if ! test -d $HOME/cmake/bin; then
CMAKE_URL="https://cmake.org/files/v${CMAKE_VERSION%.[0-9]}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C $HOME/cmake
fi
export PATH=$HOME/cmake/bin:${PATH}
else
brew upgrade cmake
fi
- cmake --version
before_script:
- export NUM_THREADS=4
- export ITK_SOURCE_DIR=$HOME/itk-${ITK_VERSION}
- export ITK_BUILD_DIR=${ITK_SOURCE_DIR}-build
- if ! test -e ${ITK_SOURCE_DIR}/CMakeLists.txt; then rm -fr $ITK_SOURCE_DIR; fi
- if ! test -d ${ITK_SOURCE_DIR}; then git clone --depth 1 --branch ${ITK_VERSION} https://github.com/InsightSoftwareConsortium/ITK.git ${ITK_SOURCE_DIR}; fi
- if ! test -d ${ITK_BUILD_DIR}; then mkdir ${ITK_BUILD_DIR}; fi
script:
- DO_BUILD_RTK=true
- cd ${ITK_BUILD_DIR}
- if test $TRAVIS_OS_NAME == linux ; then KWSTYLE_CMAKE_OPTIONS="-DITK_USE_KWSTYLE=ON"; else KWSTYLE_CMAKE_OPTIONS="-DITK_USE_KWSTYLE=OFF" ; fi
- if ! test -e ${ITK_BUILD_DIR}/Makefile; then cmake ${ITK_SOURCE_DIR} ${KWSTYLE_CMAKE_OPTIONS}
-DCMAKE_BUILD_TYPE=Release
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DITK_USE_FFTWD=ON
-DITK_USE_FFTWF=ON
-DITK_USE_SYSTEM_FFTW=ON
-DUSE_FFTWD=ON
-DUSE_FFTWF=ON
-DUSE_SYSTEM_FFTW=ON; make --jobs=$NUM_THREADS --keep-going; DO_BUILD_RTK=false; fi
- cd -
- if ! test -d build; then mkdir build; fi
- cd build
- CMAKE_OPTIONS="${KWSTYLE_CMAKE_OPTIONS} -DRTK_BUILD_APPLICATIONS=${APPLICATIONS} ${CMAKE_OPTIONS}"
- CMAKE_OPTIONS="-DBUILD_TESTING=${TESTING} ${CMAKE_OPTIONS}"
- if [ $DO_BUILD_RTK == true ]; then cmake .. $CMAKE_OPTIONS || travis_terminate 1; fi
- if [ $DO_BUILD_RTK == true ]; then make --jobs=$NUM_THREADS --keep-going all || travis_terminate 1; fi
- if [ $DO_BUILD_RTK == true ] && [ "$TESTING" == ON ] && [ "$CUDA" == NONE ]; then make test || travis_terminate 1; fi