-
Notifications
You must be signed in to change notification settings - Fork 752
Expand file tree
/
Copy pathpr.yml
More file actions
303 lines (287 loc) · 9.34 KB
/
pr.yml
File metadata and controls
303 lines (287 loc) · 9.34 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
parameters:
- name: RunUnitTestsOnWindows
displayName: Run unit tests on Windows
type: boolean
default: true
- name: RunFunctionalTestsOnWindows
displayName: Run functional tests on Windows
type: boolean
default: true
- name: RunUnitTestsOnLinux
displayName: Run unit tests on Linux
type: boolean
default: true
- name: RunFunctionalTestsOnLinux
displayName: Run functional tests on Linux
type: boolean
default: true
- name: RunUnitTestsOnMacOS
displayName: Run unit tests on MacOS
type: boolean
default: true
- name: RunFunctionalTestsOnMacOS
displayName: Run functional tests on MacOS
type: boolean
default: true
- name: RunSourceBuild
displayName: Run a SourceBuild build
type: boolean
default: true
- name: RunStaticAnalysis
displayName: Run a static analysis
type: boolean
default: true
variables:
DOTNET_NOLOGO: 1
NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY: 3,1000
SkipSigning: true
CI: true
Codeql.Enabled: false
trigger:
branches:
include:
- dev
pr:
branches:
include:
- '*'
stages:
- ${{ if eq(parameters.RunUnitTestsOnWindows, true) }}:
- stage:
displayName: Unit Tests on Windows (.NET Framework 4.7.2)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Unit Tests on Windows (.NET Framework 4.7.2)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Unit
testTargetFramework: net472
- ${{ if eq(parameters.RunUnitTestsOnWindows, true) }}:
- stage:
displayName: Unit Tests on Windows (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Unit Tests on Windows (.NET 10.0)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Unit
testTargetFramework: net10.0
- ${{ if eq(parameters.RunFunctionalTestsOnWindows, true) }}:
- stage:
displayName: Msbuild.Integration.Test on Windows (.NET Framework 4.7.2)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Msbuild.Integration.Test on Windows (.NET Framework 4.7.2)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: Msbuild.Integration.Test
- ${{ if eq(parameters.RunFunctionalTestsOnWindows, true) }}:
- stage:
displayName: NuGet.CommandLine.FuncTest on Windows (.NET Framework 4.7.2)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: NuGet.CommandLine.FuncTest on Windows (.NET Framework 4.7.2)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: NuGet.CommandLine.FuncTest
timeoutInMinutes: 30
- ${{ if eq(parameters.RunFunctionalTestsOnWindows, true) }}:
- stage:
displayName: NuGet.CommandLine.Test on Windows (.NET Framework 4.7.2)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: NuGet.CommandLine.Test on Windows (.NET Framework 4.7.2)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: NuGet.CommandLine.Test
testVerbosity: normal
timeoutInMinutes: 45
- ${{ if eq(parameters.RunFunctionalTestsOnWindows, true) }}:
- stage:
displayName: NuGet.Packaging.FuncTest on Windows (.NET Framework 4.7.2)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: NuGet.Packaging.FuncTest on Windows (.NET Framework 4.7.2)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net472
testProjectName: NuGet.Packaging.FuncTest
- ${{ if eq(parameters.RunFunctionalTestsOnWindows, true) }}:
- stage:
displayName: Dotnet.Integration.Test on Windows (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Dotnet.Integration.Test on Windows (.NET 10.0)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net10.0
testProjectName: Dotnet.Integration.Test
timeoutInMinutes: 60
- ${{ if eq(parameters.RunFunctionalTestsOnWindows, true) }}:
- stage:
displayName: NuGet.Packaging.FuncTest on Windows (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: NuGet.Packaging.FuncTest on Windows (.NET 10.0)
osName: Windows
${{ if eq(variables['System.TeamProject'], 'public') }}:
agentPool: NetCore-Public
agentDemands: ImageOverride -equals Windows.VS2022.Amd64.Open
${{ else }}:
agentPool: VSEng-MicroBuildVSStable
testType: Functional
testTargetFramework: net10.0
testProjectName: NuGet.Packaging.FuncTest
- ${{ if eq(parameters.RunUnitTestsOnLinux, true) }}:
- stage:
displayName: Unit Tests on Linux (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Unit Tests on Linux (.NET 10.0)
osName: Linux
vmImage: ubuntu-latest
testType: Unit
testTargetFramework: net10.0
- ${{ if eq(parameters.RunFunctionalTestsOnLinux, true) }}:
- stage:
displayName: Functional Tests on Linux (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Functional Tests on Linux (.NET 10.0)
osName: Linux
vmImage: ubuntu-latest
testType: Functional
testTargetFramework: net10.0
timeoutInMinutes: 30
- ${{ if eq(parameters.RunUnitTestsOnMacOS, true) }}:
- stage:
displayName: Unit Tests on MacOS (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Unit Tests on MacOS (.NET 10.0)
osName: MacOS
vmImage: macos-14
testType: Unit
testTargetFramework: net10.0
- ${{ if eq(parameters.RunFunctionalTestsOnMacOS, true) }}:
- stage:
displayName: Functional Tests on MacOS (.NET 10.0)
dependsOn: []
jobs:
- template: pr.job.yml
parameters:
displayName: Functional Tests on MacOS (.NET 10.0)
osName: MacOS
vmImage: macos-14
testType: Functional
testTargetFramework: net10.0
timeoutInMinutes: 30
- ${{ if or(eq(parameters.RunSourceBuild, true), eq(parameters.RunStaticAnalysis, true)) }}:
- stage:
displayName: Source Build and Static Analysis
dependsOn: []
jobs:
- ${{ if eq(parameters.RunSourceBuild, true) }}:
- job:
displayName: Source Build
timeoutInMinutes: 15
variables:
DOTNET_NUGET_SIGNATURE_VERIFICATION: true
pool:
vmImage: ubuntu-latest
steps:
- task: PowerShell@2
displayName: "Run source-build script"
inputs:
targetType: "inline"
script: |
./eng/dotnet-build/build.sh --source-build
- ${{ if eq(parameters.RunStaticAnalysis, true) }}:
- job:
displayName: Run Static Analysis
timeoutInMinutes: 15
pool:
vmImage: windows-latest
steps:
- task: PowerShell@2
displayName: Run configure.ps1
inputs:
filePath: configure.ps1
- script: SET | SORT
displayName: Log Environment Variables
- script: dotnet format whitespace --verify-no-changes NuGet.sln
displayName: Run dotnet format whitespace
- stage:
displayName: AOT Compatibility
dependsOn: []
jobs:
- job:
displayName: AOT Publish Smoke Test (win-x64)
timeoutInMinutes: 20
pool:
vmImage: windows-latest
steps:
- task: PowerShell@2
displayName: Run configure.ps1
inputs:
filePath: configure.ps1
- script: dotnet publish test/NuGet.AotCompatibility.Test/NuGet.AotCompatibility.Test.csproj -r win-x64 -c Release
displayName: AOT publish NuGet libraries