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
4 changes: 2 additions & 2 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:

- template: /eng/common/${{ parameters.templatePath }}/steps/enable-internal-sources.yml

- ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}:
- ${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), not(in(parameters.hostedOs, 'linux', 'windows'))) }}:
- script: $(Build.SourcesDirectory)/eng/common/native/install-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies

Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
displayName: Disk Usage after Build
condition: always()

# If intended to send extra steps after regular build add them here.
# If intended to send extra steps after regular build add them here.
- ${{ if ne(parameters.postBuildSteps,'') }}:
- ${{ each postBuildStep in parameters.postBuildSteps }}:
- ${{ if ne(postBuildStep.template, '') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ jobs:
os: linux

# OSX Public Build Pool (we don't have on-prem OSX BuildPool).
${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), eq(variables['System.TeamProject'], 'public')) }}:
${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), not(in(parameters.jobParameters.hostedOs, 'linux', 'windows')), eq(variables['System.TeamProject'], 'public')) }}:
vmImage: 'macos-15'

# Official build OSX pool
${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), ne(variables['System.TeamProject'], 'public')) }}:
${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), not(in(parameters.jobParameters.hostedOs, 'linux', 'windows')), ne(variables['System.TeamProject'], 'public')) }}:
name: "Azure Pipelines"
vmImage: 'macos-latest-internal'
os: macOS
Expand Down
81 changes: 81 additions & 0 deletions eng/pipelines/installer/run-test-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
parameters:
buildConfig: ''
osGroup: ''
osSubgroup: ''
archType: ''
targetRid: ''
hostedOs: ''
timeoutInMinutes: 150
pool: ''
condition: true
shouldContinueOnError: false
variables: {}
dependsOn: []
dependsOnGlobalBuilds: []
helixQueues: []
buildArtifactName: ''
testArtifactName: ''
templatePath: 'templates'

jobs:
- template: /eng/common/${{ parameters.templatePath }}/job/job.yml
parameters:
enablePublishBuildArtifacts: true
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
condition: and(succeeded(), ${{ parameters.condition }})
helixRepo: dotnet/runtime
displayName: ${{ format('Installer Test {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.hostedOs, '') }}:
name: ${{ format('installer_test_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if ne(parameters.hostedOs, '') }}:
name: ${{ format('installer_test_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.hostedOs, parameters.buildConfig) }}

pool: ${{ parameters.pool }}

${{ if eq(parameters.osSubGroup, '_musl') }}:
disableComponentGovernance: true

dependsOn:
- ${{ each build in parameters.dependsOn }}:
- ${{ build }}
- ${{ each globalBuild in parameters.dependsOnGlobalBuilds }}:
- ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, coalesce(globalBuild.buildConfig, parameters.buildConfig), globalBuild.nameSuffix) }}

workspace:
clean: all

variables:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-HelixApi-Access
- group: AzureDevOps-Artifact-Feeds-Pats

- ${{ parameters.variables }}

steps:
- checkout: self
clean: true
fetchDepth: $(checkoutFetchDepth)
fetchTags: false

- template: /eng/common/${{ parameters.templatePath }}/steps/enable-internal-sources.yml

- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)/artifacts/bin
artifactFileName: '${{ parameters.buildArtifactName }}$(archiveExtension)'
artifactName: '${{ parameters.buildArtifactName }}'
displayName: 'unified artifacts'

- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)/artifacts/tests
artifactFileName: '${{ parameters.testArtifactName }}$(archiveExtension)'
artifactName: '${{ parameters.testArtifactName }}'
displayName: 'installer test artifacts'

- template: /eng/pipelines/installer/helix.yml
parameters:
osGroup: ${{ parameters.osGroup }}
archType: ${{ parameters.archType }}
helixQueues: ${{ parameters.helixQueues }}
creator: dotnet-bot
3 changes: 2 additions & 1 deletion eng/pipelines/libraries/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parameters:
interpreter: ''
timeoutInMinutes: 150
pool: ''
hostedOs: ''
runtimeVariant: ''
testScope: ''
helixQueues: []
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:

- template: /eng/common/${{ parameters.templatePath }}/steps/enable-internal-sources.yml

- ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}:
- ${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), not(in(parameters.hostedOs, 'linux', 'windows'))) }}:
- script: $(Build.SourcesDirectory)/eng/common/native/install-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies

