-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy path.azure-ci.yaml
More file actions
110 lines (98 loc) · 3.12 KB
/
Copy path.azure-ci.yaml
File metadata and controls
110 lines (98 loc) · 3.12 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
# Branches that trigger a build on commit
trigger:
- main
# Branches that trigger builds on PR
pr:
branches:
include:
- main
paths:
exclude:
- src/GitHubCreateMergePRs/config.xml
- .vsts-ci.yml
variables:
# Set pool / queue name variables depending on which instance we're running in.
- name: PoolName
${{ if eq(variables['System.TeamProject'], 'public') }}:
value: NetCore-Public
${{ else }}:
value: NetCore1ESPool-Internal
- name: WindowsQueueName
${{ if eq(variables['System.TeamProject'], 'public') }}:
value: 1es-windows-2022-open
${{ else }}:
value: 1es-windows-2022
- name: UbuntuQueueName
${{ if eq(variables['System.TeamProject'], 'public') }}:
value: Build.Ubuntu.2204.Amd64.Open
${{ else }}:
value: Build.Ubuntu.2204.Amd64
jobs:
- job: Windows
pool:
name: $(PoolName)
demands: ImageOverride -equals $(WindowsQueueName)
strategy:
maxParallel: 2
matrix:
debug:
_configuration: Debug
release:
_configuration: Release
steps:
# install .NET 8 for test projects targeting that version
- task: UseDotNet@2
displayName: Install .NET SDK
inputs:
version: 8.x
installationPath: '$(Build.SourcesDirectory)\.dotnet'
- script: .\eng\common\CIBuild.cmd -configuration $(_configuration) -prepareMachine /p:DotnetPublishUsingPipelines=true
- task: PublishTestResults@2
displayName: Publish xUnit Test Results
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)\*.xml'
mergeTestResults: true
testRunTitle: 'Test Windows $(_configuration)'
condition: always()
- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
artifactName: 'Windows $(_configuration) Logs - $(System.JobAttempt)'
continueOnError: true
condition: not(succeeded())
- job: Linux
pool:
name: $(PoolName)
demands: ImageOverride -equals $(UbuntuQueueName)
strategy:
maxParallel: 2
matrix:
debug:
_configuration: Debug
release:
_configuration: Release
steps:
# install .NET 8 for test projects targeting that version
- task: UseDotNet@2
displayName: Install .NET SDK
inputs:
version: 8.x
installationPath: '$(Build.SourcesDirectory)/.dotnet'
- script: ./eng/common/cibuild.sh --configuration $(_configuration) --prepareMachine /p:DotnetPublishUsingPipelines=true
- task: PublishTestResults@2
displayName: Publish xUnit Test Results
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)/*.xml'
mergeTestResults: true
testRunTitle: 'Test Linux $(_configuration)'
condition: always()
- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
artifactName: 'Linux $(_configuration) Logs - $(System.JobAttempt)'
continueOnError: true
condition: not(succeeded())