-
Notifications
You must be signed in to change notification settings - Fork 256
/
.vsts-pr.yaml
74 lines (70 loc) · 2.45 KB
/
.vsts-pr.yaml
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
# Branches that trigger a build on commit
trigger:
- main
- dev17.0
# Branches that trigger builds on PR
pr:
- main
- dev17.0
variables:
- name: DOTNET_ROOT
value: $(Build.SourcesDirectory)\.dotnet
- name: XUNIT_LOGS
value: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)
- name: MSBUILDLOGALLENVIRONMENTVARIABLES
value: 1
jobs:
- job: Windows
pool:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022.scout.amd64.open
strategy:
maxParallel: 6
matrix:
Samples Debug Test:
_args: -test
_configuration: Debug
_solution: Samples
Samples Release Test:
_args: -test
_configuration: Release
_solution: Samples
SDK Debug Test:
_args: -test -integrationTest
_configuration: Debug
_solution: Roslyn-SDK
SDK Release Test:
_args: -test -integrationTest
_configuration: Release
_solution: Roslyn-SDK
SDK Pack:
_args: -pack
_configuration: Release
_solution: Roslyn-SDK
SDK Sign:
_args: -sign
_configuration: Release
_solution: Roslyn-SDK
timeoutInMinutes: 90
steps:
- script: |
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f /v DumpType /t REG_DWORD /d 2
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f /v DumpCount /t REG_DWORD /d 2
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f /v DumpFolder /t REG_SZ /d "$(Build.SourcesDirectory)\artifacts\log\$(_configuration)"
- script: eng\PRBuild.cmd $(_args) -configuration $(_configuration) -prepareMachine -projects $(Build.SourcesDirectory)\$(_solution).sln /p:OfficialBuild=false
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
ArtifactName: '$(_solution) $(_configuration) logs'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- task: PublishTestResults@2
inputs:
testRunner: 'xUnit'
testResultsFiles: '**/*.xml'
searchFolder: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)'
configuration: '$(_configuration)'
publishRunAttachments: true
continueOnError: true
condition: and(always(), contains(variables['_args'], '-test'))