Skip to content

Commit

Permalink
allow arm64 runners
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Apr 15, 2024
1 parent 863bb90 commit 7b06755
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,26 @@ public static void Main(string[] args)
string size = string.Empty;
foreach (string csize in Config.Sizes.Where(x => x.Arch == "x64").Select(x => x.Name))
string arch = String.Empty;
foreach (var csize in Config.Sizes)
{
if (labels.Contains(csize))
if (csize.Arch == "x64" && labels.Contains(csize.Name))
{
size = csize;
size = csize.Name;
arch = csize.Arch;
break;
}
if (csize.Arch == "x64" && labels.Contains($"{csize.Name}-x64"))
{
size = csize.Name;
arch = csize.Arch;
break;
}
if (csize.Arch == "arm64" && labels.Contains($"{csize.Name}-arm64"))
{
size = csize.Name;
arch = csize.Arch;
break;
}
}
Expand All @@ -186,8 +201,8 @@ public static void Main(string[] args)
return;
}
string newRunner = await cloud.CreateNewRunner("x64", size, runnerToken, orgName);
logger.LogInformation($"New Runner {newRunner} [{size}] entering pool.");
string newRunner = await cloud.CreateNewRunner(arch, size, runnerToken, orgName);
logger.LogInformation($"New Runner {newRunner} [{size} on {arch}] entering pool.");
MachineCreatedCount.Labels(orgName, size).Inc();
QueuedJobCount.Labels(orgName, size).Inc();
Expand Down

0 comments on commit 7b06755

Please sign in to comment.