forked from RTKConsortium/RTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
76 lines (67 loc) · 2.94 KB
/
appveyor.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
#------------------------------------------------------------------------------
# AppVeyor Continous Integration (CI) configuration file
#
# Configures a Windows-like environment for building RTK on AppVeyor.
#
# Only ITK is being built the first time to ensure the build time is less
# than appveyor's 1 hour limit. ITK is then cached and retrieved at the
# beginning of every RTK build.
# To reduce build time, ITK is built with the option BUILD_TESTING set to OFF.
# We then rebuild the itkTestDriver target on its own as it is required by RTK.
#
# The ITKData target is also built appart from RTK as many network errors could
# occur on appveyor. If a network error occurs, preventing RTK to fetch its
# test data, then the appveyor-retry command will re-build this target up to
# three times.
# Target platform
platform:
- x64
environment:
# Environment variables
APPVEYOR_SAVE_CACHE_ON_ERROR: true
ITK_VERSION: v4.12.0
ITK_SOURCE_DIR: "C:/projects/ITK"
ITK_BINARY_DIR: "C:/projects/ITK-build"
BUILD_TYPE: Release
CTEST_SOURCE_DIRECTORY: "%APPVEYOR_BUILD_FOLDER%"
CTEST_BINARY_DIRECTORY: "%APPVEYOR_BUILD_FOLDER%/build"
CTEST_CMAKE_GENERATOR: "Visual Studio 14 2015 Win64"
CTEST_TEST_TIMEOUT: "300"
CTEST_BUILD_CONFIGURATION: Release
CTEST_CONFIGURATION_TYPE: Release
# Build matrix. (defines different configuration for multiple jobs)
matrix:
- GENERATOR: "%CTEST_CMAKE_GENERATOR%"
cache:
# Caching ITK source and build tree
- '%ITK_SOURCE_DIR%'
- '%ITK_BINARY_DIR%'
build:
parallel: true
verbosity: minimal
before_build:
# Checkout ITK source tree
- if not exist "%ITK_SOURCE_DIR%" (
cd C:/projects/ &
git clone --depth 1 --branch %ITK_VERSION% https://github.com/InsightSoftwareConsortium/ITK.git ITK
)
# Build ITK
- if not exist "%ITK_BINARY_DIR%" (
cd C:/projects/ &
mkdir "%ITK_BINARY_DIR%" & cd "%ITK_BINARY_DIR%" & cmake -G "%GENERATOR%" -DBUILD_TESTING:BOOL=OFF ../ITK & cmake --build . --config %BUILD_TYPE% &
exit 1
)
# Build itkTestDriver for RTK tests
- if not exist "%ITK_BINARY_DIR%/bin/itkTestDriver" (
cd "%ITK_BINARY_DIR%" &
cmake -DBUILD_TESTING:BOOL=ON . & cmake --build . --config %BUILD_TYPE% --target itkTestDriver
)
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%" & mkdir build & cd build
# Fetch ExternalData. (Retried up to 3 times if network errors occured)
- cmake -G"%CTEST_CMAKE_GENERATOR%" -DITK_DIR="%ITK_BINARY_DIR%" "%APPVEYOR_BUILD_FOLDER%"
- appveyor-retry cmake --build . --config %BUILD_TYPE% --target ITKData
# Build RTK
- ctest -V -C %CTEST_CONFIGURATION_TYPE% -S "%APPVEYOR_BUILD_FOLDER%/cmake/ci_ctest.config" -D GENERATOR="%CTEST_CMAKE_GENERATOR%" -D SRC_DIR="%CTEST_SOURCE_DIRECTORY%" -D BIN_DIR="%CTEST_BINARY_DIRECTORY%" -D CONFIG_TYPE="%CTEST_CONFIGURATION_TYPE%" -D ITK_DIR="%ITK_BINARY_DIR%" -D SITE="AppVeyor" -D BRANCH_NAME="%APPVEYOR_REPO_BRANCH%" -D PULL_REQUEST_NUMBER="%APPVEYOR_PULL_REQUEST_NUMBER%"
test: off
deploy: off