Add Linux ARM64 build support (#8016)
This commit is contained in:
parent
4c24f712eb
commit
74de391193
13
build.psm1
13
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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue