Skip to content

Commit 0bb5e06

Browse files
committed
Revert "Merge CoreCLR-based official builds legs into one leg per platform (#92901)"
This reverts commit 1bfcdab.
1 parent 1bfcdab commit 0bb5e06

File tree

14 files changed

+321
-317
lines changed

14 files changed

+321
-317
lines changed

eng/pipelines/common/global-build-job.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,10 @@ jobs:
237237
- task: CodeQL3000Init@0
238238
displayName: Initialize CodeQL (manually-injected)
239239

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

246245
- ${{ if eq(parameters.isManualCodeQLBuild, true) }}:
247246
- task: CodeQL3000Finalize@0

eng/pipelines/common/templates/global-build-step.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

eng/pipelines/common/templates/runtimes/xplat-job.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ jobs:
7777
- name: buildConfig
7878
value: ${{ parameters.buildConfig }}
7979

80+
- name: archType
81+
value: ${{ parameters.archType }}
82+
83+
- name: osGroup
84+
value: ${{ parameters.osGroup }}
85+
86+
- name: osSubgroup
87+
value: ${{ parameters.osSubgroup }}
88+
8089
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
8190
- name: _HelixSource
8291
value: official/dotnet/runtime/$(Build.SourceBranch)

eng/pipelines/common/xplat-setup.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ jobs:
4545

4646
- name: _BuildConfig
4747
value: $(buildConfigUpper)
48-
49-
- name: archType
50-
value: ${{ parameters.archType }}
51-
52-
- name: osGroup
53-
value: ${{ parameters.osGroup }}
54-
55-
- name: osSubgroup
56-
value: ${{ parameters.osSubgroup }}
5748

5849
- name: _runSmokeTestsOnlyArg
5950
value: '/p:RunSmokeTestsOnly=$(isRunSmokeTestsOnly)'

eng/pipelines/coreclr/templates/build-job.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,27 @@ jobs:
231231
artifactName: $(buildProductArtifactName)
232232
displayName: 'product build'
233233

