diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 00a072edc599a6..509313dfbc665f 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -6,6 +6,7 @@ parameters: container: '' testGroup: '' liveRuntimeBuildConfig: '' + testBuildPhase: '' # When set to a non-empty value (Debug / Release), it determines libraries # build configuration to use for the tests. Setting this property implies @@ -50,13 +51,24 @@ jobs: ${{ if eq(variables['System.TeamProject'], 'internal') }}: continueOnError: true + # Compute job name from template parameters ${{ if eq(parameters.testGroup, 'innerloop') }}: - name: '${{ parameters.runtimeFlavor }}_common_test_build_p0_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' - displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri0 Test Build ${{ parameters.osGroup }}${{ parameters.osSubgroup }} ${{ parameters.archType }} ${{ parameters.buildConfig }}' + ${{ if ne(parameters.testBuildPhase, 'targetGeneric') }}: + name: '${{ parameters.runtimeFlavor }}_common_test_build_p0_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' + displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri0 Test Build ${{ parameters.osGroup }}${{ parameters.osSubgroup }} ${{ parameters.archType }} ${{ parameters.buildConfig }}' + ${{ if ne(parameters.testGroup, 'innerloop') }}: + ${{ if ne(parameters.testBuildPhase, 'targetGeneric') }}: + name: '${{ parameters.runtimeFlavor }}_common_test_build_p1_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' + displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri1 Test Build ${{ parameters.osGroup }}${{ parameters.osSubgroup }} ${{ parameters.archType }} ${{ parameters.buildConfig }}' + ${{ if eq(parameters.testGroup, 'innerloop') }}: + ${{ if eq(parameters.testBuildPhase, 'targetGeneric') }}: + name: '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{ parameters.buildConfig }}' + displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri0 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}' ${{ if ne(parameters.testGroup, 'innerloop') }}: - name: '${{ parameters.runtimeFlavor }}_common_test_build_p1_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' - displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri1 Test Build ${{ parameters.osGroup }}${{ parameters.osSubgroup }} ${{ parameters.archType }} ${{ parameters.buildConfig }}' + ${{ if eq(parameters.testBuildPhase, 'targetGeneric') }}: + name: '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{ parameters.buildConfig }}' + displayName: '${{ parameters.runtimeFlavorDisplayName }} Common Pri1 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}' # Since the condition is being altered, merge the default with the additional conditions. # See https://docs.microsoft.com/azure/devops/pipelines/process/conditions @@ -120,7 +132,7 @@ jobs: # Build managed test components - - script: $(coreClrRepoRootDir)build-test$(scriptExt) skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) + - script: $(coreClrRepoRootDir)build-test$(scriptExt) ${{ parameters.testBuildPhase }} skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) displayName: Build managed test components @@ -129,24 +141,32 @@ jobs: parameters: rootFolder: $(managedTestArtifactRootFolderPath) includeRootFolder: false - archiveType: $(archiveType) - tarCompression: $(tarCompression) - archiveExtension: $(archiveExtension) - artifactName: $(managedTestArtifactName) - displayName: 'managed test components' + ${{ if ne(parameters.testBuildPhase, 'targetGeneric') }}: + archiveExtension: $(archiveExtension) + archiveType: $(archiveType) + tarCompression: $(tarCompression) + artifactName: $(managedTestArtifactName) + displayName: 'managed test components' + ${{ if eq(parameters.testBuildPhase, 'targetGeneric') }}: + 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: $(archiveType) - tarCompression: $(tarCompression) - archiveExtension: $(archiveExtension) - artifactName: $(microsoftNetSdkIlArtifactName) - displayName: 'Microsoft.NET.Sdk.IL package' + - ${{ if ne(parameters.testBuildPhase, 'targetGeneric') }}: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(microsoftNetSdkIlFolderPath) + includeRootFolder: false + archiveType: $(archiveType) + tarCompression: $(tarCompression) + archiveExtension: $(archiveExtension) + artifactName: $(microsoftNetSdkIlArtifactName) + displayName: 'Microsoft.NET.Sdk.IL package' # Publish Logs @@ -154,6 +174,9 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.testGroup }}' + ${{ if ne(parameters.testBuildPhase, 'targetGeneric') }}: + artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.testGroup }}' + ${{ if eq(parameters.testBuildPhase, 'targetGeneric') }}: + artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_Lib${{ parameters.liveLibrariesBuildConfig }}_${{ parameters.testGroup }}' continueOnError: true condition: always() diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index ba72a9aababf0c..2850607fda033f 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -22,6 +22,10 @@ parameters: variables: {} pool: '' runtimeFlavorDisplayName: 'CoreCLR' + # If true, tests were built in two phases + # We will depend on both the TargetGeneric tests which are for AnyOS AnyCPU + # as well as the TargetSpecific test. Both sets of tests will be run + testBuildPhased : false ### Test run job @@ -57,6 +61,12 @@ jobs: - '${{ parameters.runtimeFlavor }}_common_test_build_p0_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_${{ parameters.archType }}_${{parameters.buildConfig }}' - ${{ if ne(parameters.testGroup, 'innerloop') }}: - '${{ parameters.runtimeFlavor }}_common_test_build_p1_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_${{ parameters.archType }}_${{parameters.buildConfig }}' + - ${{ if eq(parameters.testBuildPhased, true) }}: + # Also depend on AnyOS AnyCPU tests + - ${{ if eq(parameters.testGroup, 'innerloop') }}: + - '${{ parameters.runtimeFlavor }}_common_test_build_p0_AnyOS_AnyCPU_${{parameters.buildConfig }}' + - ${{ if ne(parameters.testGroup, 'innerloop') }}: + - '${{ parameters.runtimeFlavor }}_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}' - ${{ if ne(parameters.stagedBuild, true) }}: - ${{ format('{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeFlavor, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} - ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}: @@ -189,6 +199,16 @@ jobs: # Download and unzip managed test artifacts - ${{ if ne(parameters.corefxTests, true) }}: + # First download and unzip AnyOS AnyCPU test (if needed) + - ${{ if eq(parameters.testBuildPhased, true) }}: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: '$(managedTestArtifactRootFolderPath)' + artifactFileName: '$(managedGenericTestArtifactName).tar.gz' + artifactName: '$(managedGenericTestArtifactName)' + displayName: 'generic managed test artifacts' + + # Download and unzip target specific tests - template: /eng/pipelines/common/download-artifact-step.yml parameters: unpackFolder: '$(managedTestArtifactRootFolderPath)' diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 4982ffd0018bd1..51a85c2f4558df 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -92,6 +92,17 @@ jobs: # # Checked test builds # +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - OSX_x64 + testGroup: outerloop + jobParameters: + liveLibrariesBuildConfig: Release + testBuildPhase: targetGeneric + - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -107,6 +118,7 @@ jobs: testGroup: outerloop jobParameters: liveLibrariesBuildConfig: Release + testBuildPhase: targetSpecific # # Checked JIT test runs @@ -121,6 +133,7 @@ jobs: jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release + testBuildPhased: true # # Checked R2R test runs @@ -146,6 +159,7 @@ jobs: readyToRun: true displayNameArgs: R2R liveLibrariesBuildConfig: Release + testBuildPhased: true # # Crossgen-comparison jobs diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index c9f71a959fa61f..3043b2e4b41839 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -78,6 +78,9 @@ jobs: - name: corelibProductArtifactName value: 'CoreLib_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + - name: managedGenericTestArtifactName + value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' + - name: managedTestArtifactName value: 'CoreCLRManagedTestArtifacts_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_$(archType)_$(buildConfig)' diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index faa41858eb9626..721e4c5aa2f87c 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -576,6 +576,21 @@ jobs: # CoreCLR Test builds using live libraries release build # Only when CoreCLR is changed # +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - OSX_x64 + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + testBuildPhase: targetGeneric + condition: >- + or( + eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) + - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -588,6 +603,7 @@ jobs: jobParameters: testGroup: innerloop liveLibrariesBuildConfig: Release + testBuildPhase: targetSpecific condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), @@ -609,6 +625,7 @@ jobs: jobParameters: testGroup: innerloop liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + testBuildPhase: targetSpecific condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), @@ -632,6 +649,7 @@ jobs: jobParameters: testGroup: innerloop liveLibrariesBuildConfig: Release + testBuildPhased: true condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), @@ -651,6 +669,7 @@ jobs: jobParameters: testGroup: innerloop liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + testBuildPhased: true condition: >- or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Activator.csproj b/src/coreclr/tests/src/Interop/COM/Activator/Activator.csproj index a2c1c59df84485..f68f1779bb2ffc 100644 --- a/src/coreclr/tests/src/Interop/COM/Activator/Activator.csproj +++ b/src/coreclr/tests/src/Interop/COM/Activator/Activator.csproj @@ -32,4 +32,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyA.csproj b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyA.csproj index 0450b412c21ade..25cd7bc81ba73e 100644 --- a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyA.csproj +++ b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyA.csproj @@ -11,4 +11,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyB.csproj b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyB.csproj index d8ebd98a1fa21b..7736ea67c02875 100644 --- a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyB.csproj +++ b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyB.csproj @@ -10,4 +10,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.csproj b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.csproj index 1a76fc4f9a10bd..fb60b2712e408e 100644 --- a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.csproj +++ b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyC.csproj @@ -6,4 +6,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyContracts.csproj b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyContracts.csproj index d3f3b4ffcbe059..67b20eb52e4f45 100644 --- a/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyContracts.csproj +++ b/src/coreclr/tests/src/Interop/COM/Activator/Servers/AssemblyContracts.csproj @@ -6,4 +6,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/ComWrappers/API/ComWrappersTests.csproj b/src/coreclr/tests/src/Interop/COM/ComWrappers/API/ComWrappersTests.csproj index 83acfa1f6fd5eb..37f14d79cb7e12 100644 --- a/src/coreclr/tests/src/Interop/COM/ComWrappers/API/ComWrappersTests.csproj +++ b/src/coreclr/tests/src/Interop/COM/ComWrappers/API/ComWrappersTests.csproj @@ -14,4 +14,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/ComWrappers/GlobalInstance/GlobalInstanceTests.csproj b/src/coreclr/tests/src/Interop/COM/ComWrappers/GlobalInstance/GlobalInstanceTests.csproj index 1e5e14f330e2ec..205811d912c5bd 100644 --- a/src/coreclr/tests/src/Interop/COM/ComWrappers/GlobalInstance/GlobalInstanceTests.csproj +++ b/src/coreclr/tests/src/Interop/COM/ComWrappers/GlobalInstance/GlobalInstanceTests.csproj @@ -34,4 +34,10 @@ PreserveNewest + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/Dynamic/Dynamic.csproj b/src/coreclr/tests/src/Interop/COM/Dynamic/Dynamic.csproj index f44514cd9035a7..324266b64650bc 100644 --- a/src/coreclr/tests/src/Interop/COM/Dynamic/Dynamic.csproj +++ b/src/coreclr/tests/src/Interop/COM/Dynamic/Dynamic.csproj @@ -22,4 +22,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/NETClientAggregation.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/NETClientAggregation.csproj index 5c358c407ea46f..e29fe4be9da145 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/NETClientAggregation.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/NETClientAggregation.csproj @@ -20,4 +20,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/ConsumeNETServer.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/ConsumeNETServer.csproj index 5c1447eb6cfbbe..89f42a884b47fe 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/ConsumeNETServer.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/ConsumeNETServer/ConsumeNETServer.csproj @@ -31,4 +31,10 @@ PreserveNewest + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Events/NETClientEvents.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/Events/NETClientEvents.csproj index b10cf7019a8e3a..bbd6884dc4347b 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Events/NETClientEvents.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/Events/NETClientEvents.csproj @@ -21,4 +21,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/NETClientIDispatch.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/NETClientIDispatch.csproj index 5c358c407ea46f..e29fe4be9da145 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/NETClientIDispatch.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/NETClientIDispatch.csproj @@ -20,4 +20,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/NETClientLicense.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/NETClientLicense.csproj index 5c358c407ea46f..e29fe4be9da145 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/NETClientLicense.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/Licensing/NETClientLicense.csproj @@ -20,4 +20,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj index f876bed737a106..8752ff035926b8 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj @@ -25,4 +25,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitivesInALC.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitivesInALC.csproj index 5279d5f3b16a9a..56b561365c3912 100644 --- a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitivesInALC.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitivesInALC.csproj @@ -18,4 +18,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.DefaultInterfaces.ilproj b/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.DefaultInterfaces.ilproj index f1af2b9c4dedad..a60092bdf8f318 100644 --- a/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.DefaultInterfaces.ilproj +++ b/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.DefaultInterfaces.ilproj @@ -5,4 +5,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.csproj b/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.csproj index ebaacfc5bc2a07..72b1b2f8ea1315 100644 --- a/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.csproj +++ b/src/coreclr/tests/src/Interop/COM/NETServer/NETServer.csproj @@ -8,4 +8,10 @@ + + 1 + + + + diff --git a/src/coreclr/tests/src/Interop/COM/Reflection/Reflection.csproj b/src/coreclr/tests/src/Interop/COM/Reflection/Reflection.csproj index 157be61d17bfac..186dcf064327c2 100644 --- a/src/coreclr/tests/src/Interop/COM/Reflection/Reflection.csproj +++ b/src/coreclr/tests/src/Interop/COM/Reflection/Reflection.csproj @@ -12,4 +12,10 @@ NETServer + + 1 + + + +