Skip to content

Commit 1dee7b9

Browse files
authored
Test support for .NET 8 (#528)
1 parent 6a46e63 commit 1dee7b9

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

.github/workflows/benchpr.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
- name: Setup .NET Core
2323
uses: actions/setup-dotnet@v2
2424
with:
25-
dotnet-version: 6.0.x
25+
dotnet-version: |
26+
6.0.x
27+
8.0.x
2628
- name: Install dependencies
2729
run: dotnet restore
2830
- name: Build
@@ -57,7 +59,9 @@ jobs:
5759
- name: Setup .NET Core
5860
uses: actions/setup-dotnet@v2
5961
with:
60-
dotnet-version: 6.0.x
62+
dotnet-version: |
63+
6.0.x
64+
8.0.x
6165
- name: Install dependencies
6266
run: dotnet restore
6367
- name: Build
@@ -81,7 +85,9 @@ jobs:
8185
- name: Setup .NET Core
8286
uses: actions/setup-dotnet@v2
8387
with:
84-
dotnet-version: 6.0.x
88+
dotnet-version: |
89+
6.0.x
90+
8.0.x
8591
- name: Install dependencies
8692
run: dotnet restore
8793
- name: Build

.github/workflows/gate.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
dotnet-version: |
2424
3.1.x
2525
6.0.x
26+
8.0.x
2627
- name: Install dependencies
2728
run: dotnet restore
2829
- name: Build
@@ -96,7 +97,9 @@ jobs:
9697
- name: Setup .NET Core
9798
uses: actions/setup-dotnet@v2
9899
with:
99-
dotnet-version: 6.0.x
100+
dotnet-version: |
101+
6.0.x
102+
8.0.x
100103
- name: Install dependencies
101104
run: dotnet restore
102105
- name: Build
@@ -132,7 +135,9 @@ jobs:
132135
- name: Setup .NET Core
133136
uses: actions/setup-dotnet@v2
134137
with:
135-
dotnet-version: 6.0.x
138+
dotnet-version: |
139+
6.0.x
140+
8.0.x
136141
- name: Install dependencies
137142
run: dotnet restore
138143
- name: Build

.github/workflows/infer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup .NET Core
1919
uses: actions/setup-dotnet@v2
2020
with:
21-
dotnet-version: 6.0.x
21+
dotnet-version: 8.0.x
2222
- name: Install dependencies
2323
run: dotnet restore
2424
- name: Build

BitFaster.Caching.Benchmarks/BitFaster.Caching.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net48;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net48;net6.0;net8.0</TargetFrameworks>
66
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
77
<!-- https://stackoverflow.com/a/59916801/131345 -->
88
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>

BitFaster.Caching.ThroughputAnalysis/BitFaster.Caching.ThroughputAnalysis.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
66
<SignAssembly>False</SignAssembly>
77
<Version>2.0.0</Version>
88
<ServerGarbageCollection>true</ServerGarbageCollection>

BitFaster.Caching.ThroughputAnalysis/Host.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ public static void PrintInfo()
2929
}
3030

3131
Console.WriteLine();
32+
#if DEBUG
33+
var prev = Console.ForegroundColor;
34+
Console.ForegroundColor = ConsoleColor.DarkRed;
35+
Console.WriteLine("WARNING: Debug build (no optimizations)");
36+
Console.ForegroundColor = prev;
37+
#endif
38+
39+
Console.WriteLine($"Runtime: {RuntimeInformation.FrameworkDescription}");
3240
Console.WriteLine($"Available CPU Count: {Host.GetAvailableCoreCount()}");
3341

3442
if (Host.GetLogicalCoreCount() > Host.GetAvailableCoreCount())

0 commit comments

Comments
 (0)