Skip to content

Commit

Permalink
Revert "Merge CoreCLR-based official builds legs into one leg per pla…
Browse files Browse the repository at this point in the history
…tform (#92901)"

This reverts commit 1bfcdab.
  • Loading branch information
eduardo-vp committed May 2, 2024
1 parent 1bfcdab commit 0bb5e06
Show file tree
Hide file tree
Showing 14 changed files with 321 additions and 317 deletions.
9 changes: 4 additions & 5 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,10 @@ jobs:
- task: CodeQL3000Init@0
displayName: Initialize CodeQL (manually-injected)

- template: /eng/pipelines/common/templates/global-build-step.yml
parameters:
buildArgs: ${{ parameters.buildArgs }}
useContinueOnErrorDuringBuild: ${{ parameters.useContinueOnErrorDuringBuild }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci $(_archParameter) $(_osParameter) $(crossArg) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter)
displayName: Build product
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
continueOnError: ${{ parameters.shouldContinueOnError }}

- ${{ if eq(parameters.isManualCodeQLBuild, true) }}:
- task: CodeQL3000Finalize@0
Expand Down
12 changes: 0 additions & 12 deletions eng/pipelines/common/templates/global-build-step.yml

This file was deleted.

9 changes: 9 additions & 0 deletions eng/pipelines/common/templates/runtimes/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ jobs:
- name: buildConfig
value: ${{ parameters.buildConfig }}

- name: archType
value: ${{ parameters.archType }}

- name: osGroup
value: ${{ parameters.osGroup }}

- name: osSubgroup
value: ${{ parameters.osSubgroup }}

- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: official/dotnet/runtime/$(Build.SourceBranch)
Expand Down
9 changes: 0 additions & 9 deletions eng/pipelines/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ jobs:

- name: _BuildConfig
value: $(buildConfigUpper)

- name: archType
value: ${{ parameters.archType }}

- name: osGroup
value: ${{ parameters.osGroup }}

- name: osSubgroup
value: ${{ parameters.osSubgroup }}

- name: _runSmokeTestsOnlyArg
value: '/p:RunSmokeTestsOnly=$(isRunSmokeTestsOnly)'
Expand Down
21 changes: 21 additions & 0 deletions eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,27 @@ jobs:
artifactName: $(buildProductArtifactName)
displayName: 'product build'

- ${{ if and(in(parameters.osGroup, 'windows', 'linux'), ne(parameters.archType, 'x86')) }}:
- template: /eng/pipelines/coreclr/templates/crossdac-build.yml
parameters:
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
isOfficialBuild: ${{ parameters.signBinaries }}
${{ if eq(parameters.archType, 'arm') }}:
hostArchType: x86
${{ else }}:
hostArchType: x64

- ${{ if and(in(parameters.osGroup, 'windows'), eq(parameters.archType, 'x86')) }}:
- template: /eng/pipelines/coreclr/templates/crossdac-build.yml
parameters:
archType: arm
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
isOfficialBuild: ${{ parameters.signBinaries }}
hostArchType: x86

- ${{ if and(ne(parameters.testGroup, ''), ne(parameters.disableClrTest, true)) }}:
# Publish test native components for consumption by test execution.
- ${{ if ne(parameters.isOfficialBuild, true) }}:
Expand Down
80 changes: 80 additions & 0 deletions eng/pipelines/coreclr/templates/crossdac-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
parameters:
archType: ''
isOfficialBuild: false
osGroup: ''
osSubgroup: ''
hostArchType: ''

steps:
# Always build the crossdac, that way we know in CI/PR if things break to build.
- ${{ if and(eq(parameters.osGroup, 'windows'), notin(parameters.archType, 'x86')) }}:
- script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) ${{ parameters.archType }} -hostarch ${{ parameters.hostArchType }} -ci -os linux -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" -ninja $(officialBuildIdArg) -component crosscomponents
displayName: Build Cross OS Linux DAC for Windows

