Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port enable Alpine ARM support (#41982) #42963

Merged
merged 2 commits into from
Oct 8, 2020
Merged
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/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<SubsetName Include="Clr.Tools" Description="Managed tools that support CoreCLR development and testing." />
<SubsetName Include="Clr.Packages" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />
<SubsetName Include="LinuxDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" Description="The cross-OS Windows->libc-based Linux DAC. Skipped on x86." />
<SubsetName Include="AlpineDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86 and arm." />
<SubsetName Include="AlpineDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86." />
<SubsetName Include="CrossDacPack" OnDemand="true"
Description="Packaging of cross OS DAC. Requires all assets needed to be present at a folder specified by $(CrossDacArtifactsDir). See 'Microsoft.CrossOsDiag.Private.CoreCLR.proj' for details." />

Expand Down Expand Up @@ -140,7 +140,7 @@
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);CrossDac=linux" Category="clr" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+alpinedac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm'">
<ItemGroup Condition="$(_subset.Contains('+alpinedac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'">
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);CrossDac=alpine" Category="clr" />
</ItemGroup>

Expand Down
25 changes: 25 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,31 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Linux musl arm

- ${{ if or(containsValue(parameters.platforms, 'Linux_musl_arm'), eq(parameters.platformGroup, 'all')) }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: Linux
osSubgroup: _musl
archType: arm
platform: Linux_musl_arm
container:
image: ubuntu-18.04-cross-arm-alpine-20200818211451-14441ae
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossrootfsDir: '/crossrootfs/arm'
${{ insert }}: ${{ parameters.jobParameters }}

# Linux musl arm64

- ${{ if or(containsValue(parameters.platforms, 'Linux_musl_arm64'), eq(parameters.platformGroup, 'all')) }}:
Expand Down
19 changes: 9 additions & 10 deletions eng/pipelines/coreclr/templates/crossdac-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
# 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') }}:
- ${{ if notin(parameters.archType, 'x86') }}:
- script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -alpinedac $(officialBuildIdArg)
displayName: Build Cross OS Linux-musl DAC for Windows

Expand All @@ -27,15 +27,14 @@ steps:
!**/sharedFramework/**/*
TargetFolder: $(buildLinuxDacStagingPath)

- ${{ if ne(parameters.archType, 'arm') }}:
- task: CopyFiles@2
displayName: Gather CrossDac Artifacts (Linux_musl)
inputs:
SourceFolder: $(buildMuslDacRootFolderPath)
Contents: |
**/*
!**/sharedFramework/**/*
TargetFolder: '$(buildMuslDacStagingPath)'
- task: CopyFiles@2
displayName: Gather CrossDac Artifacts (Linux_musl)
inputs:
SourceFolder: $(buildMuslDacRootFolderPath)
Contents: |
**/*
!**/sharedFramework/**/*
TargetFolder: '$(buildMuslDacStagingPath)'

- ${{ if eq(parameters.osGroup, 'Linux') }}:
- task: CopyFiles@2
Expand Down
8 changes: 8 additions & 0 deletions eng/pipelines/coreclr/templates/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ jobs:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- (Alpine.312.Amd64)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.12-helix-20200602002622-e06dc59

# Linux musl arm32
# Temporarily disabled until packages for musl-arm32 is available
#- ${{ if eq(parameters.platform, 'Linux_musl_arm') }}:
# - ${{ if eq(variables['System.TeamProject'], 'public') }}:
# - (Alpine.312.Arm32.Open)Ubuntu.1804.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.12-helix-arm32v7-20200908125213-5bece88
# - ${{ if eq(variables['System.TeamProject'], 'internal') }}:
# - (Alpine.312.Arm32)Ubuntu.1804.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.12-helix-arm32v7-20200908125213-5bece88

# Linux musl arm64
- ${{ if eq(parameters.platform, 'Linux_musl_arm64') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
Expand Down
5 changes: 5 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ stages:
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_x86
- Windows_NT_x64
Expand All @@ -75,6 +76,7 @@ stages:
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_x64
- Windows_NT_arm
Expand Down Expand Up @@ -104,6 +106,7 @@ stages:
- Linux_arm64
- Linux_musl_x64
- Browser_wasm
# - Linux_musl_arm
# - Linux_musl_arm64
# - Windows_NT_x64 enable once coreclr.dll has a version header: https://github.com/dotnet/runtime/issues/37503
# - Windows_NT_x86
Expand Down Expand Up @@ -174,6 +177,7 @@ stages:
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_x86
- Windows_NT_x64
Expand Down Expand Up @@ -215,6 +219,7 @@ stages:
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_x86
- Windows_NT_x64
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
- Linux_x64
- Linux_arm
- Linux_arm64
- Linux_musl_arm
- Linux_musl_arm64
- Linux_musl_x64
- Windows_NT_x86
Expand Down Expand Up @@ -207,6 +208,7 @@ jobs:
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_x64
- Windows_NT_x86
Expand Down Expand Up @@ -523,6 +525,7 @@ jobs:
buildConfig: Release
platforms:
- Linux_arm
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_arm
- Windows_NT_arm64
Expand Down Expand Up @@ -611,6 +614,7 @@ jobs:
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
platforms:
- Linux_arm
- Linux_musl_arm
- Linux_musl_arm64
- Windows_NT_x86
- Windows_NT_arm
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/src/.nuget/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@
<OfficialBuildRID Include="linux-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="linux-musl-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="linux-arm64">
<Platform>arm64</Platform>
</OfficialBuildRID>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<BuildIdentityPackage>false</BuildIdentityPackage>
<SupportedRids>linux-x64;linux-musl-x64;linux-arm64;linux-musl-arm64;linux-arm;</SupportedRids>
<SupportedRids>linux-x64;linux-musl-x64;linux-arm64;linux-musl-arm64;linux-arm;linux-musl-arm</SupportedRids>
</PropertyGroup>

<Target Name="VerifyCrossDacProperties" BeforeTargets="Build">
Expand All @@ -19,6 +19,7 @@
<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>
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-musl-arm'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux_musl.arm.$(Configuration)/x86</AdditionalProperties>
</_projectsToBuild>
</ItemGroup>

Expand Down
3 changes: 3 additions & 0 deletions src/installer/pkg/projects/netcoreappRIDs.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<OfficialBuildRID Include="linux-arm64">
<Platform>arm64</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="linux-musl-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="linux-musl-arm64">
<Platform>arm64</Platform>
</OfficialBuildRID>
Expand Down
Loading