Create runner layout for osx-arm64 (Apple M1) platform. (#1618)

* Create runner layout for osx-arm64 (Apple M1) platform.

* bypass m1 macos

* l0
This commit is contained in:
Tingluo Huang
2022-05-20 11:00:54 -04:00
committed by GitHub
parent fade0f46e7
commit 0398f57125
21 changed files with 61 additions and 22 deletions

View File

@@ -6,7 +6,13 @@ namespace GitHub.Runner.Common.Util
public static class NodeUtil
{
private const string _defaultNodeVersion = "node16";
public static readonly ReadOnlyCollection<string> BuiltInNodeVersions = new(new[] {"node12", "node16"});
#if OS_OSX && ARM64
public static readonly ReadOnlyCollection<string> BuiltInNodeVersions = new(new[] { "node16" });
#else
public static readonly ReadOnlyCollection<string> BuiltInNodeVersions = new(new[] { "node12", "node16" });
#endif
public static string GetInternalNodeVersion()
{
var forcedNodeVersion = Environment.GetEnvironmentVariable(Constants.Variables.Agent.ForcedInternalNodeVersion);