-
Notifications
You must be signed in to change notification settings - Fork 184
/
appveyor.yml
180 lines (158 loc) · 5.97 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
# Set build version format here instead of in the admin panel.
version: 3.1.0.{build}
# http://www.appveyor.com/docs/build-cache#caching-chocolatey-packages
# https://github.com/kvirc/KVIrc/blob/master/.appveyor.yml
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
- 'C:\Program Files (x86)\NSIS'
## http://www.appveyor.com/docs/installed-software#python
## Python 2.7; 32-bit version
# - python: C:\Python27;C:\Python27\Scripts
## Python 2.7; 64-bit version
# - python: C:\Python27-x64;C:\Python27-x64\Scripts
## Python 3.4; 32-bit version
# - python: C:\Python34;C:\Python34\Scripts
## Python 3.4; 64-bit version
# - python: C:\Python34-x64;C:\Python34-x64\Scripts
environment:
matrix:
- VS_GEN: Visual Studio 12 2013
CONFIG: Release
B_NAME: Windows-x86
DO_REL: true
PYTHONHOME: C:\Python37
JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
- VS_GEN: Visual Studio 12 2013 Win64
CONFIG: Release
B_NAME: Windows-x86_64
DO_REL: true
PYTHONHOME: C:\Python37-x64
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
# - VS_GEN: Visual Studio 14 2015 Win64
# CONFIG: Release
# B_NAME: Win64
# - VS_GEN: MinGW Makefiles
# CONFIG: None
# B_NAME: MinGW
# - VS_GEN: MSYS Makefiles
# CONFIG: None
# B_NAME: Msys
# - VS_GEN: Visual Studio 14 2015 ARM
# CONFIG: Debug
# B_NAME: ARM
matrix:
fast_finish: true
# Operating system (build VM template)
os: Visual Studio 2015
branches:
except:
- coverity_scan
#You can disable builds on new tags through UI (General tab of project settings) or in appveyor.yml:
# skip tag building since v2.7.0 will trigger an infinite loop
skip_tags: true
# scripts that are called at very beginning, before repo cloning
init:
# Print environment info ( set / systeminfo)
- set PATH=%JAVA_HOME%\bin;%PYTHONHOME%;%PATH%
- msbuild /version
- cmake --version
- python --version
- java -version
# https://github.com/chocolatey/chocolatey/issues/431
- del c:\programdata\chocolatey\bin\cpack.exe
# scripts that run after cloning repository
# https://www.appveyor.com/docs/build-configuration#powershell
install:
# Fetch submodules
#- git submodule update --init --recursive
# PowerShell
#- ps: (New-Object Net.WebClient).DownloadFile('http://download.microsoft.com/download/f/2/6/f263ac46-1fe9-4ae9-8fd3-21102100ebf5/msxsl.exe', "$env:appveyor_build_folder\msxsl.exe")
#- msxsl -? --> code return is 1 !!
# chocolatey:
- ps: |
if (Test-Path "C:/ProgramData/chocolatey/bin/swig.exe") {
echo "using swig from cache"
} else {
choco install -y swig > $null
}
- swig -version
# https://chocolatey.org/packages/nsis.install/
- ps: |
if (Test-Path "C:/Program Files (x86)/NSIS/makensis.exe") {
echo "using nsis from cache"
} else {
choco install -y nsis.install -pre -version 2.46.0.20150406
}
- cmd: SET PATH=%PATH%;C:\Program Files (x86)\NSIS
on_failure:
- ctest -D ExperimentalSubmit -C %CONFIG% -Q
# Display error log file if generated
- dir C:\projects\gdcm\bin
- dir C:\projects\gdcm\bin\Release
#- if exist C:\ProgramData\chocolatey\logs\chocolatey.log type C:\ProgramData\chocolatey\logs\chocolatey.log
# scripts to run before build
before_build:
- cmake -Wno-dev -G"%VS_GEN%" -DCMAKE_BUILD_TYPE=%CONFIG% -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF -DGDCM_BUILD_TESTING:BOOL=ON -DGDCM_BUILD_APPLICATIONS:BOOL=ON -DGDCM_BUILD_EXAMPLES:BOOL=ON -DGDCM_BUILD_SHARED_LIBS:BOOL=ON -DBUILDNAME:STRING=%COMPUTERNAME%-%APPVEYOR_REPO_BRANCH%-%B_NAME% -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_WRAP_JAVA:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_USE_PVRG:BOOL=ON -DGDCM_LEGACY_SILENT:BOOL=ON -DCPACK_SYSTEM_NAME:STRING=%B_NAME% .
- ctest -D ExperimentalStart -C %CONFIG%
# scripts to run after build
after_build:
# create NSIS installer
- cpack -G NSIS -C %CONFIG% || true
# create binary zip
- cpack -G ZIP -C %CONFIG% || true
# no need for source release on github
# to run your custom scripts instead of automatic MSBuild
build_script:
# Do not run Test=Update/Configure, only Start/Build/Test/Submit (TODO: Coverage)
- ctest -D ExperimentalBuild -j %NUMBER_OF_PROCESSORS% -C %CONFIG% -Q
# scripts to run after tests
after_test:
# to run your custom scripts instead of automatic tests
test_script:
- ctest -D ExperimentalTest -j %NUMBER_OF_PROCESSORS% -C %CONFIG% -Q || true
- ctest -D ExperimentalSubmit -C %CONFIG% -Q
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: GDCM-*-$(B_NAME).exe
name: installer
- path: GDCM-*-$(B_NAME).zip
name: zip_executable
type: zip
#---------------------------------#
# deployment configuration #
#---------------------------------#
# scripts to run before deployment
#before_deploy:
# scripts to run after deployment
#after_deploy:
# to run your custom scripts instead of provider deployments
#deploy_script:
# Deploy to GitHub Releases http://www.appveyor.com/docs/deployment/github
# http://www.appveyor.com/docs/branches
# AppVeyor sets APPVEYOR_REPO_TAG environment variable to distinguish regular
# commits from tags - the value is True if tag was pushed; otherwise it's
# False. When it's True the name of tag is stored in APPVEYOR_REPO_TAG_NAME.
deploy:
- provider: NuGet
api_key:
secure: T6GXp3POj8sDGZWmZ5tkLgdbyLjllar/ZVLNn96SkrI3IDBq+L3GFMH13FEZs0uR
skip_symbols: true
artifact: nuget_package
- provider: GitHub
auth_token:
secure: Fn2cUcuBMVpvBXDzTQiUm2kqZ4AA39z4iyFUS3BsaPWjJEbJgFpmJYoJm2twjVpk
release: v3.1.0
description: 'Beta release of GDCM v$(appveyor_build_version)'
# github automatically does source zip/tarball for us
artifact: installer,zip_executable
draft: false
prerelease: true
on:
branch: master # release from master branch only
appveyor_repo_tag: false # deploy on tag push only
do_rel: true