forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxplat-setup.yml
More file actions
168 lines (144 loc) · 7.3 KB
/
xplat-setup.yml
File metadata and controls
168 lines (144 loc) · 7.3 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
parameters:
jobTemplate: ''
hostedOs: ''
osGroup: ''
osSubgroup: ''
archType: ''
container: ''
helixQueuesTemplate: ''
platform: ''
targetRid: ''
jobParameters: {}
shouldContinueOnError: false # set `shouldContinueOnError: forceFalse` to not use the defaults, and set specifically to `false`
variables: []
jobs:
- template: ${{ coalesce(parameters.helixQueuesTemplate, parameters.jobTemplate) }}
parameters:
shouldContinueOnError: ${{ or(eq(parameters.shouldContinueOnError, true), and(ne(parameters.shouldContinueOnError, 'forceFalse'), endsWith(variables['Build.DefinitionName'], 'staging'), eq(variables['Build.Reason'], 'PullRequest'))) }}
# keep in sync with /eng/pipelines/common/variables.yml
dependOnEvaluatePaths: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging', 'runtime-community', 'runtime-extra-platforms')) }}
variables:
# Disable component governance in our CI builds. These builds are not shipping nor
# are they a service. Also the component governance jobs issue lots of inconsequential
# warnings and errors into our build timelines that make it hard to track down
# real errors in the build
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false
- name: checkoutFetchDepth
value: 20
- name: buildConfigUpper
${{ if eq(parameters.jobParameters.buildConfig, 'debug') }}:
value: 'Debug'
${{ if eq(parameters.jobParameters.buildConfig, 'release') }}:
value: 'Release'
${{ if eq(parameters.jobParameters.buildConfig, 'checked') }}:
value: 'Checked'
- name: _BuildConfig
value: $(buildConfigUpper)
- name: _runSmokeTestsOnlyArg
value: '/p:RunSmokeTestsOnly=$(isRunSmokeTestsOnly)'
- name: _overrideTestScriptWindowsCmdParameter
${{ if eq(parameters.jobParameters.runScriptWindowsCmd, true) }}:
value: '/p:RunScriptWindowsCmd=true'
${{ if ne(parameters.jobParameters.runScriptWindowsCmd, true) }}:
value: ''
- name: _hostedOs
value: ${{ parameters.jobParameters.hostedOs }}
- ${{ if or(eq(parameters.osGroup, 'windows'), eq(parameters.jobParameters.hostedOs, 'windows')) }}:
- name: archiveExtension
value: '.zip'
- name: archiveType
value: zip
- name: tarCompression
value: ''
- name: scriptExt
value: '.cmd'
- name: dir
value: '\'
- name: _msbuildCommand
value: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -ci
- name: _warnAsErrorParamHelixOverride
value: -warnaserror 0
- name: setScriptToEchoAndFailOnNonZero
value: ''
- name: logRootNameArg
value: 'log '
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.jobParameters.hostedOs, 'windows')) }}:
- name: archiveExtension
value: '.tar.gz'
- name: archiveType
value: tar
- name: tarCompression
value: gz
- name: scriptExt
value: '.sh'
- name: dir
value: '/'
- name: _msbuildCommand
value: ./eng/common/msbuild.sh --ci
- name: _warnAsErrorParamHelixOverride
value: --warnaserror false
# Set the bash script to display each command, and stop if any command exits nonzero.
- name: setScriptToEchoAndFailOnNonZero
value: 'set -xe'
- name: logRootNameArg
value: '-log:'
- ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}:
# This is only required for cross builds.
- name: ROOTFS_DIR
value: ${{ parameters.jobParameters.crossrootfsDir }}
- name: runtimeFlavorName
${{ if eq(parameters.jobParameters.runtimeFlavor, 'mono') }}:
value: Mono
${{ if eq(parameters.jobParameters.runtimeFlavor, 'coreclr') }}:
value: CoreCLR
- name: wasmDarcDependenciesChanged
${{ if eq(parameters.archType, 'wasm') }}:
value: $[ or(
eq(dependencies.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Manifest-7_0_100'], true),
eq(dependencies.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_DotNet_Build_Tasks_Workloads'], true),
eq(dependencies.evaluate_paths.outputs['DarcDependenciesChanged.System_Runtime_TimeZoneData'], true),
eq(dependencies.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_NET_ILLink_Tasks'], true)) ]
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
archType: ${{ parameters.archType }}
targetRid: ${{ parameters.targetRid }}
platform: ${{ parameters.platform }}
${{ if ne(parameters.container, '') }}:
${{ if eq(parameters.container.registry, 'mcr') }}:
container: ${{ format('{0}:{1}', 'mcr.microsoft.com/dotnet-buildtools/prereqs', parameters.container.image) }}
${{ if ne(parameters.container.registry, 'mcr') }}:
container: ${{ format('{0}:{1}', parameters.container.registry, parameters.container.image) }}
${{ if eq(parameters.jobParameters.pool, '') }}:
pool:
# Public Linux Build Pool
${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Android', 'Tizen'), eq(parameters.jobParameters.hostedOs, 'Linux')), eq(variables['System.TeamProject'], 'public')) }}:
name: NetCore-Svc-Public
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
# Official Build Linux Pool
${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Browser', 'Android', 'Tizen'), eq(parameters.jobParameters.hostedOs, 'Linux')), ne(variables['System.TeamProject'], 'public')) }}:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'iOSSimulator', 'tvOS', 'tvOSSimulator') }}:
vmImage: 'macOS-11'
# Official Build Windows Pool
${{ if and(eq(parameters.osGroup, 'windows'), ne(variables['System.TeamProject'], 'public')) }}:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals windows.vs2022.amd64
# Public Windows Build Pool
${{ if and(or(eq(parameters.osGroup, 'windows'), eq(parameters.jobParameters.hostedOs, 'windows')), eq(variables['System.TeamProject'], 'public')) }}:
name: NetCore-Svc-Public
demands: ImageOverride -equals windows.vs2022.amd64.open
${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
jobTemplate: ${{ parameters.jobTemplate }}
jobParameters: ${{ parameters.jobParameters }}