234+
- ${{ if and(in(parameters.osGroup, 'windows', 'linux'), ne(parameters.archType, 'x86')) }}:
235+
- template: /eng/pipelines/coreclr/templates/crossdac-build.yml
236+
parameters:
237+
archType: ${{ parameters.archType }}
238+
osGroup: ${{ parameters.osGroup }}
239+
osSubgroup: ${{ parameters.osSubgroup }}
240+
isOfficialBuild: ${{ parameters.signBinaries }}
241+
${{ if eq(parameters.archType, 'arm') }}:
242+
hostArchType: x86
243+
${{ else }}:
244+
hostArchType: x64
245+
246+
- ${{ if and(in(parameters.osGroup, 'windows'), eq(parameters.archType, 'x86')) }}:
247+
- template: /eng/pipelines/coreclr/templates/crossdac-build.yml
248+
parameters:
249+
archType: arm
250+
osGroup: ${{ parameters.osGroup }}
251+
osSubgroup: ${{ parameters.osSubgroup }}
252+
isOfficialBuild: ${{ parameters.signBinaries }}
253+
hostArchType: x86
254+
234255
- ${{ if and(ne(parameters.testGroup, ''), ne(parameters.disableClrTest, true)) }}:
235256
# Publish test native components for consumption by test execution.
236257
- ${{ if ne(parameters.isOfficialBuild, true) }}:
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
parameters:
2+
archType: ''
3+
isOfficialBuild: false
4+
osGroup: ''
5+
osSubgroup: ''
6+
hostArchType: ''
7+
8+
steps:
9+
# Always build the crossdac, that way we know in CI/PR if things break to build.
10+
- ${{ if and(eq(parameters.osGroup, 'windows'), notin(parameters.archType, 'x86')) }}:
11+
- 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
12+
displayName: Build Cross OS Linux DAC for Windows
13+
14+
- 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
15+
displayName: Build Cross OS Linux-musl DAC for Windows
16+
17+
- powershell: |
18+
function CopyAndVerifyCrossOsAssets {
19+
[CmdletBinding()]
20+
param (
21+
[Parameter(Mandatory)][string]$crossDacDir,
22+
[Parameter(Mandatory)][string]$targetDir
23+
)
24+
25+
$crossDacDir = Join-Path $crossDacDir -ChildPath '${{ parameters.hostArchType }}'
26+
27+
$availableFiles = ls -File $crossDacDir
28+
29+
Write-Host "Probed for files in ""$crossDacDir"", found:"
30+
$availableFiles | fl
31+
32+
if (-not ("mscordaccore.dll" -in $availableFiles.Name `
33+
-and "mscordaccore.pdb" -in $availableFiles.Name `
34+
-and "mscordbi.dll" -in $availableFiles.Name `
35+
-and "mscordbi.pdb" -in $availableFiles.Name`
36+
))
37+
{
38+
Write-Error "Couldn't find one of the expected crossdac files."
39+
}
40+
41+
New-Item $targetDir -ItemType 'Directory' -Force -ea 0
42+
$availableFiles | %{ cp $_.FullName $targetDir -v }
43+
}
44+
45+
$buildMuslDacRootFolderPath = "$(Build.SourcesDirectory)/artifacts/bin/coreclr/alpine.${{ parameters.archType }}.$(buildConfigUpper)"
46+
$buildMuslStagingPath = "$(crossDacArtifactPath)/Linux_musl.${{ parameters.archType }}.$(buildConfigUpper)/${{ parameters.hostArchType }}"
47+
48+
$buildLinuxDacRootFolderPath = "$(Build.SourcesDirectory)/artifacts/bin/coreclr/Linux.${{ parameters.archType }}.$(buildConfigUpper)"
49+
$buildLinuxDacStagingPath = "$(crossDacArtifactPath)/Linux.${{ parameters.archType }}.$(buildConfigUpper)/${{ parameters.hostArchType }}"
50+
51+
52+
CopyAndVerifyCrossOsAssets -CrossDacDir $buildMuslDacRootFolderPath -TargetDir $buildMuslStagingPath
53+
CopyAndVerifyCrossOsAssets -CrossDacDir $buildLinuxDacRootFolderPath -TargetDir $buildLinuxDacStagingPath
54+
55+
Write-Host "Final directory contents:"
56+
ls -R $(crossDacArtifactPath)
57+
58+
displayName: Gather CrossDac Artifacts
59+
60+
- template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml
61+
parameters:
62+
basePath: $(crossDacArtifactPath)
63+
isOfficialBuild: ${{ parameters.isOfficialBuild }}
64+
timeoutInMinutes: 30
65+
66+
- ${{ if eq(parameters.osGroup, 'linux') }}:
67+
- task: CopyFiles@2
68+
displayName: Gather runtime for CrossDac
69+
inputs:
70+
SourceFolder: $(coreClrProductRootFolderPath)
71+
Contents: libcoreclr.so
72+
TargetFolder: '$(crossDacArtifactPath)/${{ parameters.osGroup }}${{ parameters.osSubgroup }}.$(archType).$(buildConfigUpper)/${{ parameters.hostArchType }}'
73+
74+
# Make the assets available in a single container for the packaging job.
75+
- task: PublishBuildArtifacts@1
76+
displayName: Publish runtime for CrossDac
77+
inputs:
78+
pathtoPublish: $(crossDacArtifactPath)
79+
PublishLocation: Container
80+
artifactName: $(buildCrossDacArtifactName)

