forked from mlpack/mlpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
95 lines (81 loc) · 7.77 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
clone_depth: 10
environment:
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%
- 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)+'.'+$ver[1].substring($ver[1].length-1,1)+'.'+$ver[2].substring($ver[2].length-1,1))
- echo MLPACK_VERSION is %MLPACK_VERSION%
build_script:
- mkdir boost_libs
- ps: cp C:\projects\mlpack\boost_program_options-vc140.1.60.0.0\lib\native\address-model-64\lib\*.* C:\projects\mlpack\boost_libs\
- ps: cp C:\projects\mlpack\boost_math_c99-vc140.1.60.0.0\lib\native\address-model-64\lib\*.* C:\projects\mlpack\boost_libs\
- ps: cp C:\projects\mlpack\boost_random-vc140.1.60.0.0\lib\native\address-model-64\lib\*.* C:\projects\mlpack\boost_libs\
- ps: cp C:\projects\mlpack\boost_serialization-vc140.1.60.0.0\lib\native\address-model-64\lib\*.* C:\projects\mlpack\boost_libs\
- ps: cp C:\projects\mlpack\boost_unit_test_framework-vc140.1.60.0.0\lib\native\address-model-64\lib\*.* C:\projects\mlpack\boost_libs\
- if not exist armadillo.tar.xz appveyor DownloadFile "http://sourceforge.net/projects/arma/files/armadillo-7.800.2.tar.xz" -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="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DLAPACK_LIBRARY:FILEPATH="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -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="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DLAPACK_LIBRARY:FILEPATH="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DARMADILLO_INCLUDE_DIR="C:/projects/mlpack/armadillo-7.800.2/include" -DARMADILLO_LIBRARY:FILEPATH="C:\projects\mlpack\armadillo-7.800.2\build\Debug\armadillo.lib" -DBOOST_INCLUDEDIR:PATH="C:\projects\mlpack\boost.1.60.0.0\lib\native\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('http://ci.mlpack.org/job/mlpack%20-%20doxygen%20build/lastSuccessfulBuild/artifact/build/doc/html/*zip*/html.zip', '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('C:\projects\mlpack\dist\win-installer\jenkinsdoc.zip', '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
# 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-%MLPACK_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:
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))