Skip to content

Commit 579dc03

Browse files
committed
Update azure-pipelines.yml
1 parent 5d7eaa9 commit 579dc03

File tree

1 file changed

+55
-20
lines changed

1 file changed

+55
-20
lines changed

dev/build/azure-pipelines.yml

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,68 @@
1-
# .NET Desktop
2-
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
3-
# Add steps that publish symbols, save build artifacts, and more:
4-
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
5-
61
trigger:
72
- master
83

9-
pool:
10-
vmImage: 'windows-latest'
4+
strategy:
5+
matrix:
6+
7+
'Build and Test on MacOS':
8+
purpose: 'library'
9+
imageName: 'macOS-latest'
10+
11+
'Build and Test on Linux':
12+
purpose: 'library'
13+
imageName: 'ubuntu-latest'
14+
15+
'Build and Test on Windows':
16+
purpose: 'library'
17+
imageName: 'windows-latest'
1118

12-
variables:
13-
solution: 'src/*.sln'
14-
buildPlatform: 'Any CPU'
15-
buildConfiguration: 'Release'
19+
'Rebuild Solution on Windows':
20+
purpose: 'solution'
21+
imageName: 'windows-latest'
22+
23+
pool:
24+
vmImage: $(imageName)
1625

1726
steps:
18-
- task: NuGetToolInstaller@1
1927

28+
### INSTALL NUGET AND RESTORE PACKAGES
29+
30+
- task: NuGetToolInstaller@1
31+
displayName: 'Install NuGet'
32+
2033
- task: NuGetCommand@2
34+
displayName: 'Restore packages'
2135
inputs:
22-
restoreSolution: '$(solution)'
36+
restoreSolution: 'src/Spectrogram.sln'
2337

24-
- task: VSBuild@1
38+
### BUILD THE CORE LIBRARY AND RUN TESTS
39+
40+
- task: DotNetCoreCLI@2
41+
displayName: 'Build Spectrogram'
42+
condition: eq(variables['purpose'], 'library')
43+
inputs:
44+
command: 'build'
45+
projects: 'src/Spectrogram/Spectrogram.csproj'
46+
47+
- task: DotNetCoreCLI@2
48+
displayName: 'Build Tests'
49+
condition: eq(variables['purpose'], 'library')
50+
inputs:
51+
command: 'build'
52+
projects: 'Spectrogram.Tests/Spectrogram.Tests.csproj'
53+
54+
- task: DotNetCoreCLI@2
55+
displayName: 'Run Tests'
56+
condition: eq(variables['purpose'], 'library')
2557
inputs:
26-
solution: '$(solution)'
27-
platform: '$(buildPlatform)'
28-
configuration: '$(buildConfiguration)'
58+
command: test
59+
projects: 'Spectrogram.Tests/Spectrogram.Tests.csproj'
2960

30-
- task: VSTest@2
61+
### REBUILD FULL SOLUTION
62+
63+
- task: VSBuild@1
64+
displayName: 'Build Release (Windows)'
65+
condition: eq(variables['purpose'], 'solution')
3166
inputs:
32-
platform: '$(buildPlatform)'
33-
configuration: '$(buildConfiguration)'
67+
solution: 'src/Spectrogram.sln'
68+
configuration: 'release'

0 commit comments

Comments
 (0)