1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00
Satori/eng/pipelines/common/templates/runtimes/build-test-job.yml
Ken Dale 59f2833b98
Update docs.microsoft.com usages to learn.microsoft.com (#102881)
* Update https://docs.microsoft.com to https://learn.microsoft.com

* Update http://docs.microsoft.com/ to https://learn.microsoft.com (removes trailing slash)

* Update docs.microsoft.com to https://learn.microsoft.com

* Update docs.microsoft.com to learn.microsoft.com

* Replace learn.microsoft.com/en-us/ with learn.microsoft.com/ to remove locale from urls
2024-05-31 11:27:45 -07:00

144 lines
5.6 KiB
YAML

parameters:
buildConfig: ''
archType: ''
osGroup: ''
osSubgroup: ''
container: ''
testGroup: ''
displayNameArgs: ''
condition: true
variables: {}
pool: ''
runtimeFlavor: 'coreclr'
runtimeVariant: ''
dependsOn: []
crossBuild: false
isOfficialBuild: false
### Build managed test components (native components are getting built as part
### of the product build job).
jobs:
- template: /eng/pipelines/common/templates/runtimes/xplat-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 }}
# 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://learn.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
artifacts:
publish:
logs:
name: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_Attempt$(System.JobAttempt)_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
variables:
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
- name: liveRuntimeBuildParams
value: 'libs+clr.iltools -c Release -ci'
- 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'
- template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml
parameters:
runtimeFlavor: coreclr
testGroup: ${{ parameters.testGroup }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
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)
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'