-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Transfer assets from Cross OS DAC builds into a pipeline container * Preserve additional properties in subsets' projects * Add packaging projects for Cross OS Dac assets * Pipeline change to package, sign, and publish the cross OS DAC
- Loading branch information
Showing
12 changed files
with
288 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
parameters: | ||
archType: '' | ||
osGroup: '' | ||
osSubgroup: '' | ||
|
||
steps: | ||
# Always build the crossdac, that way we know in CI/PR if things break to build. | ||
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}: | ||
- ${{ if notin(parameters.archType, 'x86') }}: | ||
- script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -linuxdac $(officialBuildIdArg) | ||
displayName: Build Cross OS Linux DAC for Windows | ||
|
||
|
||
# Make the assets available in a single container for the packaging job. | ||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: | ||
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}: | ||
- ${{ if notin(parameters.archType, 'x86', 'arm') }}: | ||
- script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -alpinedac $(officialBuildIdArg) | ||
displayName: Build Cross OS Linux-musl DAC for Windows | ||
|
||
- task: CopyFiles@2 | ||
displayName: Gather CrossDac Artifacts (Linux) | ||
inputs: | ||
SourceFolder: $(buildLinuxDacRootFolderPath) | ||
Contents: | | ||
**/* | ||
!**/sharedFramework/**/* | ||
TargetFolder: $(buildLinuxDacStagingPath) | ||
|
||
- ${{ if ne(parameters.archType, 'arm') }}: | ||
- task: CopyFiles@2 | ||
displayName: Gather CrossDac Artifacts (Linux_musl) | ||
inputs: | ||
SourceFolder: $(buildMuslDacRootFolderPath) | ||
Contents: | | ||
**/* | ||
!**/sharedFramework/**/* | ||
TargetFolder: '$(buildMuslDacStagingPath)' | ||
|
||
- ${{ 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)/$(crossDacHostArch)' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish runtime for CrossDac | ||
inputs: | ||
pathtoPublish: $(crossDacArtifactPath) | ||
PublishLocation: Container | ||
artifactName: $(buildCrossDacArtifactName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
parameters: | ||
archType: '' | ||
buildConfig: '' | ||
container: '' | ||
crossDacPlatforms: {} | ||
isOfficialBuild: false | ||
osGroup: '' | ||
osSubgroup: '' | ||
platform: '' | ||
pool: '' | ||
runtimeVariant: '' | ||
stagedBuild: false | ||
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 }} | ||
stagedBuild: ${{ parameters.stagedBuild }} | ||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} | ||
|
||
name: crossdacpack | ||
displayName: CrossDac Packaging | ||
|
||
variables: | ||
- name: officialBuildIdArg | ||
value: '' | ||
- name: crossDacArgs | ||
value: '' | ||
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: | ||
- name: officialBuildIdArg | ||
value: '/p:OfficialBuildId=$(Build.BuildNumber)' | ||
- name: crossDacArgs | ||
value: '/p:CrossDacArtifactsDir=$(crossDacArtifactPath)/$(buildCrossDacArtifactName)' | ||
- ${{ 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) | ||
|
||
- 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-unsigned-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' | ||
continueOnError: true | ||
condition: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.pkgproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" /> | ||
<PropertyGroup> | ||
<CreatePackedPackage>false</CreatePackedPackage> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- Intentional rather than globbing here, even if very manual, to make sure we publish the Cross OS Dac --> | ||
<NativeBinary Include="$(CrossDacBinRoot)/mscordaccore.dll" /> | ||
<NativeBinary Include="$(CrossDacBinRoot)/mscordbi.dll" /> | ||
<!-- The infrastructure, and this package is only for indexing. Avoid creating a transport package and just let this one have the symbols itself --> | ||
<File Include="@(NativeBinary -> '%(RootDir)%(Directory)/%(Filename).pdb')"> | ||
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath> | ||
</File> | ||
|
||
<NativeBinary Include="$(CrossDacBinRoot)/libcoreclr.so" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" /> | ||
</Project> |
35 changes: 35 additions & 0 deletions
35
...c/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.proj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<Project> | ||
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.props" /> | ||
|
||
<PropertyGroup> | ||
<BuildIdentityPackage>false</BuildIdentityPackage> | ||
<SupportedRids>linux-x64;linux-musl-x64;linux-arm64;linux-musl-arm64;linux-arm;</SupportedRids> | ||
</PropertyGroup> | ||
|
||
<Target Name="VerifyCrossDacProperties" BeforeTargets="Build"> | ||
<Error Condition="'$(CrossDacArtifactsDir)' == '' or !Exists('$(CrossDacArtifactsDir)')" | ||
Text="Packaging the Cross OS DAC requires property CrossDacArtifactsDir to to a path containing all cross OS DAC assets needed." /> | ||
</Target> | ||
|
||
<Target Name="FilterSupportedCrossOsDacPackages" BeforeTargets="Build"> | ||
<ItemGroup> | ||
<_projectsToBuild Include="@(Project)" Condition="$(SupportedRids.Contains('%(Project.PackageTargetRuntime)'))"> | ||
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-x64'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux.x64.$(Configuration)/x64</AdditionalProperties> | ||
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-musl-x64'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux_musl.x64.$(Configuration)/x64</AdditionalProperties> | ||
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-arm64'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux.arm64.$(Configuration)/x64</AdditionalProperties> | ||
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-musl-arm64'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux_musl.arm64.$(Configuration)/x64</AdditionalProperties> | ||
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-arm'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux.arm.$(Configuration)/x86</AdditionalProperties> | ||
</_projectsToBuild> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="@(_projectsToBuild)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Import Project="$([MSBuild]::GetPathOfFileAbove(versioning.targets))" /> | ||
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.targets" /> | ||
|
||
<!-- Ordering matters! Overwriting the Pack target which should just invoke Build. --> | ||
<Target Name="Pack" DependsOnTargets="Build" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.