forked from microsoft/clrmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
146 lines (129 loc) · 4.73 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
trigger:
- main
pr:
autoCancel: true
branches:
include:
- main
- release/*
paths:
exclude:
- doc/*
- LICENSE
variables:
- name: Codeql.Enabled
value: true
- name: _TeamName
value: DotNetCore
- name: _SignType
value: real
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# DotNet-Symbol-Server-Pats provides: provides microsoft-symbol-server-pat and symweb-symbol-server-pat
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: DotNet-Blob-Feed
- group: DotNet-Symbol-Server-Pats
- group: Publish-Build-Assets
resources:
containers:
- container: LinuxContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-09ca40b-20190520220842
stages:
- stage: build
displayName: Build and Test
# Three jobs for each of the three OSes we want to run on
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enableTelemetry: true
enablePublishBuildArtifacts: true
enablePublishTestResults: true
helixRepo: Microsoft/clrmd
jobs:
- job: Windows_NT
pool:
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2019.amd64.open
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2019.amd64
variables:
- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
- _InternalBuildArgs: ''
strategy:
matrix:
build_debug:
_BuildConfig: Debug
_InternalBuildArgs: ''
build_release:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_InternalBuildArgs: /p:DotNetSignType=$(_SignType)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=true
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
steps:
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-verbosity normal
$(_InternalBuildArgs)
name: Build
displayName: Build
condition: succeeded()
- job: Linux
container: LinuxContainer
pool:
vmImage: ubuntu-20.04
strategy:
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- job: MacOS
pool:
vmImage: macos-11
strategy:
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
configuration: Release
dependsOn: Windows_NT
publishUsingPipelines: true
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2019.amd64
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/post-build/post-build.yml
parameters:
# This is to enable SDL runs part of Post-Build Validation Stage.
# as well as NuGet, SourceLink, and signing validation.
# The variables get imported from group dotnet-diagnostics-sdl-params
publishingInfraVersion: 3
enableSourceLinkValidation: false
enableSigningValidation: true
enableSymbolValidation: false
enableNugetValidation: true
publishInstallersAndChecksums: true