forked from UCL/SuPReMo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
116 lines (91 loc) · 4.28 KB
/
.gitlab-ci.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
114
115
116
# ====================================================================================================
#
# SuPReMo: Surrogate Parameterised Respiratory Motion Model
# An implementation of the generalised motion modelling and image registration framework
#
# Copyright (c) University College London (UCL). All rights reserved.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.
#
# See LICENSE.txt in the top level directory for details.
#
# ====================================================================================================
stages:
- build
- test
- cleanup
before_script:
- export git_hash=${CI_COMMIT_SHA:0:6}
- export src_dir=${CI_PROJECT_DIR}
- export builds_dir="${src_dir}-build-${git_hash}"
- export dep_dir="${builds_dir}/dependencies"
- export niftyreg_source_dir="${dep_dir}/niftyreg_source"
- export niftyreg_install_dir="${dep_dir}/niftyReg_install"
- export niftyreg_build_dir="${dep_dir}/niftyReg_build"
- export supremo_build_dir="${builds_dir}/supremo_build"
- export supremo_install_dir="${builds_dir}/supremo_install"
- echo "Building supremo"
- echo "source_dir - ${src_dir}"
- echo "Dependencies"
- echo "============"
- echo "builds_dir - ${builds_dir}"
- echo "dep_dir - ${dep_dir}"
- echo "niftyreg source dir - ${niftyreg_source_dir}"
- echo "niftyreg build dir - ${niftyreg_build_dir}"
- echo "niftyreg install dir - ${niftyreg_install_dir}"
- echo "supremo"
- echo "========="
- echo "supremo build dir - ${supremo_build_dir}"
- echo "supremo install dir - ${supremo_install_dir}"
Windows MSVC15 (VS2017) continuous build:
stage: build
script:
- cmake_generator="Visual Studio 15 2017 Win64"
- echo "Building dependency > niftyreg"
- echo "=============================="
- mkdir -p ${dep_dir}
- cd ${dep_dir}
- git clone https://github.com/KCL-BMEIS/niftyreg.git ${niftyreg_source_dir}
- mkdir -p ${niftyreg_build_dir}
- mkdir -p ${niftyreg_install_dir}
- cd ${niftyreg_build_dir}
- /c/Program\ Files/CMake/bin/cmake
-DBUILD_ALL_DEP:BOOL=ON
-DCMAKE_CONFIGURATION_TYPES:STRING=Release
-DCMAKE_INSTALL_PREFIX:STRING=${niftyreg_install_dir}
-G "${cmake_generator}" ${niftyreg_source_dir}
- "${src_dir}/utilities/buildCI_callMSVC.bat NiftyReg INSTALL 15"
- echo "Building > Supremo"
- echo "===================="
- mkdir -p ${supremo_build_dir}
- mkdir -p ${supremo_install_dir}
- cd ${supremo_build_dir}
- /c/Program\ Files/CMake/bin/cmake
-DNiftyReg_DIR:STRING=${niftyreg_install_dir}
-DCMAKE_CONFIGURATION_TYPES:STRING=Release
-DCMAKE_INSTALL_PREFIX:STRING=${supremo_install_dir}
-DBUILD_TESTING:BOOL=ON
-G "${cmake_generator}" ${src_dir}
- "${src_dir}/utilities/buildCI_callMSVC.bat Supremo ALL_BUILD 15"
tags:
- windows_msvc15
Windows continuous test:
stage: test
script:
- echo "Testing Supremo"
- echo "=============================="
- cd ${supremo_build_dir}
- /c/Program\ Files/CMake/bin/ctest --output-on-failure -C Release
only:
- branches
tags:
- windows_msvc15
Windows continuous clean up:
stage: cleanup
script:
- echo "Performing clean-up operation - deleting build folder"
- rm -rf ${builds_dir}
tags:
- windows_msvc15