Expand Down
116 changes: 79 additions & 37 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ extends:
- windows_x64
jobParameters:
nameSuffix: CoreCLR_Libraries
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we're building all subsets in these jobs, we should rename these jobs to AllSubsets_CoreCLR to be consistent with the other jobs where we build all subsets.

buildArgs: -s clr+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true
buildArgs: -s clr+libs+libs.tests+host+packs -rc Release -c $(_BuildConfig) -hc Release /p:ArchiveTests=true
timeoutInMinutes: 120
postBuildSteps:
- template: /eng/pipelines/common/upload-artifact-step.yml
Expand All @@ -270,6 +270,15 @@ extends:
archiveExtension: $(archiveExtension)
tarCompression: $(tarCompression)
artifactName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/artifacts/tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Not in this PR) At some point we should unify between artifacts/tests and artifacts/helix.

includeRootFolder: false
archiveType: $(archiveType)
archiveExtension: $(archiveExtension)
tarCompression: $(tarCompression)
artifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
displayName: Installer Test Assets
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
Expand All @@ -284,7 +293,7 @@ extends:
- windows_x86
jobParameters:
nameSuffix: CoreCLR_Libraries
buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
buildArgs: -s clr+libs+libs.tests+host+packs -c $(_BuildConfig) -hc $(debugOnPrReleaseOnRolling) /p:ArchiveTests=true
timeoutInMinutes: 120
postBuildSteps:
- template: /eng/pipelines/common/upload-artifact-step.yml
Expand All @@ -304,6 +313,15 @@ extends:
archiveExtension: $(archiveExtension)
tarCompression: $(tarCompression)
artifactName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/artifacts/tests
includeRootFolder: false
archiveType: $(archiveType)
archiveExtension: $(archiveExtension)
tarCompression: $(tarCompression)
artifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
displayName: Installer Test Assets
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
Expand All @@ -322,7 +340,7 @@ extends:
- osx_x64
jobParameters:
nameSuffix: CoreCLR_Libraries
buildArgs: -s clr+libs -c $(_BuildConfig)
buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) -hc $(debugOnPrReleaseOnRolling)
timeoutInMinutes: 120
postBuildSteps:
- template: /eng/pipelines/common/upload-artifact-step.yml
Expand All @@ -334,6 +352,15 @@ extends:
tarCompression: $(tarCompression)
artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
displayName: Build Assets
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/artifacts/tests
includeRootFolder: false
archiveType: $(archiveType)
archiveExtension: $(archiveExtension)
tarCompression: $(tarCompression)
artifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
displayName: Installer Test Assets
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
Expand Down Expand Up @@ -1449,69 +1476,83 @@ extends:
eq(variables['isRollingBuild'], true))

#
# Installer Build and Test
# These are always built since they only take like 15 minutes
# we expect these to be done before we finish libraries or coreclr testing.
# Installer Test
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
jobTemplate: /eng/pipelines/installer/run-test-job.yml
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
platforms:
- windows_x86
helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml
jobParameters:
dependsOnGlobalBuilds:
- nameSuffix: CoreCLR_Libraries
buildConfig: release
buildArtifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release
testArtifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release
timeoutInMinutes: 150
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/installer/run-test-job.yml
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
platforms:
- osx_x64
helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml
jobParameters:
nameSuffix: Installer_Build_And_Test
buildArgs: -s host+packs -c $(_BuildConfig) -lc Release -rc Release
hostedOs: linux
Comment on lines 1505 to +1508
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting hostedOs: linux for an osGroup: osx job currently causes conflicting pool definitions in eng/pipelines/common/xplat-setup.yml: the Linux pool block triggers when hostedOs == 'linux' (xplat-setup.yml:168-176) while the macOS vmImage block still triggers based on osGroup alone (xplat-setup.yml:178-186). This will emit both name/demands and vmImage under pool, which Azure Pipelines rejects. To actually move this job to Linux runners, update xplat-setup.yml to gate the macOS pool blocks on hostedOs (or pass an explicit pool: override here instead of hostedOs).

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hostedOs: linux parameter is used here with osx_x64 and osx_arm64 platforms (similarly at lines 1607 and 1998), but eng/pipelines/common/xplat-setup.yml does not guard the macOS pool selection conditions against a hostedOs override. Specifically, lines 179–186 of xplat-setup.yml emit a macOS pool entry whenever osGroup is osx (or other Apple platforms), with no check for hostedOs. Lines 168–176 of that same file correctly check for hostedOs == 'linux' for the Linux pool. When both conditions fire simultaneously, the resulting pool: object contains both name/demands (Linux) and vmImage/os (macOS) fields, which is an invalid Azure Pipelines pool configuration and will likely cause a pipeline failure or still route the agent to a macOS host — defeating the PR's intent. The macOS pool conditions in xplat-setup.yml need to add not(eq(parameters.jobParameters.hostedOs, 'linux')) guards before this configuration can work correctly.

