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

Add preliminary support for linux-arm64 #3584

Open
wants to merge 1 commit into
base: v4.x
Choose a base branch
from
Open
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ winget install Microsoft.AzureFunctionsCoreTools -v 3.0.3904
#### Homebrew:

##### v4

```bash
brew tap azure/functions
brew install azure-functions-core-tools@4
Expand Down Expand Up @@ -203,7 +203,7 @@ sudo apt-get install azure-functions-core-tools-2
Using your preferred tool, unzip the downloaded release. To unzip into an `azure-functions-cli` directory using the `unzip` tool, run this command from the directory containing the downloaded release zip:

```bash
unzip -d azure-functions-cli Azure.Functions.Cli.linux-x64.*.zip
unzip -d azure-functions-cli Azure.Functions.Cli.linux-*.*.zip
```

3. Make the `func` command executable
Expand Down
14 changes: 10 additions & 4 deletions build/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private static string config(string @default = null, [CallerMemberName] string k
"min.win-x86",
"min.win-x64",
"linux-x64",
"linux-arm64",
"osx-x64",
"osx-arm64",
"win-x86",
Expand All @@ -56,6 +57,7 @@ private static string config(string @default = null, [CallerMemberName] string k
{ "win-x64", "WINDOWS" },
{ "win-arm64", "WINDOWS"},
{ "linux-x64", "LINUX" },
{ "linux-arm64", "LINUX" },
{ "osx-x64", "OSX" },
{ "osx-arm64", "OSX" },
{ "min.win-x86", "WINDOWS" },
Expand Down Expand Up @@ -91,6 +93,7 @@ private static string config(string @default = null, [CallerMemberName] string k
{
"linux",
"linux-x64",
"linux-arm64",
"unix",
"linux-musl-x64"
};
Expand All @@ -117,6 +120,7 @@ private static string config(string @default = null, [CallerMemberName] string k
{ "win-x64", _winPowershellRuntimes },
{ "win-arm64", _winPowershellRuntimes },
{ "linux-x64", _linPowershellRuntimes },
{ "linux-arm64", _linPowershellRuntimes },
{ "osx-x64", _osxPowershellRuntimes },
{ "osx-arm64", _osxARMPowershellRuntimes }
};
Expand All @@ -131,6 +135,7 @@ private static string config(string @default = null, [CallerMemberName] string k
{ "win-x64", _winPowershellRuntimesNet8 },
{ "win-arm64", _winPowershellRuntimesNet8 },
{ "linux-x64", _linPowershellRuntimes },
{ "linux-arm64", _linPowershellRuntimes },
{ "osx-x64", _osxPowershellRuntimes },
{ "osx-arm64", _osxARMPowershellRuntimes }
};
Expand All @@ -148,6 +153,7 @@ private static string config(string @default = null, [CallerMemberName] string k
{ "win-x64", _winPowershellRuntimes },
{ "win-arm64", _winPowershellRuntimes },
{ "linux-x64", _linPowershellRuntimes },
{ "linux-arm64", _linPowershellRuntimes },
{ "osx-x64", _osxPowershellRuntimes },
// NOTE: PowerShell 7.0 does not support arm. First version supporting it is 7.2
// https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.2#supported-versions
Expand Down Expand Up @@ -176,15 +182,15 @@ private static string config(string @default = null, [CallerMemberName] string k
public static readonly string OutputDir = Path.Combine(Path.GetFullPath(".."), "artifacts");

public static readonly string SBOMManifestTelemetryDir = Path.Combine(OutputDir, "SBOMManifestTelemetry");

public static string TargetFramework = "net6.0";

public static readonly string NupkgPublishDir = Path.GetFullPath($"../src/Azure.Functions.Cli/bin/Release/{TargetFramework}/publish");

public static readonly string PreSignTestDir = "PreSignTest";

public static readonly string SignTestDir = "SignTest";

public static readonly string DotnetIsolatedItemTemplates = $"https://www.nuget.org/api/v2/package/Microsoft.Azure.Functions.Worker.ItemTemplates/{DotnetIsolatedItemTemplatesVersion}";

public static readonly string DotnetIsolatedProjectTemplates = $"https://www.nuget.org/api/v2/package/Microsoft.Azure.Functions.Worker.ProjectTemplates/{DotnetIsolatedProjectTemplatesVersion}";
Expand Down Expand Up @@ -270,7 +276,7 @@ public class SignInfo
"Grpc.AspNetCore.Server.dll",
"Grpc.Core.dll",
"Grpc.Core.Api.dll",
"Grpc.Net.Client.dll",
"Grpc.Net.Client.dll",
"Grpc.Net.ClientFactory.dll",
"Grpc.Net.Common.dll",
"grpc_csharp_ext.x64.dll",
Expand Down
2 changes: 1 addition & 1 deletion src/Azure.Functions.Cli/Azure.Functions.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>func</AssemblyName>
<RuntimeIdentifiers>win-x64;win-x86;win-arm64;linux-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;win-x86;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">1</BuildNumber>
<MajorMinorProductVersion>4.0</MajorMinorProductVersion>
<Version>$(MajorMinorProductVersion).$(BuildNumber)</Version>
Expand Down
6 changes: 5 additions & 1 deletion src/Azure.Functions.Cli/npm/lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ if (os.platform() === 'win32') {
platform = 'osx-x64';
}
} else if (os.platform() === 'linux') {
platform = 'linux-x64';
if (os.arch() === 'arm64') {
platform = 'linux-arm64';
} else {
platform = 'linux-x64';
}
} else {
throw Error('platform ' + os.platform() + ' isn\'t supported');
}
Expand Down
Loading