forked from dotnet/Open-XML-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.yml
61 lines (54 loc) · 1.94 KB
/
build.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
parameters:
buildTargets: []
jobs:
- ${{ each buildTarget in parameters.buildTargets }}:
- ${{ each vmImage in buildTarget.vmImages }}:
- job: ${{ buildTarget.name }}_${{ vmImage.name }}
pool:
vmImage: ${{ vmImage.image }}
strategy:
matrix:
debug:
buildConfiguration: debug
upload: false
ProjectLoadStyle: ${{ buildTarget.name }}
release:
buildConfiguration: release
upload: ${{ buildTarget.upload }}
ProjectLoadStyle: ${{ buildTarget.name }}
steps:
- task: UseDotNet@2
displayName: 'Install global.json .NET Core SDK'
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: UseDotNet@2
displayName: 'Install .NET 5 SDK'
inputs:
packageType: 'sdk'
version: 5.x
- ${{ each runtime in buildTarget.runtimes }}:
- task: UseDotNet@2
displayName: 'Install .NET Runtime ${{ runtime }}'
inputs:
packageType: 'runtime'
version: ${{ runtime }}
- task: DotNetCoreCLI@2
inputs:
command: 'build'
arguments: '-c $(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
arguments: '-c $(buildConfiguration)'
# - task: DotNetCoreCLI@2
# displayName: 'Benchmark'
# inputs:
# command: 'run'
# projects: 'test/DocumentFormat.OpenXml.Benchmarks/DocumentFormat.OpenXml.Benchmarks.csproj'
# arguments: '-c Release -- $(Build.ArtifactStagingDirectory)/results'
# condition: eq('release', variables['buildConfiguration'])
# - publish: '$(Build.ArtifactStagingDirectory)/results'
# artifact: benchmarks_${{ buildTarget.name }}_${{ vmImage.name }}
# displayName: 'Upload benchmark results'
# condition: eq('release', variables['buildConfiguration'])