@@ -4,6 +4,8 @@ namespace Runner.Jobs;
44
55internal sealed partial class BenchmarkLibrariesJob : JobBase
66{
7+ private const string DotnetInstallDir = "dotnet-performance" ;
8+
79 public BenchmarkLibrariesJob ( HttpClient client , Dictionary < string , string > metadata ) : base ( client , metadata ) { }
810
911 protected override async Task RunJobCoreAsync ( )
@@ -30,7 +32,7 @@ protected override async Task RunJobCoreAsync()
3032 {
3133 await clonePerformanceTask ;
3234
33- PendingTasks . Enqueue ( RuntimeHelpers . InstallDotnetSdkAsync ( this , "performance/global.json" ) ) ;
35+ PendingTasks . Enqueue ( RuntimeHelpers . InstallDotnetSdkAsync ( this , "performance/global.json" , DotnetInstallDir ) ) ;
3436
3537 coreRuns = await DownloadCoreRootsAsync ( entries ) ;
3638 }
@@ -63,9 +65,9 @@ protected override async Task RunJobCoreAsync()
6365 await JitDiffJob . BuildAndCopyRuntimeBranchBitsAsync ( this , "pr" , uploadArtifacts : false , buildChecked : false , canSkipRebuild : false ) ;
6466 }
6567
66- await RuntimeHelpers . InstallRuntimeDotnetSdkAsync ( this ) ;
68+ await RuntimeHelpers . InstallRuntimeDotnetSdkAsync ( this , DotnetInstallDir ) ;
6769
68- await RuntimeHelpers . InstallDotnetSdkAsync ( this , "performance/global.json" ) ;
70+ await RuntimeHelpers . InstallDotnetSdkAsync ( this , "performance/global.json" , DotnetInstallDir ) ;
6971
7072 coreRuns = [ "artifacts-main/corerun" , "artifacts-pr/corerun" ] ;
7173 }
@@ -229,7 +231,7 @@ private async Task RunBenchmarksAsync(string[] coreRunPaths)
229231
230232 int dotnetVersion = RuntimeHelpers . GetDotnetVersion ( "performance" ) ;
231233
232- string coreRuns = string . Join ( ' ' , coreRunPaths . Select ( Path . GetFullPath ) ) ;
234+ string coreRuns = string . Join ( ' ' , coreRunPaths . Select ( p => $ " \" { Path . GetFullPath ( p ) } \" " ) ) ;
233235
234236 int coreCount = ( int ) ( HardwareInfo ? . CpuList . First ( ) . NumberOfCores ?? 0 ) ;
235237 if ( coreCount > Environment . ProcessorCount )
@@ -242,8 +244,10 @@ private async Task RunBenchmarksAsync(string[] coreRunPaths)
242244
243245 string ? artifactsDir = null ;
244246
245- await RunProcessAsync ( "/usr/lib/dotnet/dotnet" ,
246- $ "run -c Release --framework net{ dotnetVersion } .0 -- --filter { filter } -h { HiddenColumns } --corerun { coreRuns } { parallelSuffix } ",
247+ string dotnetPath = Path . GetFullPath ( $ "{ DotnetInstallDir } /dotnet") ;
248+
249+ await RunProcessAsync ( dotnetPath ,
250+ $ "run -c Release --framework net{ dotnetVersion } .0 -- --cli \" { dotnetPath } \" --filter { filter } -h { HiddenColumns } --corerun { coreRuns } { parallelSuffix } ",
247251 workDir : "performance/src/benchmarks/micro" ,
248252 processLogs : line =>
249253 {
0 commit comments