forked from mlpack/mlpack
/
windows-steps.yaml
153 lines (136 loc) · 5.41 KB
/
windows-steps.yaml
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
steps:
- checkout: self
clean: true
fetchDepth: 1
- task: NuGetToolInstaller@0
inputs:
versionSpec: '5.3.0'
# Fetch build dependencies
- powershell: |
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
nuget install boost -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_unit_test_framework-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_program_options-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_random-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_serialization-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_math_c99-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
mkdir -p $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
displayName: 'Fetch build dependencies'
# Configure armadillo
- bash: |
git clone --depth 1 https://github.com/mlpack/jenkins-conf.git conf
curl -O http://masterblaster.mlpack.org:5005/armadillo-8.400.0.tar.gz -o armadillo-8.400.0.tar.gz
tar -xzvf armadillo-8.400.0.tar.gz
cd armadillo-8.400.0/ && cmake $(CMakeGenerator) \
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
-DCMAKE_PREFIX:FILEPATH=../../armadillo \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release .
displayName: 'Configure armadillo'
# Build armadillo
- task: MSBuild@1
inputs:
solution: 'armadillo-8.400.0/*.sln'
msbuildLocationMethod: 'location'
msbuildVersion: $(MSBuildVersion)
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArguments: /m /p:BuildInParallel=true
clean: false
maximumCpuCount: false
displayName: 'Build armadillo'
# Configure mlpack
- powershell: |
mkdir build
cd build
cmake $(CMakeGenerator) `
$(CMakeArgs) `
-DBLAS_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
-DLAPACK_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
-DARMADILLO_INCLUDE_DIR="..\armadillo-8.400.0\include" `
-DARMADILLO_LIBRARY="..\armadillo-8.400.0\Release\armadillo.lib" `
-DBOOST_INCLUDEDIR=$(Agent.ToolsDirectory)\boost.1.60.0.0\lib\native\include `
-DBOOST_LIBRARYDIR=$(Agent.ToolsDirectory)\boost_libs `
-DCMAKE_BUILD_TYPE=Release ..
displayName: 'Configure mlpack'
# Build mlpack
- task: MSBuild@1
inputs:
solution: 'build/*.sln'
msbuildLocationMethod: 'location'
msbuildVersion: $(MSBuildVersion)
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArguments: /m /p:BuildInParallel=true
maximumCpuCount: false
clean: false
displayName: 'Build mlpack'
# Configure mlpack
- powershell: |
cp $(Agent.ToolsDirectory)\boost_libs\*.* build\Release\
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\*.* build\Release\
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* build\Release\
displayName: 'Configure mlpack'
# Run tests
- bash: |
cd build
ls
Release/mlpack_test.exe --result_code=no --report_level=detailed --log_level=test_suite --log_format=HRF --log_sink=res.txt
displayName: 'Run tests'
# Run tests via ctest.
- bash: |
cd build
CTEST_OUTPUT_ON_FAILURE=1 ctest -T Test -C Release .
displayName: 'Run tests via ctest'
# Copy artifacts
- powershell: |
mkdir exe-archive
cp build\Release\*.exe exe-archive\
displayName: 'Copy artifacts'
# Build artifacts archive
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'exe-archive\'
includeRootFolder: false
archiveType: 'zip'
archiveFile: $(ArchiveNoLibs)
replaceExistingArchive: true
displayName: 'Build artifacts'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'build\Release\'
includeRootFolder: false
archiveType: 'zip'
archiveFile: $(ArchiveLibs)
replaceExistingArchive: true
displayName: 'Build artifacts'
# Publish artifacts to Azure Pipelines
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(ArchiveNoLibs)
artifactName: $(ArchiveNoLibs)
displayName: 'Publish artifacts no-libs'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(ArchiveLibs)
artifactName: $(ArchiveLibs)
displayName: 'Publish artifacts complete'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'build/Testing/'
artifactName: 'Tests'
displayName: 'Publish artifacts test results'
# Publish test results to Azure Pipelines
- task: PublishTestResults@2
inputs:
testResultsFormat: cTest
testResultsFiles: build/Testing/*/Test.xml
failTaskOnFailedTests: true
displayName: 'Publish tests'