-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
build-runtime-tests-and-send-to-helix.yml
146 lines (132 loc) · 6.51 KB
/
build-runtime-tests-and-send-to-helix.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
parameters:
buildConfig: ''
osGroup: ''
osSubgroup: ''
container: ''
testBuildArgs: ''
crossBuild: false
readyToRun: false
compositeBuildMode: false
helixQueues: ''
displayNameArgs: ''
runInUnloadableContext: false
nativeAotTest: false
runtimeFlavor: 'mono'
runtimeVariant: 'monointerpreter'
llvmAotStepContainer: ''
scenarios:
- normal
variables: {}
pool: ''
dependsOn: []
#arcade-specific parameters
condition: always()
continueOnError: false
displayName: ''
timeoutInMinutes: ''
enableMicrobuild: ''
gatherAssetManifests: false
shouldContinueOnError: false
compileOnHelix: false
interpreter: false
steps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests.yml
parameters:
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
archType: ${{ parameters.archType }}
buildConfig: ${{ parameters.buildConfig }}
testBuildArgs: ${{ parameters.testBuildArgs }}
# Build a Mono AOT cross-compiler for non-amd64 targets (in this case, just arm64)
- ${{ if and(eq(parameters.runtimeFlavor, 'mono'), in(parameters.runtimeVariant, 'llvmaot', 'llvmfullaot', 'minifullaot')) }}:
- ${{ if eq(parameters.archType, 'arm64') }}:
- ${{ if eq(parameters.runtimeVariant, 'minifullaot') }}:
- script: ./build.sh
-subset mono
-c ${{ parameters.buildConfig }}
-arch ${{ parameters.archType }}
/p:BuildMonoAotCrossCompiler=true
/p:BuildMonoAotCrossCompilerOnly=true
/p:CrossBuild=true
displayName: "Build Mono Mini AOT cross compiler"
- ${{ else }}:
- script: ./build.sh
-subset mono
-c ${{ parameters.buildConfig }}
-arch ${{ parameters.archType }}
/p:BuildMonoAotCrossCompiler=true
/p:BuildMonoAotCrossCompilerOnly=true
/p:MonoLibClang="/usr/local/lib/libclang.so.16"
/p:MonoAOTEnableLLVM=true
/p:CrossBuild=true
displayName: "Build Mono LLVM AOT cross compiler"
- ${{ if eq(parameters.archType, 'x64') }}:
- ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_aot ${{ parameters.buildConfig }} ${{ parameters.archType }} /p:RuntimeVariant=${{ parameters.runtimeVariant }}
displayName: "AOT compile CoreCLR tests"
target: ${{ coalesce(parameters.llvmAotStepContainer, parameters.container) }}
- ${{ if in(parameters.runtimeVariant, 'llvmfullaot', 'minifullaot') }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_fullaot ${{ parameters.buildConfig }} ${{ parameters.archType }} /p:RuntimeVariant=${{ parameters.runtimeVariant }}
displayName: "AOT compile CoreCLR tests"
target: ${{ coalesce(parameters.llvmAotStepContainer, parameters.container) }}
- ${{ if eq(parameters.archType, 'arm64') }}:
- ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_aot ${{ parameters.buildConfig }} ${{ parameters.archType }} cross /p:RuntimeVariant=${{ parameters.runtimeVariant }} -maxcpucount:2
displayName: "AOT cross-compile CoreCLR tests"
env:
__MonoToolPrefix: aarch64-linux-gnu-
- ${{ if in(parameters.runtimeVariant, 'llvmfullaot', 'minifullaot') }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_fullaot ${{ parameters.buildConfig }} ${{ parameters.archType }} cross /p:RuntimeVariant=${{ parameters.runtimeVariant }} -maxcpucount:2
displayName: "AOT cross-compile CoreCLR tests"
env:
__MonoToolPrefix: aarch64-linux-gnu-
# Checks the value of the compileOnHelix parameter
# and if set invokes libraries pipeline for AOT on Helix
- ${{ if eq(parameters.compileOnHelix, 'true') }}:
- template: /eng/pipelines/libraries/helix.yml
parameters:
osGroup: ${{ parameters.osGroup }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
archType: ${{ parameters.archType }}
targetRid: ${{ parameters.targetRid }}
buildConfig: ${{ parameters.buildConfig }}
interpreter: ${{ parameters.interpreter }}
testRunNamePrefixSuffix: ${{ parameters.testRunNamePrefixSuffix }}
extraHelixArguments: ${{ parameters.extraHelixArguments }}
helixQueues: ${{ parameters.helixQueues }}
creator: ${{ parameters.creator }}
- ${{ else }}:
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
parameters:
displayName: Send tests to Helix
buildConfig: $(buildConfigUpper)
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup}}
coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
runtimeVariant: ${{ parameters.runtimeVariant }}
${{ if eq(variables['System.TeamProject'], 'public') }}:
creator: $(Build.DefinitionName)
helixBuild: $(Build.BuildNumber)
helixSource: $(_HelixSource)
${{ if ne(parameters.readyToRun, true) }}:
helixType: 'test/functional/cli/'
helixQueues: ${{ parameters.helixQueues }}
# This tests whether an array is empty
${{ if eq(join('', parameters.helixQueues), '') }}:
condition: false
publishTestResults: true
timeoutPerTestInMinutes: $(timeoutPerTestInMinutes)
timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes)
runCrossGen2: ${{ eq(parameters.readyToRun, true) }}
compositeBuildMode: ${{ parameters.compositeBuildMode }}
runInUnloadableContext: ${{ parameters.runInUnloadableContext }}
nativeAotTest: ${{ parameters.nativeAotTest }}
${{ if eq(variables['System.TeamProject'], 'internal') }}:
# Access token variable for internal project from the
# DotNet-HelixApi-Access variable group
helixAccessToken: $(HelixApiAccessToken)
helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj'
scenarios: ${{ parameters.scenarios }}