-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.appveyor.yml
142 lines (125 loc) · 4.95 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#------------#
# Tomato #
#------------#
os:
- Visual Studio 2015
init:
- git config --global core.autocrlf input
# Set build version to git commit-hash
- ps: Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_BRANCH) - $($env:APPVEYOR_REPO_COMMIT)"
# about toolset: https://devblogs.microsoft.com/cppblog/stuck-on-an-older-toolset-version-move-to-visual-studio-2015-without-upgrading-your-toolset/
environment:
toolset: v140 # TODO: go back to v90
OPENSOURCE_EXTENDED_NAME: TomatoOpenSource_%APPVEYOR_REPO_TAG_NAME%_Windows_%PLATFORM%
USEVNL_EXTENDED_NAME: TomatoVnl_%APPVEYOR_REPO_TAG_NAME%_Windows_%PLATFORM%
FULL_EXTENDED_NAME: TomatoFull_%APPVEYOR_REPO_TAG_NAME%_Windows_%PLATFORM%
PYTHON: "C:\\Python36"
platform:
- x64
configuration:
- Release
install:
- cmd: set PATH=%PATH%;%PYTHON%\Scripts\
- cmd: echo %PATH%
- "%PYTHON%\\Scripts\\pip.exe install urllib3==1.25.11" # fix for 10.11.2020, probably soon it will be ok to delete it
- "%PYTHON%\\Scripts\\pip.exe install conan"
- cmd: conan user # Create the conan data directory
- cmd: conan --version
- cmd: conan remote add artifactory https://mrkonrad.jfrog.io/artifactory/api/conan/tomato
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- conan create . user/testing -s build_type=Release -o tomato:build_testing=True -o tomato:use_tomato_private=True
#-----------------------#
# Tomato opensource #
#-----------------------#
# build tomato open source
- mkdir %APPVEYOR_BUILD_FOLDER%\opensource
- cd %APPVEYOR_BUILD_FOLDER%\opensource
- conan install .. -s build_type=%CONFIGURATION% -s compiler.toolset=%toolset% -g cmake_find_package -o use_lmfit=False -o use_yaml=True -o build_testing=True
- >-
cmake ..
-A%PLATFORM%
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\opensource_install
-T %toolset%
-DUSE_LMFIT=OFF
-DBUILD_SHARED_LIBS=ON
- cmake --build . --config %CONFIGURATION% --target ALL_BUILD
- cmake --build . --config %CONFIGURATION% --target INSTALL
#--------------------#
# Tomato full VNL #
#--------------------#
# get private code
- cd %APPVEYOR_BUILD_FOLDER%\..
- git clone https://MRKonrad:%GH_PERSONAL_ACCESS_TOKEN%@github.com/MRKonrad/tomato_private
- cd %APPVEYOR_BUILD_FOLDER%\..
# build full tomato
- mkdir %APPVEYOR_BUILD_FOLDER%\full_vnl
- cd %APPVEYOR_BUILD_FOLDER%\full_vnl
- conan install .. -s build_type=%CONFIGURATION% -s compiler.toolset=%toolset% -g cmake_find_package -o use_lmfit=False -o use_vnl=True -o use_itk=False -o use_yaml=True -o build_testing=True
- >-
cmake ..
-A%PLATFORM%
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\full_vnl_install
-T %toolset%
-DUSE_PRIVATE_NR2=ON
-DUSE_LMFIT=OFF
-DBUILD_SHARED_LIBS=ON
-DUSE_ITK=OFF
-DUSE_VNL=ON
-DDOWNLOAD_DEPENDENCIES=OFF
- cmake --build . --config %CONFIGURATION% --target ALL_BUILD
- cmake --build . --config %CONFIGURATION% --target INSTALL
-
#--------------------#
# Tomato full ITK #
#--------------------#
# build full tomato
- mkdir %APPVEYOR_BUILD_FOLDER%\full_itk
- cd %APPVEYOR_BUILD_FOLDER%\full_itk
- conan install .. -s build_type=%CONFIGURATION% -s compiler.toolset=%toolset% -g cmake_find_package -o use_lmfit=False -o use_vnl=False -o use_itk=True -o use_yaml=True -o build_testing=True
- >-
cmake ..
-A%PLATFORM%
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\full_itk_install
-T %toolset%
-DUSE_PRIVATE_NR2=ON
-DUSE_LMFIT=OFF
-DBUILD_SHARED_LIBS=ON
-DUSE_ITK=ON
-DDOWNLOAD_DEPENDENCIES=ON
- cmake --build . --config %CONFIGURATION% --target ALL_BUILD
- cmake --build . --config %CONFIGURATION% --target INSTALL
after_build:
# TODO: enable DEPLOYMENT
# FOR DEPLOYMENT
- cd %APPVEYOR_BUILD_FOLDER%
- mkdir deployment
# zip the files for the deployment
# - cd %APPVEYOR_BUILD_FOLDER%\opensource_install
# - 7z a %OPENSOURCE_EXTENDED_NAME%.zip bin\* lib\* include\* # zip
- cd %APPVEYOR_BUILD_FOLDER%\full_vnl_install
- 7z a %USEVNL_EXTENDED_NAME%.zip lib\* include\* # zip
- cd %APPVEYOR_BUILD_FOLDER%\full_itk_install
- 7z a %FULL_EXTENDED_NAME%.zip bin\* lib\* include\* # zip
# copy the files for the deployment
# - copy %APPVEYOR_BUILD_FOLDER%\opensource_install\%OPENSOURCE_EXTENDED_NAME%.zip %APPVEYOR_BUILD_FOLDER%\deployment\%OPENSOURCE_EXTENDED_NAME%.zip
- copy %APPVEYOR_BUILD_FOLDER%\full_itk_install\%FULL_EXTENDED_NAME%.zip %APPVEYOR_BUILD_FOLDER%\deployment\%FULL_EXTENDED_NAME%.zip
test_script:
- cd %APPVEYOR_BUILD_FOLDER%\opensource_install\tests\
- TomatoTests.exe
- cd %APPVEYOR_BUILD_FOLDER%\full_vnl_install\tests\
- TomatoTests.exe
- cd %APPVEYOR_BUILD_FOLDER%\full_itk_install\tests\
- TomatoTests.exe
artifacts:
- path: deployment\*.*
deploy:
provider: GitHub
auth_token:
secure: Nmbbo4JCoK5AuN1ugWmE/c8/BAXlpz8Lb7piWDcAAWnT/GFa7fwL20GbXyU9AZSn
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true # deploy on tag push only
configuration: Release