Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
364 changes: 364 additions & 0 deletions eng/pipelines/aspnetcore-perf-build-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,364 @@
# aspnetcore-perf-build-jobs.yml
#
# Authored build jobs for the ASP.NET Core perf-build pipeline (consumed by
# eng/pipelines/aspnetcore-perf-build.yml). These jobs are written from scratch
# here in dotnet/performance instead of reusing dotnet/aspnetcore's
# `.azure/pipelines/jobs/default-build.yml`, because that template has hard
# `@self` references (e.g. /eng/common/templates-official/job/job.yml@self) and
# `@self` always resolves to the ROOT pipeline repo (performance), which does not
# carry aspnetcore's eng/common layout/contract. So we stand up the build
# ourselves: pick the dnceng internal pool, check out the aspnetcore mirror at the
# triggering commit alongside this repo (for the staging script), run aspnetcore's
# own eng/build with lean perf args (PUBLIC feeds only -- no internal runtime
# download), stage each per-RID runtime-pack nupkg verbatim as the BCS artifact via
# the moved eng/pipelines/tools/stage-bcs-nupkg-aspnetcore.ps1, and publish one
# pipeline artifact per config.
#
# Job names (Windows_x64_build / Windows_x86_build / Windows_arm64_build /
# Linux_x64_build / Linux_arm64_build) are load-bearing:
# they must match the `dependencyJobName` values in
# eng/pipelines/upload-build-artifacts-jobs.yml's aspnetcore_* branches.
#
# PUBLIC-FEED rationale: aspnetcore's own ci-public.yml builds every public PR with
# `_InternalRuntimeDownloadArgs` empty, proving public feeds suffice for a from-
# source pack build. We therefore drop enable-internal-runtimes / get-delegation-sas
# / the dotnetbuilds-internal-read connection entirely and pass no
# -RuntimeSourceFeed args.

parameters:
aspnetcoreRepoAlias: aspnetcore
performanceRepoAlias: self
# Per-config enablement booleans (forward-compat with the MissingBuildsTrigger
# PerConfiguration indexer). In v1's eager per-commit CI-trigger mode all five
# are true and all configs build; the booleans let a future Function queue a
# subset per config.
aspnetcore_x64_linux: true
aspnetcore_arm64_linux: true
aspnetcore_x64_windows: true
aspnetcore_arm64_windows: true
aspnetcore_x86_windows: true

jobs:

# ===========================================================================
# Windows build jobs (one self-sufficient job per arch, mirroring the Linux
# jobs below). Each job is independently gated by its config boolean, checks out
# the aspnetcore mirror + this repo, runs aspnetcore's eng/build.cmd standalone
# for its arch, packs the per-RID archive, and publishes one artifact.
#
# Unlike aspnetcore ci-public.yml -- which builds x64/x86/arm64 sequentially in
# ONE job so x86/arm64 reuse the x64 step's managed build and on-machine native
# toolchain -- these jobs run on separate agents, so each must be self-sufficient:
# * every arch carries -all (full managed build) and -nativeToolsOnMachine
# (set up the native toolchain the shared x64 step used to provide);
# * x86/arm64 keep -noBuildNative (faithful to ci-public's per-arch args; their
# native runtime bits restore from packages rather than cross-building on the
# x64 host). The first real queued run validates standalone native restore.
#
# Job names (Windows_x64_build / Windows_x86_build / Windows_arm64_build) are
# load-bearing: they must match the `dependencyJobName` values in
# eng/pipelines/upload-build-artifacts-jobs.yml's aspnetcore_*_windows branches.
# ===========================================================================
- ${{ if eq(parameters.aspnetcore_x64_windows, true) }}:
- job: Windows_x64_build
displayName: 'Build: Windows x64 (perf-build)'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2026preview.scout.amd64
variables:
_AspNetCoreRoot: $(Agent.BuildDirectory)\s\aspnetcore
_StageNupkgScript: $(Agent.BuildDirectory)\s\performance\eng\pipelines\tools\stage-bcs-nupkg-aspnetcore.ps1
_ShippingDir: $(Agent.BuildDirectory)\s\aspnetcore\artifacts\packages\Release\Shipping
_StagingRoot: $(Build.ArtifactStagingDirectory)\bcs
MSBUILDUSESERVER: "1"
steps:
- checkout: ${{ parameters.aspnetcoreRepoAlias }}
path: s/aspnetcore
fetchDepth: 1
fetchTags: false
clean: true
- checkout: ${{ parameters.performanceRepoAlias }}
path: s/performance
fetchDepth: 1
fetchTags: false
clean: true

- script: >-
eng\build.cmd
-ci
-prepareMachine
-nativeToolsOnMachine
-Configuration Release
-arch x64
-pack
-all
-noBuildJava
/p:OnlyPackPlatformSpecificPackages=true
$(_BuildArgs)
/bl:artifacts/log/Release/Build.x64.binlog
workingDirectory: $(_AspNetCoreRoot)
displayName: Build x64
env:
MSBUILDUSESERVER: "1"

