From 1a217bd3d965e60c82d19114fe2c50b4f1b1a7ac Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 11 Feb 2021 09:20:56 -0800 Subject: [PATCH 01/27] Pass along PGO type and use it in artifacts names --- eng/pipelines/coreclr/templates/build-job.yml | 1 + eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 2 +- eng/pipelines/mono/templates/build-job.yml | 1 + src/coreclr/tools/aot/crossgen2/crossgen2.csproj | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 2991c732d8ff41..3f967c2b51b8bd 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -38,6 +38,7 @@ jobs: pool: ${{ parameters.pool }} condition: ${{ parameters.condition }} dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} + pgoType: ${{ parameters.pgoType }} # Compute job name from template parameters ${{ if and(ne(parameters.testGroup, 'clrTools'), eq(parameters.compilerName, 'gcc')) }}: diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 49f29dfec6e437..ac4de5d163f4bf 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -113,7 +113,7 @@ jobs: value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)' - name: nativeTestArtifactName - value: 'CoreCLRNativeTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRNativeTestArtifacts$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: nativeTestArtifactRootFolderPath value: '$(binTestsPath)/obj/$(osGroup).$(archType).$(buildConfigUpper)' diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index 62029d89d6fc6d..07af7f490ebbfd 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -16,6 +16,7 @@ parameters: dependsOn: [] monoCrossAOTTargetOS: [] dependOnEvaluatePaths: false + pgoType: '' ### Product build jobs: diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj index 5762055c2d573e..87e123adb1d347 100644 --- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj +++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj @@ -95,6 +95,7 @@ CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Link="%(FileName)%(Extension)" + Condition="'$(PgoInstrument)' != ''" /> From 96746dd12c3223d8832b186aca0ce2a24e321ddb Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 11 Feb 2021 13:44:03 -0800 Subject: [PATCH 02/27] Add PGO to artifact names --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index ac4de5d163f4bf..53a8f4428880ea 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -66,7 +66,7 @@ jobs: # Build product defines what we are trying to build, either coreclr or mono - name: buildProductArtifactName - value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRProduct$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: buildProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' @@ -98,13 +98,13 @@ jobs: # We need this because both mono and coreclr build currently depends on CoreClr - name: coreClrProductArtifactName - value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRProduct$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)$(pgoType)' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' - name: corelibProductArtifactName - value: 'CoreLib_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreLib$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: managedGenericTestArtifactName value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' From 44a68a425bf9525f7d8ae4a7a92304d8e0b7ba0e Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 11 Feb 2021 15:05:15 -0800 Subject: [PATCH 03/27] Add parameter to template --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 53a8f4428880ea..d33192af7ec510 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -13,6 +13,7 @@ parameters: stagedBuild: false strategy: '' pool: '' + pgoType: '' # arcade-specific parameters condition: true From 6f0874a000e558a8563f6dacc3747e41a6a170d6 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 11 Feb 2021 16:49:24 -0800 Subject: [PATCH 04/27] Add to template parameters --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index d33192af7ec510..56a96c91d158b9 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -42,6 +42,7 @@ jobs: stagedBuild: ${{ parameters.stagedBuild }} strategy: ${{ parameters.strategy }} pool: ${{ parameters.pool }} + pgoType: ${{ parameters.pgoType }} # arcade-specific parameters condition: and(succeeded(), ${{ parameters.condition }}) From 9c9d822fd7350e699e8ef99099af83aaec9a5184 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 11 Feb 2021 21:47:47 -0800 Subject: [PATCH 05/27] Add underscore --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 56a96c91d158b9..c8dc2aa2ba4fda 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -68,7 +68,7 @@ jobs: # Build product defines what we are trying to build, either coreclr or mono - name: buildProductArtifactName - value: 'CoreCLRProduct$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRProduct_$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: buildProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' @@ -100,13 +100,13 @@ jobs: # We need this because both mono and coreclr build currently depends on CoreClr - name: coreClrProductArtifactName - value: 'CoreCLRProduct$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)$(pgoType)' + value: 'CoreCLRProduct_$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)$(pgoType)' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' - name: corelibProductArtifactName - value: 'CoreLib$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreLib_$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: managedGenericTestArtifactName value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' @@ -115,7 +115,7 @@ jobs: value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)' - name: nativeTestArtifactName - value: 'CoreCLRNativeTestArtifacts$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRNativeTestArtifacts_$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: nativeTestArtifactRootFolderPath value: '$(binTestsPath)/obj/$(osGroup).$(archType).$(buildConfigUpper)' From ee2725d8aabb6f19ac07e0b5695bb454ee345e6c Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Fri, 12 Feb 2021 11:01:45 -0800 Subject: [PATCH 06/27] Use parameter syntax --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index c8dc2aa2ba4fda..9d6acef5610088 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -68,7 +68,7 @@ jobs: # Build product defines what we are trying to build, either coreclr or mono - name: buildProductArtifactName - value: 'CoreCLRProduct_$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: buildProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' @@ -100,13 +100,13 @@ jobs: # We need this because both mono and coreclr build currently depends on CoreClr - name: coreClrProductArtifactName - value: 'CoreCLRProduct_$(pgoType)_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)$(pgoType)' + value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)$(pgoType)' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' - name: corelibProductArtifactName - value: 'CoreLib_$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreLib_${{ parameters.pgoType }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: managedGenericTestArtifactName value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' @@ -115,7 +115,7 @@ jobs: value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)' - name: nativeTestArtifactName - value: 'CoreCLRNativeTestArtifacts_$(pgoType)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRNativeTestArtifacts_${{ parameters.pgoType }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: nativeTestArtifactRootFolderPath value: '$(binTestsPath)/obj/$(osGroup).$(archType).$(buildConfigUpper)' From ae3e4a4f7fe06928ed1deff4dc30290966e0a9cf Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Fri, 12 Feb 2021 12:05:16 -0800 Subject: [PATCH 07/27] Change intstaller dependency type --- eng/pipelines/installer/jobs/base-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml index 27691955ce3ccb..14239f32fe34da 100644 --- a/eng/pipelines/installer/jobs/base-job.yml +++ b/eng/pipelines/installer/jobs/base-job.yml @@ -287,7 +287,7 @@ jobs: /p:RuntimeArtifactsPath=$(buildCommandSourcesDirectory)$(RuntimeDownloadPath) /p:RuntimeConfiguration=${{ parameters.liveRuntimeBuildConfig }} - name: RuntimeArtifactName - value: $(runtimeFlavorName)Product_${{ parameters.runtimeVariant }}_$(liveRuntimeLegName) + value: $(runtimeFlavorName)Product_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(liveRuntimeLegName) - ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}: - name: liveLibrariesLegName From 0c2ddbde9832058fa27a866fee56edcc954d07c6 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 11:33:42 -0800 Subject: [PATCH 08/27] typo --- eng/pipelines/common/templates/runtimes/build-test-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 65194f18287143..14d17b0849b5bf 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -24,7 +24,7 @@ parameters: runtimeVariant: '' dependsOn: [] dependOnEvaluatePaths: false - pgoInstrument: false + pgoType: '' ### Build managed test components (native components are getting built as part ### of the the product build job). From 948dbcebe45b11fa72efeb73e16ee67022d150d2 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 11:39:43 -0800 Subject: [PATCH 09/27] Add pgoType to libraries definition --- eng/pipelines/libraries/base-job.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml index 4307af1bc54452..bea30446deed64 100644 --- a/eng/pipelines/libraries/base-job.yml +++ b/eng/pipelines/libraries/base-job.yml @@ -23,6 +23,7 @@ parameters: testScope: '' pool: '' runTests: false + pgoType: '' jobs: - template: /eng/common/templates/job/job.yml @@ -96,7 +97,7 @@ jobs: - _runtimeDownloadPath: '$(Build.SourcesDirectory)/artifacts/transport/${{ parameters.runtimeFlavor }}' - _runtimeConfigurationArg: -rc ${{ parameters.liveRuntimeBuildConfig }} - ${{ if eq(parameters.runTests, true) }}: - - _runtimeArtifactName: '$(runtimeFlavorName)Product_${{ parameters.runtimeVariant}}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.liveRuntimeBuildConfig }}' + - _runtimeArtifactName: '$(runtimeFlavorName)Product_${{ parameters.pgoType }}_${{ parameters.runtimeVariant}}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.liveRuntimeBuildConfig }}' - _runtimeArtifactsPathArg: ' /p:RuntimeArtifactsPath=$(_runtimeDownloadPath)' - ${{ if eq(parameters.testDisplayName, '') }}: - _testRunNamePrefixSuffix: $(runtimeFlavorName)_${{ parameters.liveRuntimeBuildConfig }} From dabdc7f147a7904b69363540ae059cb36ddaab76 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 12:40:28 -0800 Subject: [PATCH 10/27] Remove suffix --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 9d6acef5610088..38f28154604587 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -100,7 +100,7 @@ jobs: # We need this because both mono and coreclr build currently depends on CoreClr - name: coreClrProductArtifactName - value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)$(pgoType)' + value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' From 65587f3b314724884ddfa6552a3a1f32b620b87b Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 13:43:57 -0800 Subject: [PATCH 11/27] Fix mono dependency --- eng/pipelines/mono/templates/xplat-pipeline-job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/mono/templates/xplat-pipeline-job.yml b/eng/pipelines/mono/templates/xplat-pipeline-job.yml index 3151f703a4d84a..d3e58bcfe41e72 100644 --- a/eng/pipelines/mono/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/mono/templates/xplat-pipeline-job.yml @@ -50,13 +50,13 @@ jobs: variables: - name: coreClrProductArtifactName - value: 'CoreCLRProduct__$(osGroup)$(osSubgroup)_$(archType)_${{ parameters.liveRuntimeBuildConfig }}' + value: 'CoreCLRProduct___$(osGroup)$(osSubgroup)_$(archType)_${{ parameters.liveRuntimeBuildConfig }}' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(liveRuntimeBuildConfigUpper)' - name: buildProductArtifactName - value: 'MonoProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'MonoProduct__${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: binTestsPath value: '$(Build.SourcesDirectory)/artifacts/tests/coreclr' From 72ce20bd6c29f4247bd30e50a7c75ec87e4b62b0 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 14:09:20 -0800 Subject: [PATCH 12/27] Remove set of pgoType --- eng/pipelines/coreclr/templates/build-job.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 3f967c2b51b8bd..963eb58aec9a58 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -20,7 +20,6 @@ parameters: testGroup: '' timeoutInMinutes: '' variables: {} - pgoType: '' ### Product build jobs: From d54c60f3be675e947080b8f7aabfecd95274a074 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 15:56:14 -0800 Subject: [PATCH 13/27] Remove pgoType from native test artifacts --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 38f28154604587..ad3754e18b1df0 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -115,7 +115,7 @@ jobs: value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)' - name: nativeTestArtifactName - value: 'CoreCLRNativeTestArtifacts_${{ parameters.pgoType }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRNativeTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: nativeTestArtifactRootFolderPath value: '$(binTestsPath)/obj/$(osGroup).$(archType).$(buildConfigUpper)' From 899170983b61cd403d9270519fd2dc541e35839c Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 23:24:41 -0800 Subject: [PATCH 14/27] Remove default job parameter --- eng/pipelines/coreclr/templates/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 963eb58aec9a58..2991c732d8ff41 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -20,6 +20,7 @@ parameters: testGroup: '' timeoutInMinutes: '' variables: {} + pgoType: '' ### Product build jobs: @@ -37,7 +38,6 @@ jobs: pool: ${{ parameters.pool }} condition: ${{ parameters.condition }} dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} - pgoType: ${{ parameters.pgoType }} # Compute job name from template parameters ${{ if and(ne(parameters.testGroup, 'clrTools'), eq(parameters.compilerName, 'gcc')) }}: From 646b021e5f9c606beec06b5f1a7802dee3679c9b Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 23:27:51 -0800 Subject: [PATCH 15/27] remove pgotype default --- eng/pipelines/coreclr/templates/xplat-pipeline-job.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index ad3754e18b1df0..e3200502b7060d 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -13,7 +13,6 @@ parameters: stagedBuild: false strategy: '' pool: '' - pgoType: '' # arcade-specific parameters condition: true From 7d83f7ff4234e113e29f91764a20380ad5f97232 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 13 Feb 2021 23:28:54 -0800 Subject: [PATCH 16/27] Re-enable PGO builds --- eng/pipelines/runtime.yml | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 884874a83bcd91..9b48aa50004999 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -151,15 +151,15 @@ jobs: # # Build PGO CoreCLR release # -#- template: /eng/pipelines/common/platform-matrix.yml -# parameters: -# jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml -# buildConfig: release -# platforms: -# - windows_x64 -# jobParameters: -# testGroup: innerloop -# pgoType: 'PGO' +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: release + platforms: + - windows_x64 + jobParameters: + testGroup: innerloop + pgoType: 'PGO' # # Build CoreCLR Formatting Job @@ -698,19 +698,19 @@ jobs: liveRuntimeBuildConfig: release liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - # - # PGO Build - # -#- template: /eng/pipelines/installer/installer-matrix.yml -# parameters: -# buildConfig: Release -# jobParameters: -# isOfficialBuild: ${{ variables.isOfficialBuild }} -# liveRuntimeBuildConfig: release -# liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} -# pgoType: 'PGO' -# platforms: -# - windows_x64 +# +# PGO Build +# +- template: /eng/pipelines/installer/installer-matrix.yml + parameters: + buildConfig: Release + jobParameters: + isOfficialBuild: ${{ variables.isOfficialBuild }} + liveRuntimeBuildConfig: release + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + pgoType: 'PGO' + platforms: + - windows_x64 # # Crossgen-comparison jobs From d4b488abe57cd85e99f10c1b6fd769d910c6aa53 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sun, 14 Feb 2021 00:10:07 -0800 Subject: [PATCH 17/27] Don't publish native test artifacts for PGO runs --- eng/pipelines/coreclr/templates/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 2991c732d8ff41..345983a55601e9 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -281,7 +281,7 @@ jobs: - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools')) }}: # Publish test native components for consumption by test execution. - - ${{ if ne(parameters.isOfficialBuild, true) }}: + - ${{ if and(ne(parameters.isOfficialBuild, true), eq(parameters.pgoType, '')) }}: - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: $(nativeTestArtifactRootFolderPath) From 28eafa7e7fddc800cf9567086625a86c45e3342f Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sun, 14 Feb 2021 23:36:24 -0800 Subject: [PATCH 18/27] Pass down pgoType param --- eng/pipelines/coreclr/templates/build-job.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 345983a55601e9..154b0773295980 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -38,6 +38,7 @@ jobs: pool: ${{ parameters.pool }} condition: ${{ parameters.condition }} dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} + pgoType: ${{ parameters.pgoType }} # Compute job name from template parameters ${{ if and(ne(parameters.testGroup, 'clrTools'), eq(parameters.compilerName, 'gcc')) }}: @@ -322,6 +323,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '$(publishLogsArtifactPrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + artifactName: '$(publishLogsArtifactPrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)${{ parameters.pgoType }}' continueOnError: true condition: always() From 9da03dcc5183eaa1931261eb4e7c56aa3e64ac0a Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Mon, 15 Feb 2021 01:13:08 -0800 Subject: [PATCH 19/27] Add pgoType to installer publish logs --- eng/pipelines/installer/jobs/base-job.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml index 14239f32fe34da..5941160fbdb324 100644 --- a/eng/pipelines/installer/jobs/base-job.yml +++ b/eng/pipelines/installer/jobs/base-job.yml @@ -471,6 +471,7 @@ jobs: runtimeVariant: ${{ parameters.runtimeVariant }} skipTests: $(SkipTests) isOfficialBuild: ${{ eq(parameters.isOfficialBuild, true) }} + pgoType: ${{ parameters.pgoType }} - ${{ if ne(parameters.osGroup, 'windows') }}: - script: set -x && df -h From e3414c6a85116c9374958ac45e7d96bfc18ba9aa Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Mon, 15 Feb 2021 12:43:42 -0800 Subject: [PATCH 20/27] Add to xplat-setup --- eng/pipelines/common/xplat-setup.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index a9ed9dbf41715a..174ae53f0076d8 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -17,16 +17,18 @@ jobs: runtimeFlavorDisplayName: 'CoreCLR' ${{ if eq(parameters.jobParameters.runtimeFlavor, 'mono') }}: runtimeFlavorDisplayName: 'Mono' - + shouldContinueOnError: ${{ and(endsWith(variables['Build.DefinitionName'], 'staging'), eq(variables['Build.Reason'], 'PullRequest')) }} # keep in sync with /eng/pipelines/common/variables.yml dependOnEvaluatePaths: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging')) }} + pgoType: ${{ parameters.jobParameters.pgoType }} + variables: # Disable component governance in our CI builds. These builds are not shipping nor # are they a service. Also the component governance jobs issue lots of inconsequential - # warnings and errors into our build timelines that make it hard to track down + # warnings and errors into our build timelines that make it hard to track down # real errors in the build - name: skipComponentGovernanceDetection value: true @@ -90,7 +92,7 @@ jobs: value: Mono ${{ if eq(parameters.jobParameters.runtimeFlavor, 'coreclr') }}: value: CoreCLR - + - ${{ each variable in parameters.variables }}: - ${{ variable }} From 17d3774e3cd0ce917c2f498642aac74be844714c Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Mon, 15 Feb 2021 12:54:02 -0800 Subject: [PATCH 21/27] Fix --- eng/pipelines/common/xplat-setup.yml | 2 -- eng/pipelines/coreclr/templates/build-job.yml | 2 +- eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 174ae53f0076d8..5245e0314a82ba 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -23,8 +23,6 @@ jobs: # keep in sync with /eng/pipelines/common/variables.yml dependOnEvaluatePaths: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging')) }} - pgoType: ${{ parameters.jobParameters.pgoType }} - variables: # Disable component governance in our CI builds. These builds are not shipping nor # are they a service. Also the component governance jobs issue lots of inconsequential diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 154b0773295980..349cdfd0bb2155 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -323,6 +323,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '$(publishLogsArtifactPrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)${{ parameters.pgoType }}' + artifactName: '$(publishLogsArtifactPrefix)${{ parameters.pgoType }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' continueOnError: true condition: always() diff --git a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml index 30032b7da22eee..b45ff4cedc0523 100644 --- a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml +++ b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml @@ -3,6 +3,7 @@ parameters: runtimeFlavor: 'coreclr' runtimeVariant: '' isOfficialBuild: false + pgoType: '' steps: # Upload build artifacts (packages) to pipeline only if official, to save storage space. @@ -38,6 +39,6 @@ steps: displayName: Publish BuildLogs inputs: targetPath: '$(Build.StagingDirectory)/BuildLogs' - artifactName: Installer-Logs-${{ parameters.runtimeFlavor }}-${{ parameters.runtimeVariant }}-${{ parameters.name }}-$(_BuildConfig) + artifactName: Installer-Logs-${{parameters.pgoType }}${{ parameters.runtimeFlavor }}-${{ parameters.runtimeVariant }}-${{ parameters.name }}-$(_BuildConfig) continueOnError: true condition: succeededOrFailed() From 9dd7fc6bf7689c20cc8e91487279032ec315d4bf Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Mon, 22 Feb 2021 13:08:02 -0800 Subject: [PATCH 22/27] Also re-enable in official builds --- eng/pipelines/runtime-official.yml | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index d190ffb14a708b..c6bb84e6a4f1fe 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -326,32 +326,32 @@ stages: - windows_arm - windows_arm64 -# # -# # Build PGO CoreCLR release -# # -# - template: /eng/pipelines/common/platform-matrix.yml -# parameters: -# jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml -# buildConfig: release -# platforms: -# - windows_x64 -# jobParameters: -# testGroup: innerloop -# pgoType: 'PGO' # -# # -# # PGO Build -# # -# - template: /eng/pipelines/installer/installer-matrix.yml -# parameters: -# buildConfig: Release -# jobParameters: -# isOfficialBuild: ${{ variables.isOfficialBuild }} -# liveRuntimeBuildConfig: release -# liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} -# pgoType: 'PGO' -# platforms: -# - windows_x64 +# Build PGO CoreCLR release +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml + buildConfig: release + platforms: + - windows_x64 + jobParameters: + testGroup: innerloop + pgoType: 'PGO' + +# +# PGO Build +# +- template: /eng/pipelines/installer/installer-matrix.yml + parameters: + buildConfig: Release + jobParameters: + isOfficialBuild: ${{ variables.isOfficialBuild }} + liveRuntimeBuildConfig: release + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + pgoType: 'PGO' + platforms: + - windows_x64 - ${{ if eq(variables.isOfficialBuild, true) }}: - template: /eng/pipelines/official/stages/publish.yml From 606deb9d2d7bc315fb0d35d0a73e5bfa804845dd Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Wed, 24 Feb 2021 17:33:40 -0800 Subject: [PATCH 23/27] Also add suffix to archives --- src/installer/Directory.Build.targets | 4 ++++ .../Microsoft.NETCore.DotNetHostResolver.pkgproj | 1 + .../pkg/sfx/bundle/Microsoft.NETCore.App.Bundle.bundleproj | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/installer/Directory.Build.targets b/src/installer/Directory.Build.targets index dc2e7c7eed40c4..5696bd032fb0cb 100644 --- a/src/installer/Directory.Build.targets +++ b/src/installer/Directory.Build.targets @@ -1,5 +1,9 @@ + + $(ArchiveName)-pgo + +