eng/pipelines/coreclr/templates/crossdac-hostarch.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
parameters:
2+
archType: ''
3+
buildConfig: ''
4+
container: ''
5+
crossDacPlatforms: {}
6+
dependOnEvaluatePaths: false
7+
isOfficialBuild: false
8+
osGroup: ''
9+
osSubgroup: ''
10+
platform: ''
11+
pool: ''
12+
runtimeVariant: ''
13+
testGroup: ''
14+
timeoutInMinutes: ''
15+
variables: {}
16+
17+
jobs:
18+
- template: xplat-pipeline-job.yml
19+
parameters:
20+
archType: ${{ parameters.archType }}
21+
buildConfig: ${{ parameters.buildConfig }}
22+
container: ${{ parameters.container }}
23+
condition: ${{ parameters.isOfficialBuild }}
24+
helixType: 'build/product/'
25+
osGroup: ${{ parameters.osGroup }}
26+
osSubgroup: ${{ parameters.osSubgroup }}
27+
pool: ${{ parameters.pool }}
28+
runtimeVariant: ${{ parameters.runtimeVariant }}
29+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
30+
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
31+
32+
name: crossdacpack
33+
displayName: CrossDac Packaging
34+
35+
variables:
36+
- name: officialBuildIdArg
37+
value: ''
38+
- name: crossDacArgs
39+
value: '/p:CrossDacArtifactsDir=$(crossDacArtifactPath)/$(buildCrossDacArtifactName)'
40+
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
41+
- name: officialBuildIdArg
42+
value: '/p:OfficialBuildId=$(Build.BuildNumber)'
43+
- name: SignType
44+
value: $[ coalesce(variables.OfficialSignType, 'real') ]
45+
- ${{ parameters.variables }}
46+
47+
dependsOn:
48+
- ${{ if ne(parameters.crossDacPlatforms, '') }}:
49+
- ${{ each platform in parameters.crossDacPlatforms }}:
50+
- ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.buildConfig }}
51+
52+
steps:
53+
- task: DownloadBuildArtifacts@0
54+
displayName: Download CrossDac artifacts
55+
inputs:
56+
artifactName: $(buildCrossDacArtifactName)
57+
downloadPath: $(crossDacArtifactPath)
58+
checkDownloadedFiles: true
59+
60+
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset crossdacpack -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) $(crossDacArgs) -ci
61+
displayName: Build crossdac packaging
62+
63+
# Save packages using the prepare-signed-artifacts format.
64+
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
65+
parameters:
66+
name: ${{ parameters.platform }}
67+
68+
# Upload to artifacts to be signed
69+
- task: PublishPipelineArtifact@1
70+
displayName: Publish Logs
71+
inputs:
72+
targetPath: $(Build.SourcesDirectory)/artifacts/log
73+
artifactName: 'CrossDacPackagingLogs_Attempt$(System.JobAttempt)'
74+
continueOnError: true
75+
condition: always()

eng/pipelines/coreclr/templates/xplat-pipeline-job.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ jobs:
6969
- name: buildProductRootFolderPath
7070
value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)'
7171

72+
- name: buildCrossDacArtifactName
73+
value: CoreCLRCrossDacArtifacts
74+
75+
- name: crossDacArtifactPath
76+
value: $(Build.SourcesDirectory)/artifacts/$(buildCrossDacArtifactName)
77+
7278
# We need this because both mono and coreclr build currently depends on CoreClr
7379
- name: coreClrProductArtifactName
7480
value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'

eng/pipelines/installer/jobs/build-job.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,32 @@ jobs:
339339
df -h
340340
displayName: Disk Usage before Build
341341
342-
- script: $(BaseJobBuildCommand)
343-
displayName: Build
344-
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}
342+
# Build the default subset non-MacOS platforms
343+
- ${{ if ne(parameters.osGroup, 'osx') }}:
344+
- script: $(BaseJobBuildCommand)
345+
displayName: Build
346+
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}
347+
348+
# Build corehost, sign and add entitlements to MacOS binaries
349+
- ${{ if eq(parameters.osGroup, 'osx') }}:
350+
- script: $(BaseJobBuildCommand) -subset host.native
351+
displayName: Build CoreHost
352+
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}
353+
354+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
355+
- template: /eng/pipelines/common/macos-sign-with-entitlements.yml
356+
parameters:
357+
filesToSign:
358+
- name: dotnet
359+
path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost
360+
entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist
361+
- name: apphost
362+
path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost
363+
entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist
364+
365+
- script: $(BaseJobBuildCommand) -subset host.pkg+host.tools+host.tests+packs
366+
displayName: Build and Package
367+
continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }}
345368

346369
- ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.osGroup, 'windows')) }}:
347370
- powershell: ./eng/collect_vsinfo.ps1 -ArchiveRunName postbuild_log

0 commit comments

Comments
 (0)