- pwsh: >-
Comment thread
DrewScoggins marked this conversation as resolved.
& "$(_StageNupkgScript)" -Rids win-x64 -ShippingDir "$(_ShippingDir)" -StagingRoot "$(_StagingRoot)"
displayName: 'Stage BCS nupkg (win-x64)'
- task: PublishPipelineArtifact@1
displayName: 'Publish BuildArtifacts_windows_x64_Release_aspnetcore'
inputs:
targetPath: $(_StagingRoot)\BuildArtifacts_windows_x64_Release_aspnetcore
artifactName: BuildArtifacts_windows_x64_Release_aspnetcore

- task: PublishPipelineArtifact@1
displayName: 'Publish Windows x64 build logs'
condition: always()
continueOnError: true
inputs:
targetPath: $(_AspNetCoreRoot)\artifacts\log
artifactName: Windows_x64_perf_build_Logs_Attempt_$(System.JobAttempt)

# ===========================================================================
# Windows x86 build job
# ===========================================================================
- ${{ if eq(parameters.aspnetcore_x86_windows, true) }}:
- job: Windows_x86_build
displayName: 'Build: Windows x86 (perf-build)'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2026preview.scout.amd64
variables:
_AspNetCoreRoot: $(Agent.BuildDirectory)\s\aspnetcore
_StageNupkgScript: $(Agent.BuildDirectory)\s\performance\eng\pipelines\tools\stage-bcs-nupkg-aspnetcore.ps1
_ShippingDir: $(Agent.BuildDirectory)\s\aspnetcore\artifacts\packages\Release\Shipping
_StagingRoot: $(Build.ArtifactStagingDirectory)\bcs
MSBUILDUSESERVER: "1"
steps:
- checkout: ${{ parameters.aspnetcoreRepoAlias }}
path: s/aspnetcore
fetchDepth: 1
fetchTags: false
clean: true
- checkout: ${{ parameters.performanceRepoAlias }}
path: s/performance
fetchDepth: 1
fetchTags: false
clean: true

- script: >-
eng\build.cmd
-ci
-prepareMachine
-nativeToolsOnMachine
-Configuration Release
-arch x86
-pack
-all
-noBuildJava
-noBuildNative
/p:OnlyPackPlatformSpecificPackages=true
$(_BuildArgs)
/bl:artifacts/log/Release/Build.x86.binlog
workingDirectory: $(_AspNetCoreRoot)
displayName: Build x86
env:
MSBUILDUSESERVER: "1"

- pwsh: >-
& "$(_StageNupkgScript)" -Rids win-x86 -ShippingDir "$(_ShippingDir)" -StagingRoot "$(_StagingRoot)"
displayName: 'Stage BCS nupkg (win-x86)'
- task: PublishPipelineArtifact@1
displayName: 'Publish BuildArtifacts_windows_x86_Release_aspnetcore'
inputs:
targetPath: $(_StagingRoot)\BuildArtifacts_windows_x86_Release_aspnetcore
artifactName: BuildArtifacts_windows_x86_Release_aspnetcore

- task: PublishPipelineArtifact@1
displayName: 'Publish Windows x86 build logs'
condition: always()
continueOnError: true
inputs:
targetPath: $(_AspNetCoreRoot)\artifacts\log
artifactName: Windows_x86_perf_build_Logs_Attempt_$(System.JobAttempt)

# ===========================================================================
# Windows arm64 build job
# ===========================================================================
- ${{ if eq(parameters.aspnetcore_arm64_windows, true) }}:
- job: Windows_arm64_build
displayName: 'Build: Windows ARM64 (perf-build)'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2026preview.scout.amd64
variables:
_AspNetCoreRoot: $(Agent.BuildDirectory)\s\aspnetcore
_StageNupkgScript: $(Agent.BuildDirectory)\s\performance\eng\pipelines\tools\stage-bcs-nupkg-aspnetcore.ps1
_ShippingDir: $(Agent.BuildDirectory)\s\aspnetcore\artifacts\packages\Release\Shipping
_StagingRoot: $(Build.ArtifactStagingDirectory)\bcs
MSBUILDUSESERVER: "1"
steps:
- checkout: ${{ parameters.aspnetcoreRepoAlias }}
path: s/aspnetcore
fetchDepth: 1
fetchTags: false
clean: true
- checkout: ${{ parameters.performanceRepoAlias }}
path: s/performance
fetchDepth: 1
fetchTags: false
clean: true

- script: >-
eng\build.cmd
-ci
-prepareMachine
-nativeToolsOnMachine
-Configuration Release
-arch arm64
-pack
-all
-noBuildJava
-noBuildNative
/p:OnlyPackPlatformSpecificPackages=true
$(_BuildArgs)
/bl:artifacts/log/Release/Build.arm64.binlog
workingDirectory: $(_AspNetCoreRoot)
displayName: Build ARM64
env:
MSBUILDUSESERVER: "1"

- pwsh: >-
& "$(_StageNupkgScript)" -Rids win-arm64 -ShippingDir "$(_ShippingDir)" -StagingRoot "$(_StagingRoot)"
displayName: 'Stage BCS nupkg (win-arm64)'
- task: PublishPipelineArtifact@1
displayName: 'Publish BuildArtifacts_windows_arm64_Release_aspnetcore'
inputs:
targetPath: $(_StagingRoot)\BuildArtifacts_windows_arm64_Release_aspnetcore
artifactName: BuildArtifacts_windows_arm64_Release_aspnetcore

