-
Notifications
You must be signed in to change notification settings - Fork 466
/
azure-pipelines.yml
120 lines (113 loc) · 3.82 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
# Branches that trigger a build on commit
trigger:
- main
- release/*
- features/*
- 2.9.x
# Branch(es) that trigger(s) build(s) on PR
pr:
branches:
include:
- main
- release/*
- features/*
- 2.9.x
paths:
exclude:
- docs/*
- .github/*
- .devcontainer/*
- CODE-OF-CONDUCT.md
- README.md
jobs:
- job: Windows
strategy:
maxParallel: 4
matrix:
Debug:
_configuration: Debug
_codeCoverage: True
Release:
_configuration: Release
_codeCoverage: False
pool:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022preview.amd64.open
timeoutInMinutes: 120
steps:
- checkout: self
clean: true
- pwsh: eng\scripts\Get-ProcDump.ps1
displayName: Get ProcDump
- pwsh: Write-Host "##vso[task.setvariable variable=PROCDUMP_PATH;]$(Build.SourcesDirectory)\.tools\procdump"
displayName: Set PROCDUMP_PATH Environment Variable
- pwsh: Write-Host "##vso[task.prependpath]$(Build.SourcesDirectory)\.tools\procdump"
displayName: Set PATH Environment Variable
- pwsh: Write-Host "##vso[task.setvariable variable=VSTEST_DUMP_FORCEPROCDUMP;]1"
displayName: Set VSTEST_DUMP_FORCEPROCDUMP Environment Variable
- script: eng\common\cibuild.cmd -configuration $(_configuration) -prepareMachine /p:Coverage=$(_codeCoverage)
displayName: Build and Test
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)\*.trx'
mergeTestResults: true
testRunTitle: 'Windows $(_configuration)'
condition: always()
- script: dotnet msbuild -binaryLogger:artifacts\log\$(_configuration)\uploadCodeCov.binlog;ProjectImports=Embed -restore eng/CodeCoverage.proj
displayName: Upload coverage to codecov.io
condition: and(succeeded(), eq(variables['_codeCoverage'], True))
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Logs'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
ArtifactName: 'Windows $(_configuration) Logs'
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: TestResults'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)'
ArtifactName: 'Windows $(_configuration) Test Logs'
continueOnError: true
condition: always()
- job: Ubuntu
strategy:
maxParallel: 4
matrix:
Debug:
_configuration: Debug
Release:
_configuration: Release
pool:
name: NetCore-Public
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open
timeoutInMinutes: 40
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh -configuration $(_configuration) -prepareMachine
displayName: Build and Test
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)/*.trx'
mergeTestResults: true
testRunTitle: 'Ubuntu $(_configuration)'
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
ArtifactName: 'Ubuntu $(_configuration)'
continueOnError: true
condition: always()
- template: eng/common/templates/job/source-build.yml
- job: Markdownlint
pool:
vmImage: ubuntu-latest
steps:
- script: sudo npm install -g [email protected]
displayName: Install markdownlint-cli
- script: markdownlint '**/*.md' -i 'docs/Analyzer reference page template.md' -i 'eng/common/**/*.md'
displayName: Run markdownlint