- script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) ${{ parameters.archType }} -hostarch ${{ parameters.hostArchType }} -ci -os alpine -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" -ninja $(officialBuildIdArg) -component crosscomponents
displayName: Build Cross OS Linux-musl DAC for Windows

- powershell: |
function CopyAndVerifyCrossOsAssets {
[CmdletBinding()]
param (
[Parameter(Mandatory)][string]$crossDacDir,
[Parameter(Mandatory)][string]$targetDir
)
$crossDacDir = Join-Path $crossDacDir -ChildPath '${{ parameters.hostArchType }}'
$availableFiles = ls -File $crossDacDir
Write-Host "Probed for files in ""$crossDacDir"", found:"
$availableFiles | fl
if (-not ("mscordaccore.dll" -in $availableFiles.Name `
-and "mscordaccore.pdb" -in $availableFiles.Name `
-and "mscordbi.dll" -in $availableFiles.Name `
-and "mscordbi.pdb" -in $availableFiles.Name`
))
{
Write-Error "Couldn't find one of the expected crossdac files."
}
New-Item $targetDir -ItemType 'Directory' -Force -ea 0
$availableFiles | %{ cp $_.FullName $targetDir -v }
}
$buildMuslDacRootFolderPath = "$(Build.SourcesDirectory)/artifacts/bin/coreclr/alpine.${{ parameters.archType }}.$(buildConfigUpper)"
$buildMuslStagingPath = "$(crossDacArtifactPath)/Linux_musl.${{ parameters.archType }}.$(buildConfigUpper)/${{ parameters.hostArchType }}"
$buildLinuxDacRootFolderPath = "$(Build.SourcesDirectory)/artifacts/bin/coreclr/Linux.${{ parameters.archType }}.$(buildConfigUpper)"
$buildLinuxDacStagingPath = "$(crossDacArtifactPath)/Linux.${{ parameters.archType }}.$(buildConfigUpper)/${{ parameters.hostArchType }}"
CopyAndVerifyCrossOsAssets -CrossDacDir $buildMuslDacRootFolderPath -TargetDir $buildMuslStagingPath
CopyAndVerifyCrossOsAssets -CrossDacDir $buildLinuxDacRootFolderPath -TargetDir $buildLinuxDacStagingPath
Write-Host "Final directory contents:"
ls -R $(crossDacArtifactPath)
displayName: Gather CrossDac Artifacts
- template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml
parameters:
basePath: $(crossDacArtifactPath)
isOfficialBuild: ${{ parameters.isOfficialBuild }}
timeoutInMinutes: 30

- ${{ if eq(parameters.osGroup, 'linux') }}:
- task: CopyFiles@2
displayName: Gather runtime for CrossDac
inputs:
SourceFolder: $(coreClrProductRootFolderPath)
Contents: libcoreclr.so
TargetFolder: '$(crossDacArtifactPath)/${{ parameters.osGroup }}${{ parameters.osSubgroup }}.$(archType).$(buildConfigUpper)/${{ parameters.hostArchType }}'

# Make the assets available in a single container for the packaging job.
- task: PublishBuildArtifacts@1
displayName: Publish runtime for CrossDac
inputs:
pathtoPublish: $(crossDacArtifactPath)
PublishLocation: Container
artifactName: $(buildCrossDacArtifactName)
9 changes: 0 additions & 9 deletions eng/pipelines/coreclr/templates/crossdac-hostarch.yml

This file was deleted.

75 changes: 75 additions & 0 deletions eng/pipelines/coreclr/templates/crossdac-pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
parameters:
archType: ''
buildConfig: ''
container: ''
crossDacPlatforms: {}
dependOnEvaluatePaths: false
isOfficialBuild: false
osGroup: ''
osSubgroup: ''
platform: ''
pool: ''
runtimeVariant: ''
testGroup: ''
timeoutInMinutes: ''
variables: {}

