forked from SuperElastix/SuperElastix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
113 lines (107 loc) · 3.97 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
109
110
111
112
113
language: cpp
env:
global:
HOME_DIR=${TRAVIS_BUILD_DIR}/..
ExternalData_OBJECT_STORES=${HOME_DIR}/.ExternalData
ITK_URL=https://github.com/InsightSoftwareConsortium/ITK
ITK_SOURCE_DIR=${HOME_DIR}/ITK-source
ITK_BUILD_DIR=${HOME_DIR}/ITK-build
ELASTIX_URL=https://github.com/SuperElastix/elastix
ELASTIX_SOURCE_DIR=${HOME_DIR}/Elastix-source
ELASTIX_BUILD_DIR=${HOME_DIR}/Elastix-build
SUPERELASTIX_SOURCE_DIR=${TRAVIS_BUILD_DIR}/SuperBuild
SUPERELASTIX_BUILD_DIR=${HOME_DIR}/SuperElastix-build
CMAKE_DOWNLOAD_FILE=cmake-3.6.0-Linux-x86_64.sh
cache:
directories:
- ${ExternalData_OBJECT_STORES}
- ${ITK_SOURCE_DIR}
- ${ITK_BUILD_DIR}
- ${ELASTIX_SOURCE_DIR}
- ${ELASTIX_BUILD_DIR}
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env:
- GCC="CC=gcc-4.9 && CXX=g++-4.9"
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- GCC="CC=gcc-5 && CXX=g++-5"
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- GCC="CC=gcc-6 && CXX=g++-6"
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- GCC="CC=gcc-7 && CXX=g++-7"
- os: osx
compiler: clang
- os: osx
compiler: gcc
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then eval ${GCC}; fi;
before_script:
- mkdir -p ${SUPERELASTIX_BUILD_DIR}
- mkdir -p ${ExternalData_OBJECT_STORES}
- if [[ "$TRAVIS_OS_NAME" == "linux" && ! -e "${ExternalData_OBJECT_STORES}/${CMAKE_DOWNLOAD_FILE}" ]]; then (cd ${ExternalData_OBJECT_STORES} && curl -sSO https://cmake.org/files/v3.6/${CMAKE_DOWNLOAD_FILE}); fi;
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo bash "${ExternalData_OBJECT_STORES}/${CMAKE_DOWNLOAD_FILE}" --prefix=/usr/local --exclude-subdir; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake --version; fi
script:
- if [[ ! -e ${ITK_BUILD_DIR}/ITKConfig.cmake ]]; then
rm -rf ${ITK_SOURCE_DIR} {ITK_BUILD_DIR} &&
git clone ${ITK_URL} ${ITK_SOURCE_DIR} &&
cd ${ITK_SOURCE_DIR} &&
git checkout v4.12.2 &&
mkdir -p ${ITK_BUILD_DIR} &&
cd ${ITK_BUILD_DIR} &&
cmake -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_SKIP_RPATH:BOOL=ON -DITK_LEGACY_REMOVE:BOOL=ON -DITK_USE_KWSTYLE:BOOL=OFF -DITK_BUILD_DEFAULT_MODULES:BOOL=ON -DModule_ITKReview:BOOL=ON ${ITK_SOURCE_DIR} &&
make --jobs=4; fi
- if [[ ! -e ${ELASTIX_BUILD_DIR}/ElastixConfig.cmake ]]; then
rm -rf ${ELASTIX_SOURCE_DIR} ${ELASTIX_BUILD_DIR} &&
git clone ${ELASTIX_URL} ${ELASTIX_SOURCE_DIR} &&
cd ${ELASTIX_SOURCE_DIR} &&
git checkout e8354222396c6bd78e9fe6d5a39e4ecac4bb0d52 &&
mkdir -p ${ELASTIX_BUILD_DIR} &&
cd ${ELASTIX_BUILD_DIR} &&
cmake -DBUILD_TESTING:BOOL=OFF -DELASTIX_BUILD_EXECUTABLE:BOOL=OFF -DITK_DIR=${ITK_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release ${ELASTIX_SOURCE_DIR} &&
make --jobs=4 &&
touch ${HOME_DIR}/built_cache; fi
- cd ${SUPERELASTIX_BUILD_DIR}
- if [[ ! -e ${HOME_DIR}/built_cache ]]; then
cmake -DBUILD_APPLICATIONS_EXTERNAL_PROJECT:BOOL=ON -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_ITK:BOOL=ON -DITK_DIR=${ITK_BUILD_DIR} -DUSE_SYSTEM_ELASTIX:BOOL=ON -DElastix_DIR=${ELASTIX_BUILD_DIR} ${SUPERELASTIX_SOURCE_DIR} &&
make --jobs=4; fi