Skip to content
Permalink
Browse files

Reinclude Appveyor build config, since the MSI installer script isn't…

… part of the azure pipeline.
  • Loading branch information
zoq committed Dec 4, 2019
1 parent f960fd5 commit befd1bd73be3d7139ff29a629af5db729aa9c2f5
Showing with 256 additions and 0 deletions.
  1. +256 −0 .appveyor.yml
@@ -0,0 +1,256 @@
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://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz"
ARMADILLO_LIBRARY : "C:/projects/mlpack/armadillo-8.400.0/\
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
MSBUILD: C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VSVER: Visual Studio 15 2017 Win64
MSBUILD: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
# Currently, the VS2019 build seems to always time out. This seems to be an
# AppVeyor issue.
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# VSVER: Visual Studio 16 2019
# MSBUILD: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe


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%
- >
appveyor DownloadFile %ARMADILLO_DOWNLOAD%
-FileName armadillo.tar.xz
- 7z x armadillo.tar.xz -so -txz | 7z x -si -ttar > nul
- cd armadillo-8.400.0 && mkdir build && cd build
- >
cmake -G "%VSVER%"
-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 ..
- >
"%MSBUILD%" "C:\projects\mlpack\armadillo-8.400.0\build\armadillo.sln"
/m /verbosity:quiet /p:Configuration=Release;Platform=x64
- cd C:\projects\mlpack && mkdir build && cd build
- >
cmake -G "%VSVER%"
-DBLAS_LIBRARY:FILEPATH=%BLAS_LIBRARY%
-DLAPACK_LIBRARY:FILEPATH=%BLAS_LIBRARY%
-DARMADILLO_INCLUDE_DIR="C:/projects/mlpack/armadillo-8.400.0/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 ..
- >
"%MSBUILD%" "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
- ps: >
cp C:\projects\mlpack\src\mlpack\tests\data\german.csv
C:\projects\mlpack\dist\win-installer\staging\examples\sample-ml-app\sample-ml-app\data\
# 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));

0 comments on commit befd1bd

Please sign in to comment.
You can’t perform that action at this time.