Actually use TargetOS=AnyOS in the build-test-job (Try 2) (#61801)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Mon, 22 Nov 2021 05:13:05 +0000 (21:13 -0800)
committerGitHub <noreply@github.com>
Mon, 22 Nov 2021 05:13:05 +0000 (21:13 -0800)
32 files changed:
eng/liveBuilds.targets
eng/pipelines/common/templates/runtimes/build-test-job.yml
eng/pipelines/coreclr/ci.yml
eng/pipelines/coreclr/clrinterpreter.yml
eng/pipelines/coreclr/crossgen2-composite.yml
eng/pipelines/coreclr/crossgen2-gcstress.yml
eng/pipelines/coreclr/crossgen2-outerloop.yml
eng/pipelines/coreclr/crossgen2.yml
eng/pipelines/coreclr/gc-longrunning.yml
eng/pipelines/coreclr/gc-simulator.yml
eng/pipelines/coreclr/gc-standalone.yml
eng/pipelines/coreclr/gcstress-extra.yml
eng/pipelines/coreclr/gcstress0x3-gcstress0xc.yml
eng/pipelines/coreclr/ilasm.yml
eng/pipelines/coreclr/jit-experimental.yml
eng/pipelines/coreclr/jitstress-isas-arm.yml
eng/pipelines/coreclr/jitstress-isas-x86.yml
eng/pipelines/coreclr/jitstress.yml
eng/pipelines/coreclr/jitstress2-jitstressregs.yml
eng/pipelines/coreclr/jitstressregs-x86.yml
eng/pipelines/coreclr/jitstressregs.yml
eng/pipelines/coreclr/pgo.yml
eng/pipelines/coreclr/r2r-extra.yml
eng/pipelines/coreclr/r2r.yml
eng/pipelines/coreclr/release-tests.yml
eng/pipelines/coreclr/runincontext.yml
eng/pipelines/coreclr/superpmi-collect.yml
eng/pipelines/coreclr/tieringtest.yml
eng/pipelines/runtime.yml
eng/pipelines/runtimelab.yml
src/tests/Directory.Build.targets
src/tests/build.proj

index d62f4bc..1cd7a1d 100644 (file)
            Text="The 'libs' subset must be built before building this project. Missing artifacts: $(LibrariesNativeArtifactsPath). Configuration: '$(LibrariesConfiguration)'. To use a different configuration, specify the 'LibrariesConfiguration' property." />
   </Target>
 
-  <Target Name="ResolveLibrariesFromLocalBuild"
+  <Target Name="ResolveLibrariesRefAssembliesFromLocalBuild"
+          DependsOnTargets="EnsureLocalArtifactsExist">
+    <ItemGroup>
+      <LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' != 'true'" Include="$(LibrariesSharedFrameworkRefArtifactsPath)*.dll;$(LibrariesSharedFrameworkRefArtifactsPath)*.pdb" />
+      <LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' == 'true'" Include="$(LibrariesAllRefArtifactsPath)*.dll;$(LibrariesAllRefArtifactsPath)*.pdb" />
+    </ItemGroup>
+    <Error Condition="'@(LibrariesRefAssemblies)' == ''" Text="The 'libs' subset must be built before building this project." />
+  </Target>
+
+  <Target Name="ResolveLibrariesRuntimeFilesFromLocalBuild"
           DependsOnTargets="
             EnsureLocalArtifactsExist;
             EnsureLocalOSGroupConfigurationArchitectureSpecificArtifactsExist">
     <ItemGroup>
-      <LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' != 'true'" Include="$(LibrariesSharedFrameworkRefArtifactsPath)*.dll;$(LibrariesSharedFrameworkRefArtifactsPath)*.pdb" />
-      <LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' == 'true'" Include="$(LibrariesAllRefArtifactsPath)*.dll;$(LibrariesAllRefArtifactsPath)*.pdb" />
       <LibrariesRuntimeFiles Condition="'$(IncludeOOBLibraries)' != 'true'" Include="
         $(LibrariesSharedFrameworkBinArtifactsPath)*.dll;
         $(LibrariesSharedFrameworkBinArtifactsPath)*.pdb"
         IsNative="true" />
     </ItemGroup>
 
-    <Error Condition="'@(LibrariesRefAssemblies)' == ''" Text="The 'libs' subset must be built before building this project." />
     <Error Condition="'@(LibrariesRuntimeFiles)' == ''" Text="The 'libs' subset must be built before building this project." />
   </Target>
 
+  <Target Name="ResolveLibrariesFromLocalBuild"
+          DependsOnTargets="
+            ResolveLibrariesRefAssembliesFromLocalBuild;
+            ResolveLibrariesRuntimeFilesFromLocalBuild" />
+
   <PropertyGroup>
     <BundledRuntimeIdentifierGraphFile>$(RuntimeIdGraphDefinitionFile)</BundledRuntimeIdentifierGraphFile>
   </PropertyGroup>
index 562b426..f7cc720 100644 (file)
@@ -5,14 +5,6 @@ parameters:
   osSubgroup: ''
   container: ''
   testGroup: ''
-  liveRuntimeBuildConfig: ''
-
-  # Determines librariesbuild configuration to use for the tests. Setting this property implies
-  # a dependency of this job on the appropriate libraries build and is used
-  # to construct the name of the Azure artifact representing libraries build
-  # to use for building the tests.
-  liveLibrariesBuildConfig: ''
-
   displayNameArgs: ''
   condition: true
   stagedBuild: false
@@ -45,13 +37,8 @@ jobs:
     runtimeVariant: ${{ parameters.runtimeVariant }}
     testGroup: ${{ parameters.testGroup }}
     stagedBuild: ${{ parameters.stagedBuild }}
-    liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
     pool: ${{ parameters.pool }}
     dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
-    ${{ if eq(parameters.runtimeFlavor, 'coreclr') }}:
-      liveRuntimeBuildParams: ${{ format('clr.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
-    ${{ if eq(parameters.runtimeFlavor, 'mono') }}:
-      liveRuntimeBuildParams: ${{ format('mono.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
 
     ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX'))) }}:
       compilerArg: '-clang9'
@@ -86,12 +73,8 @@ jobs:
     variables:
       - ${{ each variable in parameters.variables }}:
         - ${{ variable }}
-      - ${{ if eq(parameters.runtimeFlavor, 'coreclr') }}:
-        - name: liveRuntimeBuildParams
-          value: ${{ format('clr.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
-      - ${{ if eq(parameters.runtimeFlavor, 'mono') }}:
-        - name: liveRuntimeBuildParams
-          value: ${{ format('mono.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
+      - name: liveRuntimeBuildParams
+        value: 'libs.ref -c Release -ci'
       - name: compilerArg
         value: ''
       - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
@@ -135,7 +118,7 @@ jobs:
         displayName: Disk Usage before Build
 
     # Build managed test components
-    - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
+    - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) ci /p:TargetOS=AnyOS
       displayName: Build managed test components
 
     - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
@@ -147,7 +130,7 @@ jobs:
     # Zip and publish managed test components
     - template: /eng/pipelines/common/upload-artifact-step.yml
       parameters:
-        rootFolder: $(managedTestArtifactRootFolderPath)
+        rootFolder: '$(binTestsPath)/AnyOS.$(archType).$(buildConfigUpper)'
         includeRootFolder: false
         archiveExtension: '.tar.gz'
         archiveType: tar
@@ -174,6 +157,6 @@ jobs:
       displayName: Publish Logs
       inputs:
         targetPath: $(Build.SourcesDirectory)/artifacts/log
-        artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_Lib${{ parameters.liveLibrariesBuildConfig }}_${{ parameters.testGroup }}'
+        artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
       continueOnError: true
       condition: always()
index baa13cf..fab41af 100644 (file)
@@ -111,8 +111,6 @@ jobs:
     platforms:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     testGroup: outerloop
-    jobParameters:
-      liveLibrariesBuildConfig: Release
 
 #
 # Checked JIT test runs
index af74c06..204d666 100644 (file)
@@ -34,7 +34,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: clrinterpreter
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index df683c5..feea85e 100644 (file)
@@ -35,7 +35,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: innerloop
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 444861b..fc00d1d 100644 (file)
@@ -33,7 +33,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: gcstress-extra
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index df73f8b..b60cc78 100644 (file)
@@ -20,7 +20,7 @@ jobs:
     - Linux_arm64
     - OSX_arm64
     - OSX_x64
-    - windows_x86    
+    - windows_x86
     - windows_x64
     - windows_arm64
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
@@ -67,7 +67,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: outerloop
-      liveLibrariesBuildConfig: Release
 
 # Test most platforms in composite mode as the expected mainline shipping mode
 - template: /eng/pipelines/common/platform-matrix.yml
index ba38b43..35edb1d 100644 (file)
@@ -33,7 +33,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: innerloop
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index c188c75..e685b36 100644 (file)
@@ -32,7 +32,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: gc-longrunning
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 16c24cb..bade23d 100644 (file)
@@ -33,7 +33,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: gc-simulator
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index ab0c4d0..3aa0204 100644 (file)
@@ -30,7 +30,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: gc-standalone
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index ab86720..6700a71 100644 (file)
@@ -31,7 +31,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: gcstress-extra
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 436deac..dba8e21 100644 (file)
@@ -31,7 +31,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: gcstress0x3-gcstress0xc
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 187719b..eff00c7 100644 (file)
@@ -44,7 +44,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: ilasm
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 02048f1..f6e4edd 100644 (file)
@@ -29,7 +29,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: jit-experimental
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index c141067..42cf82b 100644 (file)
@@ -30,7 +30,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: jitstress-isas-arm
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 9045343..65798ce 100644 (file)
@@ -31,7 +31,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: jitstress-isas-x86
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index f1f50f9..4ea3c6c 100644 (file)
@@ -35,7 +35,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: jitstress
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 0e826e0..a3eb7c0 100644 (file)
@@ -35,7 +35,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: checked
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 204cf56..006d4ed 100644 (file)
@@ -30,7 +30,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: jitstressregs-x86
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index c90d4bb..727e0e6 100644 (file)
@@ -35,7 +35,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: jitstressregs
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 132464b..80f1579 100644 (file)
@@ -35,7 +35,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: pgo
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 9c386ac..940c29d 100644 (file)
@@ -31,7 +31,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: r2r-extra
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 4fc7662..81bee51 100644 (file)
@@ -35,7 +35,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: outerloop
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index bfa51bd..fb7cd6a 100644 (file)
@@ -36,7 +36,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: outerloop
-      liveLibrariesBuildConfig: Release
 
 #
 # Release test runs
index 9dcd8f7..1588a59 100644 (file)
@@ -30,7 +30,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: outerloop
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 7b28590..0d41f15 100644 (file)
@@ -12,7 +12,7 @@ trigger:
     - src/coreclr/inc/jiteeversionguid.h
 
 # This pipeline is supposed to be run only on merged changes
-# and should not be triggerable from a PR. 
+# and should not be triggerable from a PR.
 pr: none
 
 schedules:
@@ -54,7 +54,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: outerloop
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index 7767c32..0a57b1e 100644 (file)
@@ -30,7 +30,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: outerloop
-      liveLibrariesBuildConfig: Release
 
 - template: /eng/pipelines/common/platform-matrix.yml
   parameters:
index ae420ad..af8b9c1 100644 (file)
@@ -933,7 +933,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: innerloop
-      liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
       condition: >-
         or(
           eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
@@ -1011,8 +1010,6 @@ jobs:
     - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
     jobParameters:
       testGroup: innerloop
-      liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
-      liveRuntimeBuildConfig: release
       condition: >-
         or(
           eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
index db73445..9f1cd90 100644 (file)
@@ -142,7 +142,6 @@ stages:
         - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
         jobParameters:
           testGroup: innerloop
-          liveLibrariesBuildConfig: Release
           dependsOn:
           - build_Linux_x64_Checked_
           - build_Linux_x64_Release_
index 84bb4bd..a3aca72 100644 (file)
     <Output TaskParameter="TargetOutputs" ItemName="Reference" />
    </MSBuild>
 
-    <ItemGroup >
+    <ItemGroup>
       <Reference Include="$(TargetingPackPath)/*.dll" >
         <Private>false</Private>
       </Reference>
   </Target>
 
   <Target Name="GetLiveRefAssemblies" Returns="@(LibrariesRefAssembliesDlls)"
-          DependsOnTargets="ResolveLibrariesFromLocalBuild">
+          DependsOnTargets="ResolveLibrariesRefAssembliesFromLocalBuild">
     <ItemGroup>
       <LibrariesRefAssembliesDlls Include="@(LibrariesRefAssemblies)" Condition="'%(Extension)' == '.dll'" Private="false" />
     </ItemGroup>
index e0a2bac..0a7d6f2 100644 (file)
 
   <Target Name="BuildTargetingPack" AfterTargets="BatchRestorePackages">
     <Message Text="$(MsgPrefix)Building Targeting Pack" Importance="High" />
-    <Error Text="$(ErrMsgPrefix)$(MsgPrefix)ERROR: TargetOS has not been specified. Please do that then run build again."
-      Condition="'$(TargetOS)' == 'AnyOS'" />
     <MSBuild Projects="Common\external\external.csproj"
              Targets="Build" />
   </Target>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:Configuration=$(Configuration)"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:LibrariesConfiguration=$(LibrariesConfiguration)"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:TargetOS=$(TargetOS)"</GroupBuildCmd>
+      <GroupBuildCmd>$(GroupBuildCmd) "/p:RuntimeOS=$(RuntimeOS)"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:RuntimeFlavor=$(RuntimeFlavor)"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:RuntimeVariant=$(RuntimeVariant)"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:CLRTestBuildAllTargets=$(CLRTestBuildAllTargets)"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) "/p:__SkipRestorePackages=1"</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) /nodeReuse:false</GroupBuildCmd>
       <GroupBuildCmd>$(GroupBuildCmd) /maxcpucount</GroupBuildCmd>
+      <GroupBuildCmd>$(GroupBuildCmd) /bl:$(ArtifactsDir)/log/$(Configuration)/InnerManagedTestBuild.$(__TestGroupToBuild).binlog</GroupBuildCmd>
     </PropertyGroup>
 
     <Message Importance="High" Text="$(MsgPrefix)Building managed test group $(__TestGroupToBuild): $(GroupBuildCmd)" />