Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
with:
dotnet-version: 5.0.*

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
include-prerelease: true

- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/continuousCore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
with:
dotnet-version: 5.0.*

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
include-prerelease: true

- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -86,6 +92,12 @@ jobs:
with:
dotnet-version: 5.0.*

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
include-prerelease: true

- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion Build/Nuke/NukeBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>CS0649;CS0169</NoWarn>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<NukeRootDirectory>..\..</NukeRootDirectory>
Expand Down
8 changes: 5 additions & 3 deletions Build/Nuke/ProjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static IReadOnlyCollection<string> GetTargetFrameworks(this Project proje
var frameworks = project.GetTargetFrameworks();
if (!excludeNetFramework)
return frameworks.ToList();
return frameworks.Where(x => x.Contains("standard") || x.Contains("core") || x.Contains("net50")).ToList();
return frameworks.Where(x => x.Contains("standard") || x.Contains("core") || x.Contains("net50") || x.Contains("net60")).ToList();
}

public static IReadOnlyCollection<string> GetPlatforms(this Project project)
Expand Down Expand Up @@ -50,7 +50,7 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
if (azurePipelines != null && x.framework.Contains("2.2"))
return false;

//exclude netcore 2.1 and 2.2 in x86 because is not well handle by azure pipelines and github actions on windows
//exclude netcore 2.1, 2.2, 60 in x86 because is not well handle by azure pipelines and github actions on windows
if (x.platform != "x86")
return true;
if (x.framework == null)
Expand All @@ -59,6 +59,8 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
return false;
if (x.framework.Contains("2.2"))
return false;
if (x.framework.Contains("60"))
return false;
return true;
});
}
Expand All @@ -76,4 +78,4 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
yield return toList.Where(x => !x.project.Name.Contains("StructLinq.Tests"));
}

}
}
76 changes: 64 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@ stages:
pool:
vmImage: 'windows-latest'
jobs:
- job: Setup
displayName: 'Setup'
dependsOn: [ ]
steps:
- task: UseDotNet@2
displayName: 'Setup .NET Core 2.2'
inputs:
packageType: runtime
version: 2.2.x
performMultiLevelLookup: true

- job: Compile
displayName: '⚙️ Compile'
dependsOn: [ Setup ]
dependsOn: [ ]
steps:
- task: UseDotNet@2
displayName: 'Setup .NET 5.0'
inputs:
packageType: sdk
version: 5.0.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET 6.0'
inputs:
packageType: sdk
version: 6.0.x
includePreviewVersions: true
performMultiLevelLookup: true
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile --skip'
Expand All @@ -45,6 +47,43 @@ stages:
strategy:
parallel: 4
steps:
- task: UseDotNet@2
displayName: 'Setup .NET Core 2.1'
inputs:
packageType: sdk
version: 2.1.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET Core 2.2'
inputs:
packageType: sdk
version: 2.2.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET Core 3.0'
inputs:
packageType: sdk
version: 3.0.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET Core 3.1'
inputs:
packageType: sdk
version: 3.1.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET 5.0'
inputs:
packageType: sdk
version: 5.0.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET 6.0'
inputs:
packageType: sdk
version: 6.0.x
includePreviewVersions: true
performMultiLevelLookup: true
- task: CmdLine@2
inputs:
script: './build.cmd Test --skip --test-partition $(System.JobPositionInPhase)'
Expand All @@ -56,6 +95,19 @@ stages:
displayName: '📦 Pack'
dependsOn: [ Compile ]
steps:
- task: UseDotNet@2
displayName: 'Setup .NET 5.0'
inputs:
packageType: sdk
version: 5.0.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Setup .NET 6.0'
inputs:
packageType: sdk
version: 6.0.x
includePreviewVersions: true
performMultiLevelLookup: true
- task: CmdLine@2
inputs:
script: './build.cmd Pack --skip'
Expand Down
2 changes: 1 addition & 1 deletion src/StructLinq.BCL.Tests/StructLinq.BCL.x64.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50</TargetFrameworks>
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60</TargetFrameworks>
<Platform>x64</Platform>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion src/StructLinq.BCL.Tests/StructLinq.BCL.x86.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50</TargetFrameworks>
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60</TargetFrameworks>
<Platform>x86</Platform>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x86</Platforms>
Expand Down
14 changes: 6 additions & 8 deletions src/StructLinq/Dictionary/DictionaryLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,32 @@ internal class DictionaryLayout<TKey, TValue>
public Entry<TKey, TValue>[] Entries;
}

#if (NETCOREAPP3_0 || NETCOREAPP3_1)
#if (NET5_0_OR_GREATER)

internal struct Entry<TKey, TValue>
{
public int Next;
public uint HashCode;
public int Next;
internal TKey Key; // Key of entry
internal TValue Value; // Value of entry
}
#else
#if (NET5_0)

#elif NETCOREAPP3_0_OR_GREATER

internal struct Entry<TKey, TValue>
{
public uint HashCode;
public int Next;
public uint HashCode;
internal TKey Key; // Key of entry
internal TValue Value; // Value of entry
}
#else
#else
internal struct Entry<TKey, TValue>
{
public int HashCode;
public int Next;
internal TKey Key; // Key of entry
internal TValue Value; // Value of entry
}
#endif
#endif
}
#endif
2 changes: 1 addition & 1 deletion src/StructLinq/List/ListLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace StructLinq.List
{
#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0)
#if (NETCOREAPP3_0_OR_GREATER)

internal class ListLayout<T>
{
Expand Down
2 changes: 1 addition & 1 deletion src/StructLinq/StructLinq.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.1;net452;net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50</TargetFrameworks>
<TargetFrameworks>netstandard1.1;net452;net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Label="Nuget">
Expand Down