/
build.yml
79 lines (69 loc) · 2 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
parameters:
- name: windowsPool
type: object
default:
vmImage: windows-2022
- name: ShouldSkipOptimize
- name: includeMacOS
- name: EnableAPIScan
type: boolean
default: false
jobs:
- job: Windows
pool: ${{ parameters.windowsPool }}
variables:
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
# https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline
- group: VSCloudServices-APIScan
steps:
- checkout: self
clean: true
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
- template: schedule-only-steps.yml
- template: install-dependencies.yml
- powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -ca'
displayName: Set build number
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
- template: microbuild.before.yml
parameters:
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
- template: dotnet.yml
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
- template: microbuild.after.yml
parameters:
EnableAPIScan: ${{ parameters.EnableAPIScan }}
- job: Linux
condition: ne(variables['OptProf'], 'true')
pool:
vmImage: Ubuntu 20.04
steps:
- checkout: self
clean: true
- template: install-dependencies.yml
- template: dotnet.yml
- job: macOS
condition: and(${{ parameters.includeMacOS }}, ne(variables['OptProf'], 'true'))
pool:
vmImage: macOS-10.15
steps:
- checkout: self
clean: true
- template: install-dependencies.yml
- template: dotnet.yml
- job: WrapUp
dependsOn:
- Windows
- Linux
- macOS
pool:
vmImage: Ubuntu 20.04
condition: ne(variables['OptProf'], 'true')
steps:
- checkout: self
clean: true
- template: install-dependencies.yml
parameters:
initArgs: -NoRestore
- template: publish-codecoverage.yml
parameters:
includeMacOS: ${{ parameters.includeMacOS }}