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

Setting up infrastructure for UTF8StringExperiment in order to have full ci and official build support #2

Merged
merged 4 commits into from
Jul 21, 2020
Merged
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: 1 addition & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,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 @@ -93,55 +93,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-publish-for-tests.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-publish-for-tests.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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe name this template, prepare-publish-for-framework or something like that? Cause this is not just for tests, this is also for the official build.

# 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 @@ -50,13 +51,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