From 491d6d48d90ccf02506b9d4339a38e5cb3a57460 Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Fri, 12 Oct 2018 16:03:58 -0700 Subject: [PATCH 1/3] Add arm64 build for Linux --- build.psm1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build.psm1 b/build.psm1 index d2681b640f8..490505cc089 100644 --- a/build.psm1 +++ b/build.psm1 @@ -220,9 +220,10 @@ function Start-PSBuild { # These runtimes must match those in project.json # We do not use ValidateScript since we want tab completion # If this parameter is not provided it will get determined automatically. - [ValidateSet("fxdependent", + [ValidateSet("alpine-x64", + "fxdependent", "linux-arm", - "alpine-x64", + "linux-arm64", "linux-x64", "osx-x64", "win-arm", @@ -590,9 +591,10 @@ function New-PSOptions { # These are duplicated from Start-PSBuild # We do not use ValidateScript since we want tab completion [ValidateSet("", + "alpine-x64", "fxdependent", "linux-arm", - "alpine-x64", + "linux-arm64", "linux-x64", "osx-x64", "win-arm", @@ -2057,8 +2059,9 @@ function Start-CrossGen { $PublishPath, [Parameter(Mandatory=$true)] - [ValidateSet("linux-arm", - "alpine-x64", + [ValidateSet("alpine-x64", + "linux-arm", + "linux-arm64", "linux-x64", "osx-x64", "win-arm", From d22bd92e8ce1aeba7b0a9c4f35ebd2909e345dbc Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Fri, 30 Nov 2018 15:44:11 -0800 Subject: [PATCH 2/3] [package] update packaging to support tar-arm64 --- tools/packaging/packaging.psm1 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 611bc96db67..280cccde5cb 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -25,7 +25,7 @@ function Start-PSPackage { [string]$Name = "powershell", # Ubuntu, CentOS, Fedora, macOS, and Windows packages are supported - [ValidateSet("deb", "osxpkg", "rpm", "msi", "zip", "AppImage", "nupkg", "tar", "tar-arm", 'tar-alpine', 'fxdependent')] + [ValidateSet("deb", "osxpkg", "rpm", "msi", "zip", "AppImage", "nupkg", "tar", "tar-arm", "tar-arm64", "tar-alpine", "fxdependent")] [string[]]$Type, # Generate windows downlevel package @@ -65,10 +65,12 @@ function Start-PSPackage { # Runtime and Configuration settings required by the package ($Runtime, $Configuration) = if ($WindowsRuntime) { $WindowsRuntime, "Release" - } elseif ($Type -eq "tar-arm") { - New-PSOptions -Configuration "Release" -Runtime "Linux-ARM" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration } } elseif ($Type -eq "tar-alpine") { New-PSOptions -Configuration "Release" -Runtime "alpine-x64" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration } + } elseif ($Type -eq "tar-arm") { + New-PSOptions -Configuration "Release" -Runtime "Linux-ARM" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration } + } elseif ($Type -eq "tar-arm64") { + New-PSOptions -Configuration "Release" -Runtime "Linux-ARM64" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration } } else { New-PSOptions -Configuration "Release" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration } } @@ -376,6 +378,19 @@ function Start-PSPackage { New-TarballPackage @Arguments } } + "tar-arm64" { + $Arguments = @{ + PackageSourcePath = $Source + Name = $Name + Version = $Version + Force = $Force + Architecture = "arm64" + } + + if ($PSCmdlet.ShouldProcess("Create tar.gz Package")) { + New-TarballPackage @Arguments + } + } "tar-alpine" { $Arguments = @{ PackageSourcePath = $Source From 5c05b80de37d467bfa3d14bf829860cf868f7795 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 4 Dec 2018 14:04:21 -0800 Subject: [PATCH 3/3] [package] address Travis' feedback --- .../Images/GenericLinuxFiles/PowerShellPackage.ps1 | 6 ++++++ tools/releaseBuild/build.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 b/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 index 377ad694058..d006b824e5f 100644 --- a/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 +++ b/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 @@ -18,6 +18,7 @@ param ( [switch]$AppImage, [switch]$TarX64, [switch]$TarArm, + [switch]$TarArm64, [switch]$FxDependent, [switch]$Alpine ) @@ -65,6 +66,11 @@ try { Start-PSBuild -Configuration Release -Restore -Runtime linux-arm -PSModuleRestore @releaseTagParam Start-PSPackage -Type tar-arm @releaseTagParam } + + if ($TarArm64) { + Start-PSBuild -Configuration Release -Restore -Runtime linux-arm64 -PSModuleRestore @releaseTagParam + Start-PSPackage -Type tar-arm64 @releaseTagParam + } } finally { diff --git a/tools/releaseBuild/build.json b/tools/releaseBuild/build.json index 1785bce8971..ca7f57f9aa7 100644 --- a/tools/releaseBuild/build.json +++ b/tools/releaseBuild/build.json @@ -261,7 +261,7 @@ { "Name": "ubuntu.14.04-no-appimage", "RepoDestinationPath": "/PowerShell", - "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -TarX64 -TarArm", + "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -TarX64 -TarArm -TarArm64", "DockerFile": "./tools/releaseBuild/Images/microsoft_powershell_ubuntu14.04/Dockerfile", "AdditionalContextFiles" :[ "./tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1"], "DockerImageName": "ps-ubunutu-14-04",