forked from microsoft/Windows-Machine-Learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-samples.yml
218 lines (195 loc) · 8.56 KB
/
azure-pipelines-samples.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
resources:
- repo: self
clean: true
pool:
vmImage: 'windows-latest'
# pool:
# name: DirectML_BuildPool
# demands: agent.osversion -equals 10.0.17763
variables:
SamplesBin: SamplesBin
WINDOWS_WINMD: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0\Windows.winmd
WindowsTargetPlatformVersion: 10.0.19041.0
# CI trigger
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- Tools
jobs:
- job: Public_Samples_Build
timeoutInMinutes: 90
strategy:
maxParallel: 8
matrix:
Release_x64:
BuildPlatform: x64
BuildConfiguration: Release
Debug_x64:
BuildPlatform: x64
BuildConfiguration: Debug
Release_x86:
BuildPlatform: x86
BuildConfiguration: Release
Debug_x86:
BuildPlatform: x86
BuildConfiguration: Debug
steps:
- task: PowerShell@2
displayName: 'Clone Git Submodules'
inputs:
targetType: inline
script: git submodule update --init --recursive
- task: NuGetToolInstaller@1
displayName: 'Install NuGet 5.11.0'
inputs:
versionSpec: '5.11.0'
- task: PowerShell@2
displayName: 'Install the win 10 sdk v19041 if necessary'
inputs:
targetType: inline
script: choco install windows-sdk-10-version-2004-all -y
- task: PowerShell@1
displayName: OpenCV - Configure CMake
inputs:
scriptName: external/tools/CMakeConfigureOpenCV.ps1
workingDirectory: $(System.ArtifactsDirectory)
arguments: >
-Architecture $(BuildPlatform)
- task: VSBuild@1
displayName: 'OpenCV - Build'
inputs:
solution: 'build/external/opencv/cmake_config/$(BuildPlatform)/OpenCV.sln"'
vsVersion: "16.0"
msbuildArgs: '/p:Configuration=$(BuildConfiguration) /t:Build /p:LinkIncremental=false /p:DebugSymbols=false /p:DebugType=None'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: VSBuild@1
displayName: 'OpenCV - Install'
inputs:
solution: 'build/external/opencv/cmake_config/$(BuildPlatform)/INSTALL.vcxproj'
vsVersion: "16.0"
msbuildArgs: '/p:Configuration=$(BuildConfiguration) /p:LinkIncremental=false /p:DebugSymbols=false /p:DebugType=None'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: PowerShell@2
displayName: 'Restore WinMLSamplesGalleryNative Nuget Packages'
inputs:
targetType: 'inline'
script: |
$src_root_dir = $Env:BUILD_SOURCESDIRECTORY;
$solution_dir = [System.IO.Path]::Combine($src_root_dir, 'Samples', 'WinMLSamplesGallery')
$csproj = [System.IO.Path]::Combine($solution_dir, 'WinMLSamplesGalleryNative', 'WinMLSamplesGalleryNative.vcxproj')
nuget restore $csproj -SolutionDirectory $solution_dir
- task: VSBuild@1
displayName: 'Build WinMLSamplesGallery Debug'
inputs:
solution: 'Samples/WinMLSamplesGallery/WinMLSamplesGallery.sln'
vsVersion: "16.0"
msbuildArgs: '/p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: and(succeededOrFailed(), eq(variables['BuildConfiguration'], 'Debug'))
- task: VSBuild@1
displayName: 'Build And Publish WinMLSamplesGallery Release'
inputs:
solution: 'Samples/WinMLSamplesGallery/WinMLSamplesGallery.sln'
vsVersion: "16.0"
msbuildArgs: '/p:UapAppxPackageBuildMode=SideloadOnly /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always "/p:AppxBundlePlatforms=x86|x64|arm64" /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build,Publish'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: and(succeededOrFailed(), eq(variables['BuildConfiguration'], 'Release'))
- task: VSBuild@1
displayName: 'Build UI test solution Testing/**/SamplesTest.sln'
inputs:
solution: 'Testing/**/SamplesTest.sln'
vsVersion: "16.0"
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\SamplesTest\ /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: VSBuild@1
displayName: 'Build MNIST-Tutorial-cs Sample'
inputs:
solution: 'Samples/MNIST/Tutorial/cs/mnist_demo.sln'
vsVersion: "16.0"
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\MNIST-Tutorial\ /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: VSBuild@1
displayName: 'Build MNIST-UWP-cs Sample'
inputs:
solution: 'Samples/MNIST/UWP/cs/mnist_demo.sln'
vsVersion: "16.0"
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\MNIST-cs\ /p:AppxBundle=Never /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)_NuGet'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: VSBuild@1
displayName: 'Build FNSCandyStyleTransfer-UWP-CS Sample'
inputs:
solution: Samples/FNSCandyStyleTransfer/UWP/CS/snapcandy.sln
vsVersion: "16.0"
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\FNSCandyStyleTransfer\ /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: VSBuild@1
displayName: 'Build MNIST-UWP-cppcx Sample'
inputs:
solution: 'Samples/MNIST/UWP/cppcx/mnist_cppcx.sln'
vsVersion: "16.0"
msbuildArgs: '-v:diag /p:OutDir=$(System.DefaultWorkingDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)\MNIST-cppcx\ /p:AppxPackageSigningEnabled=false /p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion) /t:Restore,Clean,Build'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64
createLogFile: true
condition: succeededOrFailed()
- task: CopyFiles@2
inputs:
targetFolder: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)\'
sourceFolder: 'Samples\WinMLSamplesGallery\WinMLSamplesGallery (Package)\bin\$(BuildPlatform)\$(BuildConfiguration)\'
Contents: |
**\SamplesTest\**
**\AppPackages\**
condition: succeededOrFailed()
- task: CopyFiles@2
inputs:
targetFolder: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)\'
sourceFolder: 'Samples\WinMLSamplesGallery\WinMLSamplesGallery (Package)\bin\$(BuildPlatform)\$(BuildConfiguration)\'
Contents: |
?(AdapterSelection|CustomOperator|CustomTensorization)**\*
SqueezeNetObjectDetection\*
condition: succeededOrFailed()
- task: PowerShell@2
displayName: 'Move App Packages'
inputs:
targetType: 'inline'
script: 'mv Samples/WinMLSamplesGallery/"WinMLSamplesGallery (Package)"/AppPackages $(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)\AppPackages'
condition: and(succeededOrFailed(), eq(variables['BuildConfiguration'], 'Release'))
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Samples'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: WinMLPublicSamples
condition: succeededOrFailed()