From c40affc9e811292b55f5f71709829c53c746cd41 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Mon, 9 Sep 2024 16:30:53 -0700 Subject: [PATCH 1/4] Fix SuperPMI collections 1. Remove FSharp benchmark dll from realworld collection, since it no longer has any benchmarks. 2. Properly pass `-cross` switch when building CORE_ROOT. Propagate `crossBuild` more widely through the scripts. --- eng/pipelines/common/global-build-job.yml | 1 + .../coreclr/superpmi-collect-test.yml | 2 ++ eng/pipelines/coreclr/superpmi-collect.yml | 2 ++ ...-superpmi-asmdiffs-checked-release-job.yml | 2 ++ .../templates/run-superpmi-collect-job.yml | 2 ++ .../templates/run-superpmi-diffs-job.yml | 2 ++ .../templates/run-superpmi-replay-job.yml | 2 ++ .../templates/superpmi-collect-job.yml | 15 +++++++++++-- src/coreclr/scripts/superpmi-collect.proj | 22 +++++++++---------- 9 files changed, 36 insertions(+), 14 deletions(-) diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 1fe318e984fa8b..42a9aac2a507f4 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -35,6 +35,7 @@ parameters: preBuildSteps: [] templatePath: 'templates' templateContext: '' + disableComponentGovernance: '' jobs: - template: /eng/common/${{ parameters.templatePath }}/job/job.yml diff --git a/eng/pipelines/coreclr/superpmi-collect-test.yml b/eng/pipelines/coreclr/superpmi-collect-test.yml index dc9408c30a47d5..863a79c1b319cc 100644 --- a/eng/pipelines/coreclr/superpmi-collect-test.yml +++ b/eng/pipelines/coreclr/superpmi-collect-test.yml @@ -65,6 +65,7 @@ extends: parameters: buildArgs: -s clr.spmi -c $(_BuildConfig) archParameter: -arch x64 + displayName: Build SuperPMI - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - template: /eng/pipelines/common/upload-artifact-step.yml parameters: @@ -106,6 +107,7 @@ extends: buildArgs: -s clr.spmi -c $(_BuildConfig) archParameter: -arch x64 container: linux_x64 + displayName: Build SuperPMI - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - template: /eng/pipelines/common/upload-artifact-step.yml parameters: diff --git a/eng/pipelines/coreclr/superpmi-collect.yml b/eng/pipelines/coreclr/superpmi-collect.yml index ea5b57d5f51df2..3530ff5a958a08 100644 --- a/eng/pipelines/coreclr/superpmi-collect.yml +++ b/eng/pipelines/coreclr/superpmi-collect.yml @@ -86,6 +86,7 @@ extends: parameters: buildArgs: -s clr.spmi -c $(_BuildConfig) archParameter: -arch x64 + displayName: Build SuperPMI - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - template: /eng/pipelines/common/upload-artifact-step.yml parameters: @@ -127,6 +128,7 @@ extends: buildArgs: -s clr.spmi -c $(_BuildConfig) archParameter: -arch x64 container: linux_x64 + displayName: Build SuperPMI - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - template: /eng/pipelines/common/upload-artifact-step.yml parameters: diff --git a/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-checked-release-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-checked-release-job.yml index 6284c6fd689379..b5c7996da958d4 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-checked-release-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-checked-release-job.yml @@ -9,6 +9,7 @@ parameters: archType: '' # required -- targeting CPU architecture osGroup: '' # required -- operating system for the job osSubgroup: '' # optional -- operating system subgroup + crossBuild: '' # optional -- 'true' if this is a cross-build continueOnError: 'false' # optional -- determines whether to continue the build if the step errors dependsOn: '' # optional -- dependencies of the job timeoutInMinutes: 320 # optional -- timeout for the job @@ -24,6 +25,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} enableTelemetry: ${{ parameters.enableTelemetry }} enablePublishBuildArtifacts: true diff --git a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml index 9bf2ed9d5bceee..87df0ebba93a39 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml @@ -9,6 +9,7 @@ parameters: archType: '' # required -- targeting CPU architecture osGroup: '' # required -- operating system for the job osSubgroup: '' # optional -- operating system subgroup + crossBuild: '' # optional -- 'true' if this is a cross-build continueOnError: 'false' # optional -- determines whether to continue the build if the step errors dependsOn: '' # optional -- dependencies of the job timeoutInMinutes: 320 # optional -- timeout for the job @@ -25,6 +26,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} enableTelemetry: ${{ parameters.enableTelemetry }} enablePublishBuildArtifacts: true diff --git a/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml index 8de90083a5a7c4..19a6f7778047a6 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml @@ -9,6 +9,7 @@ parameters: archType: '' # required -- targeting CPU architecture osGroup: '' # required -- operating system for the job osSubgroup: '' # optional -- operating system subgroup + crossBuild: '' # optional -- 'true' if this is a cross-build continueOnError: 'false' # optional -- determines whether to continue the build if the step errors dependsOn: '' # optional -- dependencies of the job timeoutInMinutes: 180 # optional -- timeout for the job @@ -27,6 +28,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} enableTelemetry: ${{ parameters.enableTelemetry }} enablePublishBuildArtifacts: true diff --git a/eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml index b8907cfc56070b..4047a8cb2f7cf6 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml @@ -9,6 +9,7 @@ parameters: archType: '' # required -- targeting CPU architecture osGroup: '' # required -- operating system for the job osSubgroup: '' # optional -- operating system subgroup + crossBuild: '' # optional -- 'true' if this is a cross-build continueOnError: 'false' # optional -- determines whether to continue the build if the step errors dependsOn: '' # optional -- dependencies of the job timeoutInMinutes: 320 # optional -- timeout for the job @@ -24,6 +25,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} enableTelemetry: ${{ parameters.enableTelemetry }} enablePublishBuildArtifacts: true diff --git a/eng/pipelines/coreclr/templates/superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/superpmi-collect-job.yml index 9b3be955c8efce..dfc0a1e2949f1a 100644 --- a/eng/pipelines/coreclr/templates/superpmi-collect-job.yml +++ b/eng/pipelines/coreclr/templates/superpmi-collect-job.yml @@ -4,6 +4,7 @@ parameters: osGroup: '' osSubgroup: '' liveLibrariesBuildConfig: '' + crossBuild: '' variables: {} pool: '' runJobTemplate: '/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml' @@ -24,6 +25,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} collectionType: ${{ parameters.collectionType }} collectionName: ${{ parameters.collectionName }} @@ -33,7 +35,16 @@ jobs: - ${{ if eq(parameters.collectionName, 'coreclr_tests') }}: - 'coreclr_common_test_build_p1_AnyOS_AnyCPU_${{parameters.buildConfig }}' - variables: ${{ parameters.variables }} + variables: + + - name: crossArg + value: '' + - ${{ if eq(parameters.crossBuild, true) }}: + - name: crossArg + value: '-cross' + + - ${{ each variable in parameters.variables }}: + - ${{insert}}: ${{ variable }} steps: # Extra steps that will be passed to the superpmi template and run before sending the job to helix (all of which is done in the template) @@ -72,6 +83,6 @@ jobs: displayName: 'generic managed test artifacts' # Create Core_Root - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg) /p:UsePublishedCrossgen2=false + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) $(crossArg) generatelayoutonly $(librariesOverrideArg) /p:UsePublishedCrossgen2=false displayName: Create Core_Root condition: succeeded() diff --git a/src/coreclr/scripts/superpmi-collect.proj b/src/coreclr/scripts/superpmi-collect.proj index 00d0a89da206b9..a9a1f106982297 100644 --- a/src/coreclr/scripts/superpmi-collect.proj +++ b/src/coreclr/scripts/superpmi-collect.proj @@ -246,21 +246,19 @@ - - - - - - + + + + + - - - - - - + + + + + From d299968af8de5e11772265785d8cd7e3b2b0b861 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Mon, 9 Sep 2024 22:46:18 -0700 Subject: [PATCH 2/4] Pass `container` to xplat-job in run-superpmi-collect-job --- eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml index 87df0ebba93a39..8890893e62e259 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml @@ -26,6 +26,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + container: ${{ parameters.container }} crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} enableTelemetry: ${{ parameters.enableTelemetry }} From 8b5bca61620773135f5ce058d9f3f635bc85dbd9 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Mon, 9 Sep 2024 22:47:10 -0700 Subject: [PATCH 3/4] Better error message --- eng/common/native/init-distro-rid.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/native/init-distro-rid.sh b/eng/common/native/init-distro-rid.sh index 83ea7aab0e081c..45e829a0a936b3 100644 --- a/eng/common/native/init-distro-rid.sh +++ b/eng/common/native/init-distro-rid.sh @@ -84,7 +84,7 @@ initDistroRidGlobal() if [ -n "${rootfsDir}" ]; then # We may have a cross build. Check for the existence of the rootfsDir if [ ! -e "${rootfsDir}" ]; then - echo "Error: rootfsDir has been passed, but the location is not valid." + echo "Error: rootfsDir has been passed (${rootfsDir}), but the location is not valid." exit 1 fi fi From 09071da00ed2ca448c991958bfc2cc861fb61df0 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Mon, 9 Sep 2024 22:52:08 -0700 Subject: [PATCH 4/4] More `container` changes --- eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml | 1 - eng/pipelines/coreclr/templates/superpmi-collect-job.yml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml index 8890893e62e259..78ebc0a8089df8 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml @@ -117,7 +117,6 @@ jobs: clean: all pool: ${{ parameters.pool }} - container: ${{ parameters.container }} steps: - ${{ parameters.steps }} diff --git a/eng/pipelines/coreclr/templates/superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/superpmi-collect-job.yml index dfc0a1e2949f1a..0f33e1d29b38be 100644 --- a/eng/pipelines/coreclr/templates/superpmi-collect-job.yml +++ b/eng/pipelines/coreclr/templates/superpmi-collect-job.yml @@ -3,6 +3,7 @@ parameters: archType: '' osGroup: '' osSubgroup: '' + container: '' liveLibrariesBuildConfig: '' crossBuild: '' variables: {} @@ -25,6 +26,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + container: ${{ parameters.container }} crossBuild: ${{ parameters.crossBuild }} liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} collectionType: ${{ parameters.collectionType }}