Suggested change
hostedOs: linux

Copilot uses AI. Check for mistakes.
dependsOnGlobalBuilds:
- nameSuffix: CoreCLR_Libraries
buildConfig: release
preBuildSteps:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release
artifactFileName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release$(archiveExtension)
unpackFolder: $(Build.SourcesDirectory)/artifacts/bin
displayName: 'unified artifacts'
buildArtifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release
testArtifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release
timeoutInMinutes: 150
postBuildSteps:
- template: /eng/pipelines/installer/helix.yml
parameters:
creator: dotnet-bot
condition:
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
jobTemplate: /eng/pipelines/installer/run-test-job.yml
buildConfig: release
platforms:
- windows_x64
- osx_arm64
- linux_x64
helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml
jobParameters:
nameSuffix: Installer_Build_And_Test
buildArgs: -s host+packs -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }} -rc Release
dependsOnGlobalBuilds:
- nameSuffix: CoreCLR_Libraries
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
preBuildSteps:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)
artifactFileName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)$(archiveExtension)
unpackFolder: $(Build.SourcesDirectory)/artifacts/bin
displayName: 'unified artifacts'
buildArtifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)
testArtifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)
timeoutInMinutes: 150
postBuildSteps:
- template: /eng/pipelines/installer/helix.yml
parameters:
creator: dotnet-bot
condition:
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/installer/run-test-job.yml
buildConfig: release
platforms:
- osx_arm64
helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml
jobParameters:
hostedOs: linux
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hostedOs: linux is used for an osx Helix submission job, but the current pool selection logic in eng/pipelines/common/xplat-setup.yml will still also select the macOS pool based on osGroup: osx (in addition to the Linux pool selected by hostedOs). This results in an invalid pool object (both vmImage and name/demands). Adjust xplat-setup.yml to make hostedOs override mutually exclusive with osGroup-based macOS pool selection, or set pool: explicitly for this job.

Suggested change
hostedOs: linux

Copilot uses AI. Check for mistakes.
dependsOnGlobalBuilds:
- nameSuffix: CoreCLR_Libraries
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
buildArtifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)
testArtifactName: Installer_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)
timeoutInMinutes: 150
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))
Expand Down Expand Up @@ -1880,6 +1921,7 @@ extends:
jobParameters:
testScope: innerloop
liveRuntimeBuildConfig: checked
hostedOs: linux
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hostedOs: linux is intended to move this osx test-submission job to Linux agents, but eng/pipelines/common/xplat-setup.yml currently selects a macOS pool whenever osGroup is osx regardless of hostedOs. With hostedOs=linux, both the Linux and macOS pool blocks match, producing an invalid pool definition. Update xplat-setup.yml to honor hostedOs as an override (or pass an explicit Linux pool here).

Suggested change
hostedOs: linux

Copilot uses AI. Check for mistakes.
unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
helixArtifactsName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
unifiedBuildNameSuffix: Libraries_CheckedCoreCLR
Expand Down
Loading