forked from mlpack/mlpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
250 lines (233 loc) · 9.16 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
clone_depth: 10
environment:
BOOST_PROG_OPTION : "C:/projects/mlpack/\
boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_MATH : "C:/projects/mlpack/\
boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_RANDOM : "C:/projects/mlpack/\
boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_SERIALIZATION : "C:/projects/mlpack/\
boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_UNIT_TEST : "C:/projects/mlpack/\
boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
ARMADILLO_DOWNLOAD : "http://sourceforge.net/projects/arma/files/\
armadillo-7.800.2.tar.xz"
ARMADILLO_LIBRARY : "C:/projects/mlpack/armadillo-7.800.2/\
build/Debug/armadillo.lib"
BLAS_LIBRARY : "%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/\
libopenblas.dll.a"
BOOST_INCLUDE : "C:/projects/mlpack/boost.1.60.0.0/lib/native/include"
JENKINS_DOC_DOWNLOAD : "http://ci.mlpack.org/job/mlpack%20-%20doxygen%20\
build/lastSuccessfulBuild/artifact/build/doc/html/*zip*/html.zip"
JENKINS_DOC : "C:/projects/mlpack/dist/win-installer/jenkinsdoc.zip"
GIT_VERSION_FILE : "C:/projects/mlpack/src/mlpack/core/util/gitversion.hpp"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VSVER: Visual Studio 14 2015 Win64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VSVER: Visual Studio 15 2017 Win64
configuration: Release
os: Visual Studio 2015
install:
- ps: nuget install boost -o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_unit_test_framework-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_program_options-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_random-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_serialization-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_math_c99-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: nuget install OpenBLAS -o "${env:APPVEYOR_BUILD_FOLDER}"
- set path=C:\Program Files (x86)\WiX Toolset v3.11\bin;%path%
build_script:
- mkdir boost_libs
- ps: cp ${env:BOOST_PROG_OPTION} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_MATH} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_RANDOM} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_SERIALIZATION} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_UNIT_TEST} C:\projects\mlpack\boost_libs\
- echo TEST_ARMA is %ARMADILLO_DOWNLOAD%
- >
if not exist armadillo.tar.xz
appveyor DownloadFile %ARMADILLO_DOWNLOAD%
-FileName armadillo.tar.xz
- 7z x armadillo.tar.xz -so | 7z x -si -ttar > nul
- cd armadillo-7.800.2 && mkdir build && cd build
- >
cmake -G "Visual Studio 14 2015 Win64"
-DBLAS_LIBRARY:FILEPATH=%BLAS_LIBRARY%
-DLAPACK_LIBRARY:FILEPATH=%BLAS_LIBRARY%
-DCMAKE_PREFIX:FILEPATH="%APPVEYOR_BUILD_FOLDER%/armadillo"
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=Release ..
- >
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
"C:\projects\mlpack\armadillo-7.800.2\build\armadillo.sln"
/m /verbosity:quiet /p:Configuration=Release;Platform=x64
- cd C:\projects\mlpack && mkdir build && cd build
- >
cmake -G "Visual Studio 14 2015 Win64"
-DBLAS_LIBRARY:FILEPATH=%BLAS_LIBRARY%
-DLAPACK_LIBRARY:FILEPATH=%BLAS_LIBRARY%
-DARMADILLO_INCLUDE_DIR="C:/projects/mlpack/armadillo-7.800.2/include"
-DARMADILLO_LIBRARY:FILEPATH=%ARMADILLO_LIBRARY%
-DBOOST_INCLUDEDIR:PATH=%BOOST_INCLUDE%
-DBOOST_LIBRARYDIR:PATH="C:/projects/mlpack/boost_libs"
-DDEBUG=OFF
-DPROFILE=OFF
-DBUILD_PYTHON_BINDINGS=OFF
-DCMAKE_BUILD_TYPE=Release ..
- >
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
"C:\projects\mlpack\build\mlpack.sln"
/m /verbosity:minimal /nologo /p:BuildInParallel=true
/p:Configuration=Release;Platform=x64
# Zip Artifacts.
- >
7z a mlpack-windows-no-libs.zip
"%APPVEYOR_BUILD_FOLDER%\build\Release\*.exe"
- >
7z a mlpack-windows.zip
"%APPVEYOR_BUILD_FOLDER%\build\Release\*.*"
"%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/*.*"
# Pulling documentation for the installer.
- ps: >
try{(new-object net.webclient).DownloadFile(${env:JENKINS_DOC_DOWNLOAD},
'C:\projects\mlpack\dist\win-installer\jenkinsdoc.zip')}
catch{Write-Output "Unable to pull jenkins doc, skipping!"}
- ps: >
try{(Add-Type -AssemblyName System.IO.Compression.FileSystem);
[System.IO.Compression.ZipFile]::ExtractToDirectory(${env:JENKINS_DOC},
'C:\projects\mlpack\dist\win-installer\staging\doc')}
catch{Write-Output "Unable to add doc to installer, skipping!"}
# Preparing installer staging.
- cd C:\projects\mlpack\dist\win-installer\staging && mkdir lib
- ps: >
cp C:\projects\mlpack\build\Release\*.lib
C:\projects\mlpack\dist\win-installer\staging\lib\
- ps: >
cp C:\projects\mlpack\build\Release\*.exp
C:\projects\mlpack\dist\win-installer\staging\lib\
- ps: >
cp C:\projects\mlpack\build\Release\*.dll
C:\projects\mlpack\dist\win-installer\staging\
- ps: >
cp C:\projects\mlpack\build\Release\*.exe
C:\projects\mlpack\dist\win-installer\staging\
- ps: >
cp C:\projects\mlpack\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.dll
C:\projects\mlpack\dist\win-installer\staging\
- ps: >
cp C:\projects\mlpack\boost_libs\boost_unit_test_framework-vc*.dll
C:\projects\mlpack\dist\win-installer\staging\
- ps: >
cp C:\projects\mlpack\build\include\mlpack
C:\projects\mlpack\dist\win-installer\staging -recurse
- ps: >
cp C:\projects\mlpack\doc\examples
C:\projects\mlpack\dist\win-installer\staging -recurse
# Checking current gitversion or mlpack version.
- ps: >
$ver = (Get-Content
"${env:APPVEYOR_BUILD_FOLDER}\src\mlpack\core\util\version.hpp" |
where {$_ -like "*MLPACK_VERSION*"});
$env:MLPACK_VERSION += $ver[0].substring($ver[0].length - 1, 1) + '.';
$env:MLPACK_VERSION += $ver[1].substring($ver[1].length - 1, 1) + '.';
$env:MLPACK_VERSION += $ver[2].substring($ver[2].length - 1, 1);
if (Test-Path ${env:GIT_VERSION_FILE})
{
$ver = (Get-Content ${env:GIT_VERSION_FILE});
$env:INSTALL_VERSION = $ver.Split('"')[1].Split(' ')[1];
}
else
{
$env:INSTALL_VERSION = $env:MLPACK_VERSION;
}
- echo INSTALL_VERSION is %INSTALL_VERSION%
# Building MSI installer.
- cd C:\projects\mlpack\dist\win-installer\mlpack-win-installer
- >
heat dir ..\staging
-cg HeatGenerated
-dr INSTALLFOLDER
-sreg
-srd
-var var.HarvestPath
-ag
-sfrag
-out HeatGeneratedFileList.wxs
- >
candle -dHarvestPath=..\staging
-dConfiguration=Release
-dOutDir=bin\x64\Release\
-dPlatform=x64
-dProjectDir=.
-dProjectExt=.wixproj
-dProjectFileName=mlpack-win-installer.wixproj
-dProjectName=mlpack-win-installer
-dProjectPath=mlpack-win-installer.wixproj
-dTargetDir=.\bin\x64\Release\
-dTargetExt=.msi
-dTargetFileName=mlpack-windows.msi
-dTargetName=mlpack-windows
-dTargetPath=.\bin\x64\Release\mlpack-windows.msi
-out obj\x64\Release\
-arch x64
-ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUIExtension.dll"
Product.wxs HeatGeneratedFileList.wxs
- >
light -out .\bin\x64\Release\mlpack-%INSTALL_VERSION%.msi
-pdbout .\bin\x64\Release\mlpack-windows.wixpdb
-cultures:null
-loc mlpack-localization.wxl
-ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUIExtension.dll"
-contentsfile
obj\x64\Release\mlpack-win-installer.wixproj.BindContentsFileListnull.txt
-outputsfile
obj\x64\Release\mlpack-win-installer.wixproj.BindOutputsFileListnull.txt
-builtoutputsfile
obj\x64\Release\mlpack-win-installer.wixproj.BindBuiltOutputsFileListnull.txt
-wixprojectfile
mlpack-win-installer.wixproj
obj\x64\Release\Product.wixobj
obj\x64\Release\HeatGeneratedFileList.wixobj
artifacts:
- path: 'build\*.zip'
name: mlpack-windows-zip
- path: 'dist\win-installer\mlpack-win-installer\bin\x64\Release\*.msi'
name: mlpack-windows-installer
notifications:
- provider: Email
to:
- mlpack-git@lists.mlpack.org
on_build_success: true
on_build_failure: true
on_build_status_changed: true
cache:
- packages -> **\packages.config
- armadillo.tar.xz -> appveyor.yaml
test_script:
# Copy all DLLs into the right place before running the test.
- ps: cp C:\projects\mlpack\boost_libs\*.* C:\projects\mlpack\build\
- ps: >
cp C:\projects\mlpack\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.*
C:\projects\mlpack\build\
- cd "%APPVEYOR_BUILD_FOLDER%/build/"
- >
Release\mlpack_test.exe
--report_level=detailed
--log_level=test_suite --log_format=XML > mlpack_test.xml & exit 0
# Attempt to upload results to AppVeyor.
- ps: >
$wc = New-Object 'System.Net.WebClient';
$wc.UploadFile(
"https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)",
(Resolve-Path .\mlpack_test.xml));