forked from Azure-Samples/Cognitive-Services-Voice-Assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
131 lines (106 loc) · 4.17 KB
/
azure-pipelines.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
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
# "Customize your pipeline" on MS docs:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/customize-pipeline
# Specific branch build with batching
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
pool:
vmImage: 'windows-latest'
variables:
# Common Build configurations
buildPlatformNative: x64
buildPlatformManaged: 'Any CPU'
buildConfiguration: Release
dotNetCoreRuntimeIdentifier: win-x64
dotNetCoreVersion: '3.1'
dotNetCorePublishArtifactPath: 'DotNetCorePublish'
dotNetCorePublishArtifactName: 'DotNetCoreExecutables'
# Sample 1: Windows Voice Assistant Client, C# WPF (\samples\clients\csharp-wpf)
sample1Name: VoiceAssistantClient
sample1Folder: 'samples\clients\csharp-wpf'
sample1Solution: '$(sample1Folder)\$(sample1Name).sln'
sample1PublishedArtifactPath: '$(sample1Folder)\$(sample1Name)\bin\$(buildPlatformNative)\$(buildConfiguration)'
sample1PublishedArtifactName: 'WindowsVoiceAssistantClientBuild'
# Sample 2: Voice Assistant Test, .NET core (\samples\clients\csharp-dotnet-core\voice-assistant-test)
sample2Name: VoiceAssistantTest
sample2Folder: 'samples\clients\csharp-dotnet-core\voice-assistant-test\tool'
sample2Solution: '$(sample2Folder)\$(sample2Name).sln'
# Sample 3: Windows console Voice Assistant Client, C++ (\samples\clients\cpp-console)
sample3Name: VoiceAssistantCPPClient
sample3Folder: 'samples\clients\cpp-console'
sample3Solution: '$(sample3Folder)\src\windows\cppSample.sln'
sample3PublishedArtifactPath: '$(sample3Folder)\out'
sample3PublishedArtifactName: 'CppSample'
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(sample1Solution)'
# Build .Net Standard applications
- task: VSBuild@1
displayName: 'VSBuild - $(sample1Name)'
inputs:
solution: '$(sample1Solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatformNative)'
configuration: '$(buildConfiguration)'
- task: PublishPipelineArtifact@1
displayName: 'PublishPipelineArtifact - Publish artifacts for $(sample1Name)'
inputs:
path: $(sample1PublishedArtifactPath)
artifact: $(sample1PublishedArtifactName)
# Build .NET Core applications and publish self-contained executables
- task: DotNetCoreCLI@2
displayName: 'DotNetCoreCLI - .NET Core build and publish $(sample2Name)'
inputs:
Command: 'publish'
Projects: $(sample2Solution)
publishWebProjects: false
Arguments: '-r $(dotNetCoreRuntimeIdentifier) -c $(buildConfiguration) -o $(dotNetCorePublishArtifactPath) /p:PublishSingleFile=true'
zipAfterPublish: false
modifyOutputPath: true
# Include all .NET Core executables in the resulting artifacts
- task: PublishPipelineArtifact@1
displayName: 'PublishPipelineArtifact - Publish artifacts for .NET core executables'
inputs:
path: $(dotNetCorePublishArtifactPath)
artifact: $(dotNetCorePublishArtifactName)
# Build cpp console application
- task: NuGetCommand@2
inputs:
restoreSolution: '$(sample3Solution)'
- task: VSBuild@1
displayName: 'VSCPPBuild - $(sample3Name)'
inputs:
solution: '$(sample3Solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatformNative)'
configuration: '$(buildConfiguration)'
#- task: VSTest@2
# inputs:
# platform: '$(buildPlatformNative)'
# configuration: '$(buildConfiguration)'
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: 'Register'
verbosity: 'Verbose'
alertWarningLevel: 'High'
- task: PoliCheck@1
inputs:
inputType: 'Basic'
targetType: 'F'
targetArgument: '$(Build.SourcesDirectory)'
result: 'PoliCheck.xml'
- task: notice@0
inputs:
outputformat: 'text'