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

Enable arm64 zip and runtime pack nuget generation #757

Merged
merged 4 commits into from
Apr 27, 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
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ stages:
name: Windows_x86
targetArchitecture: x86

# Windows arm64
- template: /eng/jobs/windows-build.yml
parameters:
name: Windows_arm64
targetArchitecture: arm64
disableVSPublish: true

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: PrepareForPublish
displayName: Prepare for Publish
Expand Down
2 changes: 2 additions & 0 deletions eng/jobs/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
skipTests: $(SkipTests)
targetArchitecture: null
timeoutInMinutes: 120
disableVSPublish: false

jobs:
- job: ${{ parameters.name }}
Expand Down Expand Up @@ -37,6 +38,7 @@ jobs:
/p:CertificateId=400
/p:DotNetSignType=$(SignType)
TargetArchitecture: ${{ parameters.targetArchitecture }}
DisableVSPublish: ${{ parameters.disableVSPublish }}

steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,32 @@
</ItemGroup>

<!-- Obtain the .NET Core Runtime installers from the VS insertion packages. -->
<ItemGroup>
<InsertionPackageRID Include="@(RestoreBuildRID)" Arch="$([System.String]::new('%(Identity)').Replace('win-', ''))" />
<Target Name="CollectVSInsertionPackageDownloads"
BeforeTargets="CollectPackageReferences">

<NETCoreAppInstallerMsiRID Include="@(InsertionPackageRID)" Name="runtime" InsertionName="SharedFramework" />
<NETCoreAppInstallerMsiRID Include="@(InsertionPackageRID)" Name="hostfxr" InsertionName="HostFXR" />
<NETCoreAppInstallerMsiRID Include="@(InsertionPackageRID)" Name="host" InsertionName="SharedHost" />
<ItemGroup>
<InsertionPackageRID
Include="@(RestoreBuildRID)"
Arch="$([System.String]::new('%(Identity)').Replace('win-', ''))"
Condition="'%(RestoreBuildRID.RuntimeMsiExists)' == 'true'" />

<NETCoreAppInstallerMsiRID
Update="@(NETCoreAppInstallerMsiRID)"
Id="VS.Redist.Common.NetCore.%(InsertionName).%(Arch).$(MajorVersion).$(MinorVersion)"
Version="$(MicrosoftNETCoreAppRuntimewinx64Version)"
MsiFileName="dotnet-%(Name)-$(MicrosoftNETCoreAppRuntimewinx64Version)-%(Identity).msi" />
<NETCoreAppInstallerMsiRID Include="@(InsertionPackageRID)" Name="runtime" InsertionName="SharedFramework" />
<NETCoreAppInstallerMsiRID Include="@(InsertionPackageRID)" Name="hostfxr" InsertionName="HostFXR" />
<NETCoreAppInstallerMsiRID Include="@(InsertionPackageRID)" Name="host" InsertionName="SharedHost" />

<PackageDownload Include="@(NETCoreAppInstallerMsiRID -> '%(Id)')" Version="[%(Version)]" />
</ItemGroup>
<NETCoreAppInstallerMsiRID
Update="@(NETCoreAppInstallerMsiRID)"
Id="VS.Redist.Common.NetCore.%(InsertionName).%(Arch).$(MajorVersion).$(MinorVersion)"
Version="$(MicrosoftNETCoreAppRuntimewinx64Version)"
MsiFileName="dotnet-%(Name)-$(MicrosoftNETCoreAppRuntimewinx64Version)-%(Identity).msi" />

<PackageDownload Include="@(NETCoreAppInstallerMsiRID -> '%(Id)')" Version="[%(Version)]" />
</ItemGroup>
</Target>

<!-- Bundle the .NET Core Runtime MSIs. This order puts them before the WindowsDesktop MSIs. -->
<Target Name="GetBundledNETCoreRuntimeMsiFiles"
DependsOnTargets="CollectVSInsertionPackageDownloads"
BeforeTargets="GetBundledMsiFiles">
<ItemGroup>
<NETCoreAppInstallerMsiRID
Expand Down
5 changes: 3 additions & 2 deletions pkg/windowsdesktopRIDs.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
</PropertyGroup>

<ItemGroup>
<OfficialBuildRID Include="win-x86" Platform="x86" />
<OfficialBuildRID Include="win-x64"/>
<OfficialBuildRID Include="win-x86" Platform="x86" RuntimeMsiExists="true"/>
<OfficialBuildRID Include="win-x64" RuntimeMsiExists="true"/>
<OfficialBuildRID Include="win-arm64" Platform="arm64" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/windowsdesktop/tests/WindowsDesktopNupkgTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public void WindowsDesktopRuntimePackIsValid()
private bool CurrentRidShouldCreateNupkg =>
new[]
{
"win-arm64",
"win-x64",
"win-x86"
}.Contains(dirs.BuildRID);
Expand Down