- task: PublishPipelineArtifact@1
displayName: 'Publish Windows arm64 build logs'
condition: always()
continueOnError: true
inputs:
targetPath: $(_AspNetCoreRoot)\artifacts\log
artifactName: Windows_arm64_perf_build_Logs_Attempt_$(System.JobAttempt)

# ===========================================================================
# Linux x64 build job
# ===========================================================================
- ${{ if eq(parameters.aspnetcore_x64_linux, true) }}:
- job: Linux_x64_build
displayName: 'Build: Linux x64 (perf-build)'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204
variables:
_AspNetCoreRoot: $(Agent.BuildDirectory)/s/aspnetcore
_StageNupkgScript: $(Agent.BuildDirectory)/s/performance/eng/pipelines/tools/stage-bcs-nupkg-aspnetcore.ps1
_ShippingDir: $(Agent.BuildDirectory)/s/aspnetcore/artifacts/packages/Release/Shipping
_StagingRoot: $(Build.ArtifactStagingDirectory)/bcs
steps:
- checkout: ${{ parameters.aspnetcoreRepoAlias }}
path: s/aspnetcore
fetchDepth: 1
fetchTags: false
clean: true
- checkout: ${{ parameters.performanceRepoAlias }}
path: s/performance
fetchDepth: 1
fetchTags: false
clean: true

- script: >-
eng/build.sh
--ci
--configuration Release
--arch x64
--pack
--all
--no-build-java
-p:OnlyPackPlatformSpecificPackages=true
$(_BuildArgs)
/bl:artifacts/log/Release/Build.linux-x64.binlog
workingDirectory: $(_AspNetCoreRoot)
displayName: Build linux-x64

- pwsh: >-
& "$(_StageNupkgScript)" -Rids linux-x64 -ShippingDir "$(_ShippingDir)" -StagingRoot "$(_StagingRoot)"
displayName: 'Stage BCS nupkg (linux-x64)'
- task: PublishPipelineArtifact@1
displayName: 'Publish BuildArtifacts_linux_x64_Release_aspnetcore'
inputs:
targetPath: $(_StagingRoot)/BuildArtifacts_linux_x64_Release_aspnetcore
artifactName: BuildArtifacts_linux_x64_Release_aspnetcore

- task: PublishPipelineArtifact@1
displayName: 'Publish Linux x64 build logs'
condition: always()
continueOnError: true
inputs:
targetPath: $(_AspNetCoreRoot)/artifacts/log
artifactName: Linux_x64_perf_build_Logs_Attempt_$(System.JobAttempt)

# ===========================================================================
# Linux arm64 build job (cross-build from the x64 host)
# ===========================================================================
- ${{ if eq(parameters.aspnetcore_arm64_linux, true) }}:
- job: Linux_arm64_build
displayName: 'Build: Linux ARM64 (perf-build)'
timeoutInMinutes: 180
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204
variables:
_AspNetCoreRoot: $(Agent.BuildDirectory)/s/aspnetcore
_StageNupkgScript: $(Agent.BuildDirectory)/s/performance/eng/pipelines/tools/stage-bcs-nupkg-aspnetcore.ps1
_ShippingDir: $(Agent.BuildDirectory)/s/aspnetcore/artifacts/packages/Release/Shipping
_StagingRoot: $(Build.ArtifactStagingDirectory)/bcs
steps:
- checkout: ${{ parameters.aspnetcoreRepoAlias }}
path: s/aspnetcore
fetchDepth: 1
fetchTags: false
clean: true
- checkout: ${{ parameters.performanceRepoAlias }}
path: s/performance
fetchDepth: 1
fetchTags: false
clean: true

- script: >-
eng/build.sh
--ci
--configuration Release
--arch arm64
--pack
--all
--no-build-java
-p:OnlyPackPlatformSpecificPackages=true
$(_BuildArgs)
/bl:artifacts/log/Release/Build.linux-arm64.binlog
workingDirectory: $(_AspNetCoreRoot)
displayName: Build linux-arm64

- pwsh: >-
& "$(_StageNupkgScript)" -Rids linux-arm64 -ShippingDir "$(_ShippingDir)" -StagingRoot "$(_StagingRoot)"
displayName: 'Stage BCS nupkg (linux-arm64)'
- task: PublishPipelineArtifact@1
displayName: 'Publish BuildArtifacts_linux_arm64_Release_aspnetcore'
inputs:
targetPath: $(_StagingRoot)/BuildArtifacts_linux_arm64_Release_aspnetcore
artifactName: BuildArtifacts_linux_arm64_Release_aspnetcore

- task: PublishPipelineArtifact@1
displayName: 'Publish Linux arm64 build logs'
condition: always()
continueOnError: true
inputs:
targetPath: $(_AspNetCoreRoot)/artifacts/log
artifactName: Linux_arm64_perf_build_Logs_Attempt_$(System.JobAttempt)
Loading
Loading