mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
* Cross compile for win-x86, linux-arm, linux-arm64 * Build with actions instead * Remove win-x86 * Preserve CURRENT_PLATFORM in dev.sh * build.yaml * Fix formatting. Remove piplines * Use 4 space indent consistently * x32 -> x86 * TEMP: Only test when platform === target runtime Fix arm64 node externals url * win-x86 externals * Temporarily bench rhel * Add RHEL6, skip L0 on arm for now * Add stub for downloading new node externals when they are ready * Remove RHEL6 * Package based on new runtime names * Remove unused rhel from matrix includes * Update release, add packages * RID typo * Cant cross test arm on x64 hosts * New arch is a feature Dont release x86 until we have an e2e test machine * Fix version * Get version from file to avoid exec error during package on x64 host for arm package * Update Release Notes for 2.161.0 (#195) * More cleanup * Update release notes
66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using GitHub.Runner.Sdk;
|
|
|
|
namespace GitHub.Runner.Common.Util
|
|
{
|
|
public static class VarUtil
|
|
{
|
|
public static StringComparer EnvironmentVariableKeyComparer
|
|
{
|
|
get
|
|
{
|
|
switch (Constants.Runner.Platform)
|
|
{
|
|
case Constants.OSPlatform.Linux:
|
|
case Constants.OSPlatform.OSX:
|
|
return StringComparer.Ordinal;
|
|
case Constants.OSPlatform.Windows:
|
|
return StringComparer.OrdinalIgnoreCase;
|
|
default:
|
|
throw new NotSupportedException(); // Should never reach here.
|
|
}
|
|
}
|
|
}
|
|
|
|
public static string OS
|
|
{
|
|
get
|
|
{
|
|
switch (Constants.Runner.Platform)
|
|
{
|
|
case Constants.OSPlatform.Linux:
|
|
return "Linux";
|
|
case Constants.OSPlatform.OSX:
|
|
return "macOS";
|
|
case Constants.OSPlatform.Windows:
|
|
return "Windows";
|
|
default:
|
|
throw new NotSupportedException(); // Should never reach here.
|
|
}
|
|
}
|
|
}
|
|
|
|
public static string OSArchitecture
|
|
{
|
|
get
|
|
{
|
|
switch (Constants.Runner.PlatformArchitecture)
|
|
{
|
|
case Constants.Architecture.X86:
|
|
return "X86";
|
|
case Constants.Architecture.X64:
|
|
return "X64";
|
|
case Constants.Architecture.Arm:
|
|
return "ARM";
|
|
case Constants.Architecture.Arm64:
|
|
return "ARM64";
|
|
default:
|
|
throw new NotSupportedException(); // Should never reach here.
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|