-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Expand file tree
/
Copy pathbuild-test-job.yml
More file actions
154 lines (127 loc) · 5.96 KB
/
Copy pathbuild-test-job.yml
File metadata and controls
154 lines (127 loc) · 5.96 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
parameters:
buildConfig: ''
archType: ''
osGroup: ''
osSubgroup: ''
container: ''
testGroup: ''
displayNameArgs: ''
condition: true
variables: {}
pool: ''
runtimeFlavor: 'coreclr'
runtimeVariant: ''
dependsOn: []
dependOnEvaluatePaths: false
crossBuild: false
pgoType: ''
### Build managed test components (native components are getting built as part
### of the product build job).
### TODO: As of today, build of managed test components requires the product build
### as a prerequisite due to dependency on System.Private.Corelib. After switching
### over to its reference assembly we should be able to remove this dependency and
### run managed test builds in parallel with the product build job.
jobs:
- template: /eng/pipelines/${{ parameters.runtimeFlavor }}/templates/xplat-pipeline-job.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
crossBuild: ${{ parameters.crossBuild }}
container: ${{ parameters.container }}
runtimeVariant: ${{ parameters.runtimeVariant }}
testGroup: ${{ parameters.testGroup }}
pool: ${{ parameters.pool }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
compilerArg: ''
# Test jobs should continue on error for internal builds
${{ if eq(variables['System.TeamProject'], 'internal') }}:
continueOnError: true
# Compute job name from template parameters
${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
name: '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{ parameters.buildConfig }}'
displayName: '${{ parameters.runtimeFlavor }} Common Pri0 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}'
${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
name: '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{ parameters.buildConfig }}'
displayName: '${{ parameters.runtimeFlavor }} Common Pri1 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}'
# Since the condition is being altered, merge the default with the additional conditions.
# See https://docs.microsoft.com/azure/devops/pipelines/process/conditions
condition: and(succeeded(), ${{ parameters.condition }})
${{ if ne(parameters.dependsOn[0], '') }}:
dependsOn: ${{ parameters.dependsOn }}
${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
timeoutInMinutes: 90
${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
timeoutInMinutes: 160
variables:
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
- name: liveRuntimeBuildParams
value: 'libs+clr.iltools -c Release -ci'
- name: compilerArg
value: ''
- name: runtimeFlavorArgs
value: ''
- ${{ if eq(parameters.runtimeFlavor, 'mono') }}:
- name: runtimeFlavorArgs
value: '-mono'
- ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), in(parameters.osGroup, 'ios', 'iossimulator', 'tvos', 'tvossimulator', 'maccatalyst')) }}:
- name: runtimeFlavorArgs
value: '-nativeaot'
- name: testTreeFilterArg
value: ''
# Only build GCSimulator tests when the gc-simulator group is specified.
- ${{ if eq(parameters.testGroup, 'gc-simulator') }}:
- name: testTreeFilterArg
value: 'tree GC/Scenarios/GCSimulator'
steps:
# Install test build dependencies
- ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
displayName: Install native dependencies
# Build core/libraries dependencies of test build
- script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(crossArg) $(compilerArg)
displayName: Build coreclr/libs components needed by test build
- ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
df -h
displayName: Disk Usage before Build
# Build managed test components
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) $(testTreeFilterArg) ci /p:TargetOS=AnyOS
displayName: Build managed test components
- ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
df -h
displayName: Disk Usage after Build
# Zip and publish managed test components
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: '$(binTestsPath)/AnyOS.$(archType).$(buildConfigUpper)'
includeRootFolder: false
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
artifactName: $(managedGenericTestArtifactName)
displayName: 'managed test components (generic)'
# Publish .packages/microsoft.net.sdk.il needed for traversing
# test projects during the copynativeonly command in run test job.
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(microsoftNetSdkIlFolderPath)
includeRootFolder: false
archiveType: tar
tarCompression: gz
archiveExtension: '.tar.gz'
artifactName: $(microsoftNetSdkIlArtifactName)
displayName: 'Microsoft.NET.Sdk.IL package'
# Publish Logs
- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
continueOnError: true
condition: always()