File tree Expand file tree Collapse file tree 4 files changed +40
-1
lines changed
build/BenchmarkDotNet.Build Expand file tree Collapse file tree 4 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 1818 run : Set-MpPreference -DisableRealtimeMonitoring $true
1919 shell : powershell
2020 - uses : actions/checkout@v3
21+ - name : Run task 'sdk-check'
22+ shell : cmd
23+ run : ./build.cmd sdk-check
2124 - name : Run task 'build'
2225 shell : cmd
2326 run : |
4043 run : Set-MpPreference -DisableRealtimeMonitoring $true
4144 shell : powershell
4245 - uses : actions/checkout@v3
46+ - name : Run task 'sdk-check'
47+ shell : cmd
48+ run : ./build.cmd sdk-check
4349 - name : Run task 'build'
4450 shell : cmd
4551 run : |
6672 platform : x64
6773 - name : Set up zlib-static
6874 run : sudo apt-get install -y libkrb5-dev
75+ - name : Run task 'sdk-check'
76+ run : ./build.cmd sdk-check
6977 - name : Run task 'build'
7078 run : ./build.cmd build
7179 - name : Run task 'unit-tests'
8391 runs-on : macos-13
8492 steps :
8593 - uses : actions/checkout@v3
94+ - name : Run task 'sdk-check'
95+ run : ./build.cmd sdk-check
8696 - name : Run task 'build'
8797 run : ./build.cmd build
8898 - name : Run task 'unit-tests'
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ public BuildContext(ICakeContext context)
5959 BuildDirectory = RootDirectory . Combine ( "build" ) ;
6060 ArtifactsDirectory = RootDirectory . Combine ( "artifacts" ) ;
6161
62+ var toolFileName = context . IsRunningOnWindows ( ) ? "dotnet.exe" : "dotnet" ;
63+ var toolFilePath = RootDirectory . Combine ( ".dotnet" ) . CombineWithFilePath ( toolFileName ) ;
64+ context . Tools . RegisterFile ( toolFilePath ) ;
6265
6366 SolutionFile = RootDirectory . CombineWithFilePath ( "BenchmarkDotNet.sln" ) ;
6467
Original file line number Diff line number Diff line change 11using BenchmarkDotNet . Build . Meta ;
22using BenchmarkDotNet . Build . Options ;
33using Cake . Common ;
4+ using Cake . Common . Diagnostics ;
5+ using Cake . Common . Tools . DotNet ;
46using Cake . Frosting ;
57
68namespace BenchmarkDotNet . Build ;
@@ -16,6 +18,29 @@ public static int Main(string[] args)
1618 }
1719}
1820
21+ [ TaskName ( Name ) ]
22+ [ TaskDescription ( ".NET SDK Check" ) ]
23+ public class SdkCheckTask : FrostingTask < BuildContext > , IHelpProvider
24+ {
25+ private const string Name = "sdk-check" ;
26+
27+ public override void Run ( BuildContext context )
28+ {
29+ context . DotNetSDKCheck ( ) ;
30+ }
31+
32+ public HelpInfo GetHelp ( )
33+ {
34+ return new HelpInfo
35+ {
36+ Examples = new [ ]
37+ {
38+ new Example ( Name )
39+ }
40+ } ;
41+ }
42+ }
43+
1944[ TaskName ( Name ) ]
2045[ TaskDescription ( "Restore NuGet packages" ) ]
2146public class RestoreTask : FrostingTask < BuildContext > , IHelpProvider
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ public void Restore()
2424 context . DotNetRestore ( context . SolutionFile . FullPath ,
2525 new DotNetRestoreSettings
2626 {
27- MSBuildSettings = context . MsBuildSettingsRestore
27+ MSBuildSettings = context . MsBuildSettingsRestore ,
28+ Verbosity = DotNetVerbosity . Normal
2829 } ) ;
2930 }
3031
You can’t perform that action at this time.
0 commit comments