Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Corrected] - Enable Libraries R2R Testing in CI #89405

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ parameters:
jobs:

# Linux arm

- ${{ if or(containsValue(parameters.platforms, 'linux_arm'), in(parameters.platformGroup, 'all', 'gcstress')) }}:
- template: xplat-setup.yml
parameters:
Expand All @@ -45,6 +46,7 @@ jobs:
${{ insert }}: ${{ parameters.jobParameters }}

# Linux armv6

- ${{ if containsValue(parameters.platforms, 'linux_armv6') }}:
- template: xplat-setup.yml
parameters:
Expand Down
11 changes: 11 additions & 0 deletions eng/pipelines/coreclr/crossgen2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ extends:
readyToRun: true
displayNameArgs: R2R_CG2
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/libraries/libraries-test-ready-to-run.yml
buildConfig: Checked
platforms:
- linux_x64
- osx_x64
- windows_x64
jobParameters:
libsAndPacksConfig: Release
95 changes: 95 additions & 0 deletions eng/pipelines/libraries/libraries-test-ready-to-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
parameters:
archType: ''
buildConfig: ''
container: ''
dependOnEvaluatePaths: false
dependsOn: []
isOfficialBuild: false
libsAndPacksConfig: ''
osGroup: ''
osSubgroup: ''
pool: ''
signBinaries: false
variables: {}

jobs:
- template: /eng/common/templates/job/job.yml
parameters:

name: ${{ format('libraries_{0}_coreclr_{1}_{2}{3}_{4}_testreadytorun', parameters.libsAndPacksConfig, parameters.buildConfig, parameters.osGroup, parameters.osSubgroup, parameters.archType) }}

displayName: ${{ format('Libraries {0} CoreCLR {1} {2}{3} {4} TestReadyToRun', parameters.libsAndPacksConfig, parameters.buildConfig, parameters.osGroup, parameters.osSubgroup, parameters.archType) }}

container: ${{ parameters.container }}
condition: succeeded()
helixRepo: dotnet/runtime
pool: ${{ parameters.pool }}

dependsOn:
- ${{ if eq(parameters.dependOnEvaluatePaths, true) }}:
- evaluate_paths
- ${{ parameters.dependsOn }}

workspace:
clean: all

variables:
- _buildScript: ./build$(scriptExt)
- ${{ if eq(parameters.osGroup, 'windows') }}:
- _buildScript: .\build($scriptExt)

- _preTestSubsets: clr+libs+packs
- _libsTestsSubset: libs.tests

- _runtimeConfig: ''
- ${{ if ne(parameters.buildConfig, parameters.libsAndPacksConfig) }}:
- _runtimeConfig: -rc ${{ parameters.buildConfig }}

- _buildArguments: -configuration ${{ parameters.libsAndPacksConfig }}
$(_runtimeConfig)
-arch ${{ parameters.archType }}
-os ${{ parameters.osGroup }}
-ci
- _libsTestsArguments: -configuration ${{ parameters.libsAndPacksConfig }}
/p:TestReadyToRun=true
/p:RunSmokeTestsOnly=true
- ${{ parameters.variables }}

steps:
- checkout: self
clean: true
fetchDepth: $(checkoutFetchDepth)

# When working in Apple platforms, we need to install some native dependencies.
# Currently, libraries with TestReadyToRun enabled will only be built
# in macOS from these platforms. If we decide to support iOS and/or tvOS,
# we'll have to add them to this condition.

- ${{ if in(parameters.osGroup, 'osx') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
displayName: Install Native Build Dependencies

- ${{ if eq(parameters.isOfficialBuild, true) }}:
- template: /eng/pipelines/common/restore-internal-tools.yml

# When working in Apple platforms, we need to keep track of the Disk Usage.
- ${{ if in(parameters.osGroup, 'osx') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
df -h
displayName: Disk Usage Before Build

# Build CoreCLR, the Libraries, and the Packs.
- script: $(_buildScript) -subset $(_preTestSubsets) $(_buildArguments)
displayName: Build CoreCLR, Libraries, and Packs

# When working in Apple platforms, we need to keep track of the Disk Usage.
- ${{ if in(parameters.osGroup, 'osx') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
df -h
displayName: Disk Usage After Build

# Build and run the libraries tests with TestReadyToRun.
- script: $(_buildScript) -subset $(_libsTestsSubset) $(_libsTestsArguments)
displayName: Build and Run Libraries Tests with TestReadyToRun Enabled
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
***********************************************************************************************
Microsoft.NET.CrossGen.targets
Microsoft.NET.CrossGen.props

WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
Expand All @@ -17,4 +17,4 @@ Copyright (c) .NET Foundation. All rights reserved.
<UsingTask TaskName="PrepareForReadyToRunCompilation" AssemblyFile="$(MSBuildThisFileDirectory)Crossgen2Tasks.dll" />
<UsingTask TaskName="ResolveReadyToRunCompilers" AssemblyFile="$(MSBuildThisFileDirectory)Crossgen2Tasks.dll" />
<UsingTask TaskName="RunReadyToRunCompiler" AssemblyFile="$(MSBuildThisFileDirectory)Crossgen2Tasks.dll" />
</Project>
</Project>
Loading