Skip to content

Commit

Permalink
Also install dotnet/performance SDK from global.json
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed Jan 18, 2025
1 parent b6f146a commit 3388dd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Runner/Helpers/RuntimeHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,16 @@ string GetMergeScript(string name)
}

public static async Task InstallRuntimeDotnetSdkAsync(JobBase job)
{
await InstallDotnetSdkAsync(job, "runtime/global.json");
}

public static async Task InstallDotnetSdkAsync(JobBase job, string globalJsonPath)
{
AssertIsLinux();

await job.RunProcessAsync("wget", "https://dot.net/v1/dotnet-install.sh");
await job.RunProcessAsync("bash", "dotnet-install.sh --jsonfile runtime/global.json --install-dir /usr/lib/dotnet");
await job.RunProcessAsync("bash", $"dotnet-install.sh --jsonfile {globalJsonPath} --install-dir /usr/lib/dotnet");
}

public static async Task CopyReleaseArtifactsAsync(JobBase job, string branch, string destination)
Expand Down
1 change: 1 addition & 0 deletions Runner/Jobs/BenchmarkLibrariesJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ protected override async Task RunJobCoreAsync()
await BuildRuntimeAsync();

await RuntimeHelpers.InstallRuntimeDotnetSdkAsync(this);
await RuntimeHelpers.InstallDotnetSdkAsync(this, "performance/global.json");

await WaitForPendingTasksAsync();

Expand Down

0 comments on commit 3388dd8

Please sign in to comment.