@@ -245,6 +245,9 @@ private static IConfig CreateConfig(CommandLineOptions options, IConfig globalCo
245
245
if ( options . MaxParameterColumnWidth . HasValue )
246
246
config . WithSummaryStyle ( SummaryStyle . Default . WithMaxParameterColumnWidth ( options . MaxParameterColumnWidth . Value ) ) ;
247
247
248
+ if ( options . TimeOutInSeconds . HasValue )
249
+ config . WithBuildTimeout ( TimeSpan . FromSeconds ( options . TimeOutInSeconds . Value ) ) ;
250
+
248
251
return config ;
249
252
}
250
253
@@ -324,8 +327,6 @@ private static IEnumerable<Job> Expand(Job baseJob, CommandLineOptions options)
324
327
325
328
private static Job CreateJobForGivenRuntime ( Job baseJob , string runtimeId , CommandLineOptions options )
326
329
{
327
- TimeSpan ? timeOut = options . TimeOutInSeconds . HasValue ? TimeSpan . FromSeconds ( options . TimeOutInSeconds . Value ) : default ( TimeSpan ? ) ;
328
-
329
330
if ( ! TryParse ( runtimeId , out RuntimeMoniker runtimeMoniker ) )
330
331
{
331
332
throw new InvalidOperationException ( "Impossible, already validated by the Validate method" ) ;
@@ -341,7 +342,7 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
341
342
case RuntimeMoniker . Net48 :
342
343
return baseJob
343
344
. WithRuntime ( runtimeMoniker . GetRuntime ( ) )
344
- . WithToolchain ( CsProjClassicNetToolchain . From ( runtimeId , options . RestorePath ? . FullName , timeOut ) ) ;
345
+ . WithToolchain ( CsProjClassicNetToolchain . From ( runtimeId , options . RestorePath ? . FullName ) ) ;
345
346
case RuntimeMoniker . NetCoreApp20 :
346
347
case RuntimeMoniker . NetCoreApp21 :
347
348
case RuntimeMoniker . NetCoreApp22 :
@@ -355,7 +356,7 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
355
356
case RuntimeMoniker . Net70 :
356
357
return baseJob
357
358
. WithRuntime ( runtimeMoniker . GetRuntime ( ) )
358
- . WithToolchain ( CsProjCoreToolchain . From ( new NetCoreAppSettings ( runtimeId , null , runtimeId , options . CliPath ? . FullName , options . RestorePath ? . FullName , timeOut ) ) ) ;
359
+ . WithToolchain ( CsProjCoreToolchain . From ( new NetCoreAppSettings ( runtimeId , null , runtimeId , options . CliPath ? . FullName , options . RestorePath ? . FullName ) ) ) ;
359
360
case RuntimeMoniker . Mono :
360
361
return baseJob . WithRuntime ( new MonoRuntime ( "Mono" , options . MonoPath ? . FullName ) ) ;
361
362
case RuntimeMoniker . CoreRt20 :
@@ -380,33 +381,30 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
380
381
else
381
382
builder . UseCoreRtNuGet ( ) ;
382
383
383
- if ( timeOut . HasValue )
384
- builder . Timeout ( timeOut . Value ) ;
385
-
386
384
var runtime = runtimeMoniker . GetRuntime ( ) ;
387
385
builder . TargetFrameworkMoniker ( runtime . MsBuildMoniker ) ;
388
386
389
387
return baseJob . WithRuntime ( runtime ) . WithToolchain ( builder . ToToolchain ( ) ) ;
390
388
case RuntimeMoniker . Wasm :
391
- return MakeWasmJob ( baseJob , options , timeOut , RuntimeInformation . IsNetCore ? CoreRuntime . GetCurrentVersion ( ) . MsBuildMoniker : "net5.0" ) ;
389
+ return MakeWasmJob ( baseJob , options , RuntimeInformation . IsNetCore ? CoreRuntime . GetCurrentVersion ( ) . MsBuildMoniker : "net5.0" ) ;
392
390
case RuntimeMoniker . WasmNet50 :
393
- return MakeWasmJob ( baseJob , options , timeOut , "net5.0" ) ;
391
+ return MakeWasmJob ( baseJob , options , "net5.0" ) ;
394
392
case RuntimeMoniker . WasmNet60 :
395
- return MakeWasmJob ( baseJob , options , timeOut , "net6.0" ) ;
393
+ return MakeWasmJob ( baseJob , options , "net6.0" ) ;
396
394
case RuntimeMoniker . WasmNet70 :
397
- return MakeWasmJob ( baseJob , options , timeOut , "net7.0" ) ;
395
+ return MakeWasmJob ( baseJob , options , "net7.0" ) ;
398
396
case RuntimeMoniker . MonoAOTLLVM :
399
- return MakeMonoAOTLLVMJob ( baseJob , options , timeOut , RuntimeInformation . IsNetCore ? CoreRuntime . GetCurrentVersion ( ) . MsBuildMoniker : "net6.0" ) ;
397
+ return MakeMonoAOTLLVMJob ( baseJob , options , RuntimeInformation . IsNetCore ? CoreRuntime . GetCurrentVersion ( ) . MsBuildMoniker : "net6.0" ) ;
400
398
case RuntimeMoniker . MonoAOTLLVMNet60 :
401
- return MakeMonoAOTLLVMJob ( baseJob , options , timeOut , "net6.0" ) ;
399
+ return MakeMonoAOTLLVMJob ( baseJob , options , "net6.0" ) ;
402
400
case RuntimeMoniker . MonoAOTLLVMNet70 :
403
- return MakeMonoAOTLLVMJob ( baseJob , options , timeOut , "net7.0" ) ;
401
+ return MakeMonoAOTLLVMJob ( baseJob , options , "net7.0" ) ;
404
402
default :
405
403
throw new NotSupportedException ( $ "Runtime { runtimeId } is not supported") ;
406
404
}
407
405
}
408
406
409
- private static Job MakeMonoAOTLLVMJob ( Job baseJob , CommandLineOptions options , TimeSpan ? timeOut , string msBuildMoniker )
407
+ private static Job MakeMonoAOTLLVMJob ( Job baseJob , CommandLineOptions options , string msBuildMoniker )
410
408
{
411
409
var monoAotLLVMRuntime = new MonoAotLLVMRuntime ( aotCompilerPath : options . AOTCompilerPath , msBuildMoniker : msBuildMoniker ) ;
412
410
@@ -417,15 +415,14 @@ private static Job MakeMonoAOTLLVMJob(Job baseJob, CommandLineOptions options, T
417
415
name : monoAotLLVMRuntime . Name ,
418
416
customDotNetCliPath : options . CliPath ? . FullName ,
419
417
packagesPath : options . RestorePath ? . FullName ,
420
- timeout : timeOut ?? NetCoreAppSettings . DefaultBuildTimeout ,
421
418
customRuntimePack : options . CustomRuntimePack ,
422
419
aotCompilerPath : options . AOTCompilerPath . ToString ( ) ,
423
420
aotCompilerMode : options . AOTCompilerMode ) ) ;
424
421
425
422
return baseJob . WithRuntime ( monoAotLLVMRuntime ) . WithToolchain ( toolChain ) ;
426
423
}
427
424
428
- private static Job MakeWasmJob ( Job baseJob , CommandLineOptions options , TimeSpan ? timeOut , string msBuildMoniker )
425
+ private static Job MakeWasmJob ( Job baseJob , CommandLineOptions options , string msBuildMoniker )
429
426
{
430
427
bool wasmAot = options . AOTCompilerMode == MonoAotCompilerMode . wasm ;
431
428
@@ -442,7 +439,6 @@ private static Job MakeWasmJob(Job baseJob, CommandLineOptions options, TimeSpan
442
439
name : wasmRuntime . Name ,
443
440
customDotNetCliPath : options . CliPath ? . FullName ,
444
441
packagesPath : options . RestorePath ? . FullName ,
445
- timeout : timeOut ?? NetCoreAppSettings . DefaultBuildTimeout ,
446
442
customRuntimePack : options . CustomRuntimePack ,
447
443
aotCompilerMode : options . AOTCompilerMode ) ) ;
448
444
0 commit comments