diff --git a/eng/Subsets.props b/eng/Subsets.props index fa72f142f0c5c..958389db150f6 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -209,7 +209,7 @@ - + diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 0f3c188d20e89..56fa8dffddc1b 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -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). @@ -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, '') }}: diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 39616a833b0e4..4d93701584fe6 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -20,6 +20,7 @@ parameters: pool: '' runtimeFlavor: 'coreclr' runtimeFlavorDisplayName: 'CoreCLR' + dependsOn: [] ### Test run job @@ -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') }}: diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml index 51dcb37ff23fa..f4b02cf062158 100644 --- a/eng/pipelines/libraries/build-job.yml +++ b/eng/pipelines/libraries/build-job.yml @@ -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: diff --git a/eng/pipelines/libraries/prepare-for-bin-publish.yml b/eng/pipelines/libraries/prepare-for-bin-publish.yml new file mode 100644 index 0000000000000..fa71beaae65fd --- /dev/null +++ b/eng/pipelines/libraries/prepare-for-bin-publish.yml @@ -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)) diff --git a/eng/pipelines/libraries/run-test-job.yml b/eng/pipelines/libraries/run-test-job.yml index 74bc7da3d73e3..6c5e397d4dd09 100644 --- a/eng/pipelines/libraries/run-test-job.yml +++ b/eng/pipelines/libraries/run-test-job.yml @@ -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 @@ -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) }} diff --git a/eng/pipelines/runtimelab.yml b/eng/pipelines/runtimelab.yml new file mode 100644 index 0000000000000..6f00e775b943d --- /dev/null +++ b/eng/pipelines/runtimelab.yml @@ -0,0 +1,185 @@ +# Setting batch to true, triggers one build at a time. +# if there is a push while a build in progress, it will wait, +# until the running build finishes, and produce a build with all the changes +# that happened during the last build. +trigger: + batch: true + branches: + include: + # Add Experiment branch here + paths: + include: + - '*' + - docs/manpages/* + exclude: + - eng/Version.Details.xml + - .github/* + - docs/* + - CODE-OF-CONDUCT.md + - CONTRIBUTING.md + - LICENSE.TXT + - PATENTS.TXT + - README.md + - SECURITY.md + - THIRD-PARTY-NOTICES.TXT + +pr: + branches: + include: + # Add Experiment branch here + paths: + include: + - '*' + - docs/manpages/* + exclude: + - eng/Version.Details.xml + - .github/* + - docs/* + - CODE-OF-CONDUCT.md + - CONTRIBUTING.md + - LICENSE.TXT + - PATENTS.TXT + - README.md + - SECURITY.md + - THIRD-PARTY-NOTICES.TXT + +variables: + - template: /eng/pipelines/common/variables.yml + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +# +# Build with Debug config and Checked runtimeConfiguration +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Checked + platforms: + - Linux_x64 + - Windows_NT_x64 + jobParameters: + testGroup: innerloop + buildArgs: -s clr+libs+installer -c debug -runtimeConfiguration Checked + extraStepsTemplate: /eng/pipelines/runtimelab/runtimelab-post-build-steps.yml + +# +# Build with Release config and Release runtimeConfiguration +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + platforms: + - Linux_x64 + - Windows_NT_x64 + jobParameters: + testGroup: innerloop + buildArgs: -s clr+libs+libs.tests+installer -c $(_BuildConfig) /p:ArchiveTests=true + extraStepsTemplate: /eng/pipelines/runtimelab/runtimelab-post-build-steps.yml + extraStepsParameters: + uploadTests: true + +# +# Build with Release allConfigurations to produce packages +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - Windows_NT_x64 + jobParameters: + testGroup: innerloop + nameSuffix: All_Configurations + buildArgs: -s libs -c $(_BuildConfig) -allConfigurations + +# +# CoreCLR Test builds using live libraries release build +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: Checked + platforms: + - Linux_x64 + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + dependsOn: + - build_Linux_x64_Checked_ + - build_Linux_x64_Release_ + +# +# CoreCLR Test executions using live libraries +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: Checked + platforms: + - Linux_x64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + dependsOn: + - coreclr_common_test_build_p0_AnyOS_AnyCPU_Checked + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: Checked + platforms: + - Windows_NT_x64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + dependsOn: + - coreclr_common_test_build_p0_AnyOS_AnyCPU_Checked + - build_Windows_NT_x64_Checked_ + - build_Windows_NT_x64_Release_ + +# +# Libraries Release Test Execution against a release coreclr runtime +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platforms: + - Linux_x64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isFullMatrix: false + isOfficialBuild: false + testScope: innerloop + liveRuntimeBuildConfig: Release + dependsOnTestBuildConfiguration: Release + dependsOnTestArchitecture: x64 + dependsOn: + - build_Linux_x64_Release_ + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platforms: + - Windows_NT_x64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isFullMatrix: false + isOfficialBuild: false + testScope: innerloop + liveRuntimeBuildConfig: Release + dependsOnTestBuildConfiguration: Release + dependsOnTestArchitecture: x64 + dependsOn: + - build_Windows_NT_x64_Release_ diff --git a/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml b/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml new file mode 100644 index 0000000000000..e5fbcba7bc951 --- /dev/null +++ b/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml @@ -0,0 +1,59 @@ +parameters: + buildConfig: '' + archType: '' + osGroup: '' + osSubgroup: '' + uploadTests: false + +steps: + # Build coreclr native test output + - script: $(Build.SourcesDirectory)/src/coreclr/build-test$(scriptExt) skipstressdependencies skipmanaged skipgeneratelayout $(buildConfigUpper) ${{ parameters.archType }} + displayName: Build native test components + + # Copy all build output into artifacts staging directory + - template: /eng/pipelines/libraries/prepare-for-bin-publish.yml + + # Zip CoreCLR Build Output + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.$(buildConfigUpper) + archiveType: $(archiveType) + tarCompression: $(tarCompression) + includeRootFolder: false + archiveExtension: $(archiveExtension) + artifactName: CoreCLRProduct__${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }} + displayName: 'CoreCLR product build' + + # Zip Test Build + - ${{ if eq(parameters.uploadTests, true) }}: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: true + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: libraries_test_assets_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }} + displayName: Test Assets + + # Zip product native assets for use by Tests + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/tests/coreclr/obj/${{ parameters.osGroup }}.${{ parameters.archType }}.$(buildConfigUpper) + includeRootFolder: false + archiveType: $(archiveType) + tarCompression: $(tarCompression) + archiveExtension: $(archiveExtension) + artifactName: CoreCLRNativeTestArtifacts_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }} + displayName: 'native test components' + + # Zip Libraries Build Output + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.ArtifactStagingDirectory)/artifacts + archiveType: $(archiveType) + tarCompression: $(tarCompression) + includeRootFolder: false + archiveExtension: $(archiveExtension) + artifactName: libraries_bin_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }} + displayName: Build Assets diff --git a/src/installer/corehost/build.proj b/src/installer/corehost/corehost.proj similarity index 100% rename from src/installer/corehost/build.proj rename to src/installer/corehost/corehost.proj diff --git a/src/libraries/libraries-packages.proj b/src/libraries/libraries-packages.proj index 2301e84828275..f2eef864898f2 100644 --- a/src/libraries/libraries-packages.proj +++ b/src/libraries/libraries-packages.proj @@ -4,6 +4,7 @@ BuildAllProjects=true $(AdditionalBuildTargetFrameworks);package-$(Configuration) + true @@ -15,7 +16,8 @@ - + + diff --git a/src/tests/Interop/ICustomMarshaler/Primitives/ICustomMarshaler_TargetWindows.csproj b/src/tests/Interop/ICustomMarshaler/Primitives/ICustomMarshaler_TargetWindows.csproj index 854fbdda3febd..3c152f7cb31b8 100644 --- a/src/tests/Interop/ICustomMarshaler/Primitives/ICustomMarshaler_TargetWindows.csproj +++ b/src/tests/Interop/ICustomMarshaler/Primitives/ICustomMarshaler_TargetWindows.csproj @@ -10,6 +10,6 @@ - +