Skip to content

Commit 700d850

Browse files
committed
feat: add .NET10 package publishing
1 parent f597850 commit 700d850

File tree

21 files changed

+84
-41
lines changed

21 files changed

+84
-41
lines changed

.github/workflows/benchmark.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
framework:
2222
type: choice
2323
description: Specify target framework for benchmark
24-
default: net9.0
24+
default: net10.0
2525
options:
2626
- net9.0
2727
- net10.0
@@ -35,11 +35,12 @@ jobs:
3535
steps:
3636
- uses: Cysharp/Actions/.github/actions/checkout@main
3737
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
38-
39-
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
40-
if: ${{ inputs.framework == 'net10.0' }}
4138
with:
42-
dotnet-version: 10.0.x
39+
dotnet-version: |
40+
6.0.x
41+
8.0.x
42+
9.0.x
43+
10.0.x
4344
4445
- run: dotnet build -c Release
4546

.github/workflows/build-debug.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
steps:
2323
- uses: Cysharp/Actions/.github/actions/checkout@main
2424
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
25+
with:
26+
dotnet-version: |
27+
6.0.x
28+
8.0.x
29+
9.0.x
30+
10.0.x
2531
- run: dotnet build -c Release
2632
- run: dotnet test -c Release --no-build
2733
- run: dotnet build -c Release tests/System.Linq.Tests/System.Linq.Tests.slnx
@@ -60,6 +66,9 @@ jobs:
6066
steps:
6167
- uses: Cysharp/Actions/.github/actions/checkout@main
6268
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
69+
with:
70+
dotnet-version: |
71+
10.0.x
6372
- run: |
6473
dotnet build -c Release
6574
dotnet build -c Release tests/System.Linq.Tests/System.Linq.Tests.slnx
@@ -80,9 +89,9 @@ jobs:
8089
dotnet coverage collect --session-id $sessionId --nologo --settings codecoverage.runsettings --server-mode --background
8190
try
8291
{
83-
dotnet coverage connect $sessionId --nologo "dotnet test ../ -c Release --framework net9.0 --no-build"
92+
dotnet coverage connect $sessionId --nologo "dotnet test ../ -c Release --framework net10.0 --no-build"
8493
85-
dotnet coverage connect $sessionId --nologo "dotnet test -c Release System.Linq.Tests/System.Linq.Tests.slnx --framework net9.0 --no-build"
94+
dotnet coverage connect $sessionId --nologo "dotnet test -c Release System.Linq.Tests/System.Linq.Tests.slnx --framework net10.0 --no-build"
8695
}
8796
finally
8897
{

.github/workflows/build-release.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ jobs:
3333
steps:
3434
- uses: Cysharp/Actions/.github/actions/checkout@main
3535
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
36+
with:
37+
dotnet-version: |
38+
6.0.x
39+
8.0.x
40+
9.0.x
41+
10.0.x
3642
- run: dotnet build -c Release -p:Version=${{ inputs.tag }}
3743
- run: dotnet test -c Release --no-build
3844
- run: dotnet pack -c Release -p:Version=${{ inputs.tag }} -o ./publish

sandbox/Benchmark/Benchmark.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
6-
<LangVersion>13</LangVersion>
5+
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
6+
<LangVersion>14</LangVersion>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>
99
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -15,10 +15,12 @@
1515
<DefineConstants>$(DefineConstants);DIAGHUB_ENABLE_TRACE_SYSTEM</DefineConstants>
1616
</PropertyGroup>
1717

18-
<!-- Add .NET 10 support if .NET 10 or later version of MSBuild is used. -->
19-
<PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreAppMaximumVersion)','10.0'))">
20-
<TargetFrameworks>net10.0;$(TargetFrameworks)</TargetFrameworks>
18+
<!-- Add .NET 11 support if .NET 11 or later version of MSBuild is used. -->
19+
<!--
20+
<PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreAppMaximumVersion)','11.0'))">
21+
<TargetFrameworks>net11.0;$(TargetFrameworks)</TargetFrameworks>
2122
</PropertyGroup>
23+
-->
2224

2325
<ItemGroup>
2426
<PackageReference Include="AndanteSoft.SpanLinq" Version="1.0.1" />

sandbox/Benchmark/Benchmarks/Net90OptimizedBenchmark.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,13 @@ public int SelectWhereSelectSum_ZLinq()
147147
.Sum();
148148
}
149149
}
150+
151+
#if !NET10_0_OR_GREATER
152+
// Workaround code for breaking changes that introduced .NET 10 with LangVersion:14.
153+
// See: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/csharp-overload-resolution
154+
file static class ExtensionMethods
155+
{
156+
public static T[] Reverse<T>(this T[] source)
157+
=> source.Reverse();
158+
}
159+
#endif

sandbox/Benchmark/Benchmarks/OrderTakeBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void Setup()
2121
{
2222
var rand = new Random(42);
2323
array = new int[N];
24-
rand.NextBytes(MemoryMarshal.Cast<int, byte>(array));
24+
rand.NextBytes(MemoryMarshal.Cast<int, byte>(array).ToArray());
2525
}
2626

2727
[Benchmark]

sandbox/Benchmark/Benchmarks/SimdAggregate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public SimdAggregate()
1717
{
1818
numbers = new int[100000];
1919
var rand = new Random();
20-
rand.NextBytes(MemoryMarshal.Cast<int, byte>(numbers));
20+
rand.NextBytes(MemoryMarshal.Cast<int, byte>(numbers).ToArray());
2121
}
2222

2323
[Benchmark]

sandbox/Benchmark/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Kokuban;
1010
using Microsoft.DiagnosticsHub;
1111
using Perfolizer.Horology;
12-
using SpanLinq;
1312
using System.Diagnostics;
1413
using ZLinq;
1514
using ZLinq.Internal;

sandbox/ConsoleApp/ConsoleApp.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-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<NoWarn>$(NoWarn);CS8002</NoWarn>

sandbox/ConsoleAppNativeAOT/ConsoleAppNativeAOT.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-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<PublishTrimmed>true</PublishTrimmed>

0 commit comments

Comments
 (0)