-
Notifications
You must be signed in to change notification settings - Fork 92
/
.appveyor.yml
165 lines (154 loc) · 6.09 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
# Possible test configurations for comprehensive feature coverage:
#
# Cygwin
# ------
# 1) -Dnetwork:BOOL=ON -Dnetwork-accessor=curl -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=socket -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=OFF"
# 4) (none)
#
# MinGW
# -----
# 1) -Dnetwork:BOOL=ON -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dtranscoder=windows
# 3) -Dnetwork:BOOL=OFF
# 4) (none)
#
# MSVC
# ----
# 1) -Dnetwork:BOOL=ON -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=winsock -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=ON -Dtranscoder=windows
# 4) -Dnetwork:BOOL=OFF
# 5) (none)
#
# To keep the test matrix size manageable, only a subset of these are
# used, to test each settable option, but not in every possible
# combination.
environment:
AV_PROJECTS: 'c:\projects'
AV_XERCES_DOWNLOAD: 'c:\projects\download'
AV_XERCES_TOOLS: 'c:\projects\tools'
AV_XERCES_SOURCE: 'c:\projects\xerces-c'
AV_XERCES_BUILD: 'c:\projects\build'
AV_XERCES_INSTALL: 'c:/projects/libs'
matrix:
- compiler: cygwin
configuration: Release
generator: Unix Makefiles
shared: ON
network: ON
netaccessor: curl
msgloader: inmemory
transcoder: iconv
mutexmanager: posix
xmlch: uint16_t
- compiler: cygwin
configuration: Debug
generator: Unix Makefiles
shared: OFF
network: OFF
netaccessor:
msgloader:
transcoder:
mutexmanager: standard
xmlch: char16_t
- compiler: mingw
configuration: Release
generator: Ninja
shared: ON
network: ON
netaccessor:
msgloader:
transcoder: windows
mutexmanager: windows
xmlch: wchar_t
- compiler: mingw
configuration: Debug
generator: Ninja
shared: OFF
network:
netaccessor:
msgloader:
transcoder: iconv
mutexmanager:
xmlch: uint16_t
- compiler: vc14
configuration: Release
generator: Visual Studio 14 2015 Win64
shared: ON
network: ON
netaccessor:
msgloader: icu
transcoder: windows
mutexmanager: windows
xmlch: wchar_t
mfc: ON
- compiler: vc14
configuration: Debug
generator: Visual Studio 14 2015 Win64
shared: OFF
network: OFF
netaccessor: winsock
msgloader: inmemory
transcoder: icu
mutexmanager: standard
xmlch: char16_t
mfc: OFF
# Operating system (build VM template)
os: 'Visual Studio 2015'
# clone directory
clone_folder: 'c:\projects\xerces-c'
clone_depth: 5
platform: x64
init:
- git config --global core.autocrlf input
before_build:
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_DOWNLOAD%`) DO SET AV_XERCES_CYG_DOWNLOAD=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_TOOLS%`) DO SET AV_XERCES_CYG_TOOLS=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_SOURCE%`) DO SET AV_XERCES_CYG_SOURCE=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_INSTALL%`) DO SET AV_XERCES_CYG_INSTALL=%%F'
- 'if NOT EXIST "%AV_XERCES_DOWNLOAD%\" mkdir %AV_XERCES_DOWNLOAD%'
- 'if NOT EXIST "%AV_XERCES_TOOLS%\" mkdir %AV_XERCES_TOOLS%'
- 'if %compiler%==cygwin C:\Cygwin64\setup-x86_64 -q -R C:\Cygwin64 -s http://cygwin.mirror.constant.com -l %AV_XERCES_DOWNLOAD%\cygwin -P libcurl-devel,cmake'
- if [%msgloader%] == [icu] set AV_ICU_BUILD=true
- if [%transcoder%] == [icu] set AV_ICU_BUILD=true
- 'if EXIST "%AV_PROJECTS%\icu" set AV_ICU_BUILD=false'
- 'set "PATH=C:\Program Files (x86)\cmake\bin;%AV_XERCES_TOOLS%;%PATH%"'
- 'if %compiler%==cygwin set "PATH=C:\Cygwin64\bin;%PATH%"'
- 'if %compiler%==mingw set "PATH=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%"'
- set "AV_CMAKE_ARGS=-DBUILD_SHARED_LIBS:BOOL=%shared%"
- set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dnetwork:BOOL=%network%"
- if NOT [%netaccessor%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dnetwork-accessor=%netaccessor%"
- if NOT [%msgloader%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmessage-loader=%msgloader%"
- if NOT [%transcoder%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dtranscoder=%transcoder%"
- if NOT [%mutexmanager%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmutex-manager=%mutexmanager%"
- if NOT [%xmlch%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dxmlch-type=%xmlch%"
- if NOT [%mfc%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmfc-debug=%mfc%"
- set "AV_XERCES_CMAKE_SOURCE=%AV_XERCES_SOURCE%"
- set "AV_XERCES_CMAKE_INSTALL=%AV_XERCES_INSTALL%"
- 'if %compiler%==cygwin set "AV_XERCES_CMAKE_SOURCE=%AV_XERCES_CYG_SOURCE%'
- 'if %compiler%==cygwin set "AV_XERCES_CMAKE_INSTALL=%AV_XERCES_CYG_INSTALL%'
- 'C:\cygwin64\bin\bash %AV_XERCES_CYG_SOURCE%/scripts/ci-appveyor-setup'
- set ICU_PLATFORM=x64
- if [%platform%] == [x86] set ICU_PLATFORM=Win32
- 'if [%AV_ICU_BUILD%] == [true] cd "%AV_PROJECTS%\icu"'
- 'if [%AV_ICU_BUILD%] == [true] echo "Running msbuild to build ICU"'
- 'if [%AV_ICU_BUILD%] == [true] call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %platform%'
- 'if [%AV_ICU_BUILD%] == [true] msbuild source\allinone\allinone.sln /p:Configuration=%configuration% /p:Platform=%ICU_PLATFORM% /m'
- 'if [%AV_ICU_BUILD%] == [true] set "PATH=%AV_PROJECTS%\icu\bin;%AV_PROJECTS%\icu\bin64;%PATH%"'
- 'if [%AV_ICU_BUILD%] == [true] set "CMAKE_PREFIX_PATH=%AV_PROJECTS%\icu"'
- mkdir %AV_XERCES_BUILD%
- cd %AV_XERCES_BUILD%
- echo Running cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_XERCES_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_XERCES_CMAKE_SOURCE%
- cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_XERCES_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_CMAKE_ARGS% %AV_XERCES_CMAKE_SOURCE%
build_script:
- cd %AV_XERCES_BUILD%
- cmake --build . --config %configuration%
- cmake --build . --config %configuration% --target install
after_build:
- cd %AV_XERCES_INSTALL%
- '7z a %AV_XERCES_SOURCE%\xerces-c.zip * -tzip'
before_test:
- cd %AV_XERCES_BUILD%
- ctest -V -C %configuration%