jobs:
- template: xplat-pipeline-job.yml
parameters:
archType: ${{ parameters.archType }}
buildConfig: ${{ parameters.buildConfig }}
container: ${{ parameters.container }}
condition: ${{ parameters.isOfficialBuild }}
helixType: 'build/product/'
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
pool: ${{ parameters.pool }}
runtimeVariant: ${{ parameters.runtimeVariant }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}

name: crossdacpack
displayName: CrossDac Packaging

variables:
- name: officialBuildIdArg
value: ''
- name: crossDacArgs
value: '/p:CrossDacArtifactsDir=$(crossDacArtifactPath)/$(buildCrossDacArtifactName)'
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:OfficialBuildId=$(Build.BuildNumber)'
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]
- ${{ parameters.variables }}

dependsOn:
- ${{ if ne(parameters.crossDacPlatforms, '') }}:
- ${{ each platform in parameters.crossDacPlatforms }}:
- ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.buildConfig }}

steps:
- task: DownloadBuildArtifacts@0
displayName: Download CrossDac artifacts
inputs:
artifactName: $(buildCrossDacArtifactName)
downloadPath: $(crossDacArtifactPath)
checkDownloadedFiles: true

- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset crossdacpack -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) $(crossDacArgs) -ci
displayName: Build crossdac packaging

# Save packages using the prepare-signed-artifacts format.
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: ${{ parameters.platform }}

# Upload to artifacts to be signed
- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: 'CrossDacPackagingLogs_Attempt$(System.JobAttempt)'
continueOnError: true
condition: always()
6 changes: 6 additions & 0 deletions eng/pipelines/coreclr/templates/xplat-pipeline-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ jobs:
- name: buildProductRootFolderPath
value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)'

- name: buildCrossDacArtifactName
value: CoreCLRCrossDacArtifacts

- name: crossDacArtifactPath
value: $(Build.SourcesDirectory)/artifacts/$(buildCrossDacArtifactName)

# We need this because both mono and coreclr build currently depends on CoreClr
- name: coreClrProductArtifactName
value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
Expand Down
29 changes: 26 additions & 3 deletions eng/pipelines/installer/jobs/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,32 @@ jobs:
df -h
displayName: Disk Usage before Build
- script: $(BaseJobBuildCommand)
displayName: Build
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}
# Build the default subset non-MacOS platforms
- ${{ if ne(parameters.osGroup, 'osx') }}:
- script: $(BaseJobBuildCommand)
displayName: Build
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}

# Build corehost, sign and add entitlements to MacOS binaries
- ${{ if eq(parameters.osGroup, 'osx') }}:
- script: $(BaseJobBuildCommand) -subset host.native
displayName: Build CoreHost
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/pipelines/common/macos-sign-with-entitlements.yml
parameters:
filesToSign:
- name: dotnet
path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost
entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist
- name: apphost
path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost
entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist

- script: $(BaseJobBuildCommand) -subset host.pkg+host.tools+host.tests+packs
displayName: Build and Package
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}

- ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.osGroup, 'windows')) }}:
- powershell: ./eng/collect_vsinfo.ps1 -ArchiveRunName postbuild_log
Expand Down
2 changes: 0 additions & 2 deletions eng/pipelines/installer/jobs/steps/build-linux-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ parameters:
packageStepDescription: null
packagingArgs: ''
subsetArg: ''
condition: succeeded()

steps:
## Run NuGet Authentication for each of the side containers
Expand All @@ -21,7 +20,6 @@ steps:
/bl:artifacts/log/$(_BuildConfig)/msbuild.${{ parameters.packageType }}.installers.binlog
displayName: Package ${{ parameters.packageStepDescription }} - ${{ parameters.packageType }}
target: ${{ parameters.target }}
condition: ${{ parameters.condition }}
# Broken symbolic links break the SBOM processing
# We make some symlinks during the installer generation process,
# but they aren't always valid on disk afterwards. Some of our tooling,
Expand Down
Loading

0 comments on commit 0bb5e06

Please sign in to comment.