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
-
6
1
trigger :
7
2
- master
8
3
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'
11
18
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)
16
25
17
26
steps :
18
- - task : NuGetToolInstaller@1
19
27
28
+ # ## INSTALL NUGET AND RESTORE PACKAGES
29
+
30
+ - task : NuGetToolInstaller@1
31
+ displayName : ' Install NuGet'
32
+
20
33
- task : NuGetCommand@2
34
+ displayName : ' Restore packages'
21
35
inputs :
22
- restoreSolution : ' $(solution) '
36
+ restoreSolution : ' src/Spectrogram.sln '
23
37
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')
25
57
inputs :
26
- solution : ' $(solution)'
27
- platform : ' $(buildPlatform)'
28
- configuration : ' $(buildConfiguration)'
58
+ command : test
59
+ projects : ' Spectrogram.Tests/Spectrogram.Tests.csproj'
29
60
30
- - task : VSTest@2
61
+ # ## REBUILD FULL SOLUTION
62
+
63
+ - task : VSBuild@1
64
+ displayName : ' Build Release (Windows)'
65
+ condition : eq(variables['purpose'], 'solution')
31
66
inputs :
32
- platform : ' $(buildPlatform) '
33
- configuration : ' $(buildConfiguration) '
67
+ solution : ' src/Spectrogram.sln '
68
+ configuration : ' release '
0 commit comments