Skip to content

Commit

Permalink
Add runtimelab.yml for dotnet/runtimelab experiments CI and build inf…
Browse files Browse the repository at this point in the history
…rastructure (dotnet#39749)

* Add runtimelab.yml for dotnet/runtimelab experiments CI and build infrastructure

* rename one of the ymls based on feedback
  • Loading branch information
joperezr authored Jul 22, 2020
1 parent 8ddc945 commit ea82629
Show file tree
Hide file tree
Showing 11 changed files with 337 additions and 69 deletions.
2 changes: 1 addition & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@

<!-- Installer sets -->
<ItemGroup Condition="$(_subset.Contains('+corehost+'))">
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost\build.proj" SignPhase="Binaries" />
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost\corehost.proj" SignPhase="Binaries" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" BuildInParallel="true" Pack="true" Category="installer" />
</ItemGroup>

Expand Down
6 changes: 5 additions & 1 deletion eng/pipelines/common/templates/runtimes/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ parameters:
runtimeFlavor: 'coreclr'
runtimeFlavorDisplayName: 'CoreCLR'
runtimeVariant: ''
dependsOn: []

### Build managed test components (native components are getting built as part
### of the the product build job).
Expand Down Expand Up @@ -63,10 +64,13 @@ jobs:
# See https://docs.microsoft.com/azure/devops/pipelines/process/conditions
condition: and(succeeded(), ${{ parameters.condition }})

${{ if ne(parameters.dependsOn[0], '') }}:
dependsOn: ${{ parameters.dependsOn }}

# TODO: Build of managed test components currently depends on the corresponding build job
# because it needs System.Private.Corelib; we should be able to remove this dependency
# by switching over to using reference assembly.
${{ if ne(parameters.stagedBuild, true) }}:
${{ if and(ne(parameters.stagedBuild, true), eq(parameters.dependsOn[0], '')) }}:
dependsOn:
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig)) }}
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
Expand Down
23 changes: 14 additions & 9 deletions eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ parameters:
pool: ''
runtimeFlavor: 'coreclr'
runtimeFlavorDisplayName: 'CoreCLR'
dependsOn: []

### Test run job

Expand Down Expand Up @@ -47,15 +48,19 @@ jobs:
${{ if eq(variables['System.TeamProject'], 'internal') }}:
continueOnError: true

dependsOn:
- ${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
- '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{parameters.buildConfig }}'
- ${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
- '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}'
- ${{ if ne(parameters.stagedBuild, true) }}:
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
${{ if ne(parameters.dependsOn[0], '') }}:
dependsOn: ${{ parameters.dependsOn }}

${{ if eq(parameters.dependsOn[0], '') }}:
dependsOn:
- ${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
- '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{parameters.buildConfig }}'
- ${{ if notIn(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
- '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}'
- ${{ if ne(parameters.stagedBuild, true) }}:
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}

# Compute job name from template parameters
${{ if in(parameters.testGroup, 'innerloop', 'clrinterpreter') }}:
Expand Down
52 changes: 3 additions & 49 deletions eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,55 +99,9 @@ jobs:
displayName: Disk Usage after Build
- ${{ if eq(parameters.runTests, false) }}:
- ${{ if ne(parameters.isOfficialBuild, true) }}:
- task: CopyFiles@2
displayName: Prepare testhost folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/testhost
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/testhost

- task: CopyFiles@2
displayName: Prepare runtime folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/runtime
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/runtime

- task: CopyFiles@2
displayName: Prepare ref folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref

- task: CopyFiles@2
displayName: Prepare shared framework ref assemblies to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref/microsoft.netcore.app
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref/microsoft.netcore.app

- task: CopyFiles@2
displayName: Prepare shared framework runtime folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/pkg
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/pkg

- task: CopyFiles@2
displayName: Prepare docs folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/docs
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/docs

- task: CopyFiles@2
displayName: Prepare native folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/native
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/native

- task: CopyFiles@2
displayName: Prepare artifacts packages folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/packages
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages
condition: and(succeeded(), eq(variables['_librariesBuildProducedPackages'], true))
- template: /eng/pipelines/libraries/prepare-for-bin-publish.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}

- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
Expand Down
55 changes: 55 additions & 0 deletions eng/pipelines/libraries/prepare-for-bin-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Steps used to prepare the Artifacts Staging Directory with required files for
# executing libraries tests as well as shared framework assets
parameters:
isOfficialBuild: ''

steps:
- ${{ if ne(parameters.isOfficialBuild, true) }}:
- task: CopyFiles@2
displayName: Prepare testhost folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/testhost
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/testhost

- task: CopyFiles@2
displayName: Prepare runtime folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/runtime
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/runtime

- task: CopyFiles@2
displayName: Prepare ref folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref

- task: CopyFiles@2
displayName: Prepare shared framework ref assemblies to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref/microsoft.netcore.app
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref/microsoft.netcore.app

- task: CopyFiles@2
displayName: Prepare docs folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/docs
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/docs

- task: CopyFiles@2
displayName: Prepare shared framework runtime folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/pkg
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/pkg

- task: CopyFiles@2
displayName: Prepare native folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/native
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/native

- task: CopyFiles@2
displayName: Prepare artifacts packages folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/packages
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages
condition: and(succeeded(), eq(variables['_librariesBuildProducedPackages'], true))
18 changes: 11 additions & 7 deletions eng/pipelines/libraries/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ parameters:
# stress modes that each test will be run with. This is the same usage as 'testGroup' in
# eng/pipelines/common/templates/runtimes/run-test-job.yml.
coreclrTestGroup: ''
dependsOn: []

jobs:
- template: /eng/pipelines/libraries/base-job.yml
Expand Down Expand Up @@ -51,13 +52,16 @@ jobs:
testDisplayName: ${{ parameters.runtimeFlavor }}_interpreter_${{ parameters.liveRuntimeBuildConfig }}

dependsOn:
- ${{ if notIn(parameters.framework, 'allConfigurations', 'net472') }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
# tests are built as part of product build
- ${{ if or(ne(parameters.archType, parameters.dependsOnTestArchitecture), ne(parameters.buildConfig, parameters.dependsOnTestBuildConfiguration)) }}:
- ${{ format('libraries_build_{0}_{1}_{2}', parameters.osGroup, parameters.dependsOnTestArchitecture, parameters.dependsOnTestBuildConfiguration) }}
- ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}:
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveRuntimeBuildConfig) }}
- ${{ if ne(parameters.dependsOn[0], '') }}:
- ${{ parameters.dependsOn }}
- ${{ if eq(parameters.dependsOn[0], '') }}:
- ${{ if notIn(parameters.framework, 'allConfigurations', 'net472') }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
# tests are built as part of product build
- ${{ if or(ne(parameters.archType, parameters.dependsOnTestArchitecture), ne(parameters.buildConfig, parameters.dependsOnTestBuildConfiguration)) }}:
- ${{ format('libraries_build_{0}_{1}_{2}', parameters.osGroup, parameters.dependsOnTestArchitecture, parameters.dependsOnTestBuildConfiguration) }}
- ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}:
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveRuntimeBuildConfig) }}

variables:
- librariesTestsArtifactName: ${{ format('libraries_test_assets_{0}_{1}_{2}', parameters.osGroup, parameters.dependsOnTestArchitecture, parameters.dependsOnTestBuildConfiguration) }}
Expand Down
Loading

0 comments on commit ea82629

Please sign in to comment.