forked from dotnet/format
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
149 lines (142 loc) · 4.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
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
# Branches that trigger a build on commit
trigger:
- main
- feature/*
- release/*
# Branches that trigger builds on PR
pr:
- main
- feature/*
- release/*
jobs:
- job: Windows
pool:
vmImage: 'windows-latest'
variables:
_os: Windows
strategy:
maxParallel: 4
matrix:
Debug:
_configuration: Debug
Release:
_configuration: Release
timeoutInMinutes: 30
steps:
- script: eng\common\cibuild.cmd -msbuildEngine dotnet -configuration $(_configuration) -prepareMachine /p:TestTimeout=360000
displayName: Build and Test
- task: PublishTestResults@2
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)\*.trx'
mergeTestResults: true
testRunTitle: '$(_os) $(_configuration)'
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Workspace Loader Projects
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/tests/projects/for_workspace_loader'
ArtifactName: '$(_os) $(_configuration) - Workspace Loader Projects'
continueOnError: true
condition: not(succeeded())
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
ArtifactName: '$(_os) $(_configuration)'
continueOnError: true
condition: not(succeeded())
- job: Linux
pool:
vmImage: 'ubuntu-latest'
variables:
_os: Linux
strategy:
maxParallel: 4
matrix:
Debug:
_configuration: Debug
Release:
_configuration: Release
timeoutInMinutes: 30
steps:
- script: ./eng/common/cibuild.sh --configuration $(_configuration) --prepareMachine /p:TestTimeout=240000
displayName: Build and Test
- task: PublishTestResults@2
displayName: Publish xUnit Test Results
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)/*.trx'
mergeTestResults: true
testRunTitle: '$(_os) $(_configuration)'
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Workspace Loader Projects
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/tests/projects/for_workspace_loader'
ArtifactName: '$(_os) $(_configuration) - Workspace Loader Projects'
continueOnError: true
condition: not(succeeded())
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
ArtifactName: '$(_os) $(_configuration)'
continueOnError: true
condition: not(succeeded())
- job: Linux_Spanish
pool:
vmImage: 'ubuntu-latest'
variables:
_os: Linux
LC_ALL: es_ES.UTF-8
strategy:
maxParallel: 4
matrix:
Debug:
_configuration: Debug
Release:
_configuration: Release
timeoutInMinutes: 30
steps:
- script: ./eng/common/cibuild.sh --configuration $(_configuration) --prepareMachine /p:TestTimeout=360000
displayName: Build and Test
- task: PublishTestResults@2
displayName: Publish xUnit Test Results
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)/*.trx'
mergeTestResults: true
testRunTitle: 'Spanish $(_os) $(_configuration)'
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Workspace Loader Projects
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/tests/projects/for_workspace_loader'
ArtifactName: 'Spanish $(_os) $(_configuration) - Workspace Loader Projects'
continueOnError: true
condition: not(succeeded())
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
ArtifactName: 'Spanish $(_os) $(_configuration)'
continueOnError: true
condition: not(succeeded())
- job: Formatting_Check
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 10
steps:
- script: ./restore.sh && echo "##vso[task.setvariable variable=PATH]$(Build.SourcesDirectory)/.dotnet:${PATH}" && echo "##vso[task.setvariable variable=DOTNET_ROOT]$(Build.SourcesDirectory)/.dotnet"
displayName: Restore dependencies
- script: dotnet run --project ./src/dotnet-format.csproj -c Release -- @validate.rsp
displayName: Run dotnet-format
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\'
ArtifactName: 'Formatting Check'
continueOnError: true
condition: not(succeeded())
- template: /eng/common/templates/jobs/source-build.yml