Skip to content

Commit

Permalink
[C#] Add .NET 7 support, deprecate .NET 5, remove NetCoreApp3.1 from …
Browse files Browse the repository at this point in the history
…tests (#759)

* remove .net5, add .net7
* update client and server nuspecs
* update full yml
* remove netcoreapp3.1 from tests
* Also update output in the default SimpleFunctions.

Co-authored-by: Badrish Chandramouli <badrishc@microsoft.com>
  • Loading branch information
TedHartMS and badrishc committed Nov 13, 2022
1 parent 39b7610 commit e35cde2
Show file tree
Hide file tree
Showing 44 changed files with 126 additions and 87 deletions.
24 changes: 24 additions & 0 deletions azure-pipelines-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: NodeTool@0
inputs:
versionSpec: 13.x
Expand Down Expand Up @@ -132,6 +144,18 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- bash: |
sudo npm install -g azurite
sudo mkdir azurite
Expand Down
26 changes: 25 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,21 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: NodeTool@0
inputs:
versionSpec: 13.x
versionSpec: 13.x

- script : npm install -g azurite
displayName: Install Azurite
Expand Down Expand Up @@ -132,6 +144,18 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- bash: |
sudo npm install -g azurite
sudo mkdir azurite
Expand Down
3 changes: 1 addition & 2 deletions cs/benchmark/FASTER.benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand All @@ -12,7 +12,6 @@
<RootNamespace>FASTER.benchmark</RootNamespace>
<ErrorReport>prompt</ErrorReport>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<Prefer32Bit>true</Prefer32Bit>
<AssemblyOriginatorKeyFile>../FASTER.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<SignAssembly>true</SignAssembly>
Expand Down
2 changes: 1 addition & 1 deletion cs/performance/BenchmarkDotNet/BenchmarkDotNetTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
2 changes: 1 addition & 1 deletion cs/playground/AsyncStress/AsyncStress.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion cs/playground/FasterLogMLSDTest/FasterLogStress.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
3 changes: 1 addition & 2 deletions cs/playground/SumStore/SumStore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand All @@ -12,7 +12,6 @@
<RootNamespace>SumStore</RootNamespace>
<ErrorReport>prompt</ErrorReport>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
Expand Down
2 changes: 1 addition & 1 deletion cs/playground/TstRunner/TstRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
19 changes: 10 additions & 9 deletions cs/remote/FASTER.client.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<group targetFramework="netstandard2.1">
<dependency id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" />
</group>
<group targetFramework="net5.0">
<group targetFramework="net6.0">
<dependency id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" />
</group>
<group targetFramework="net6.0">
<group targetFramework="net7.0">
<dependency id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" />
</group>
</dependencies>
Expand All @@ -46,18 +46,19 @@
<file src="src\FASTER.client\bin\AnyCPU\Release\netstandard2.1\FASTER.client.pdb" target="lib\netstandard2.1" />
<file src="src\FASTER.client\bin\AnyCPU\Release\netstandard2.1\FASTER.client.xml" target="lib\netstandard2.1" />

<file src="src\FASTER.common\bin\AnyCPU\Release\net5.0\FASTER.common.dll" target="lib\net5.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net5.0\FASTER.common.pdb" target="lib\net5.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net5.0\FASTER.common.xml" target="lib\net5.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net5.0\FASTER.client.dll" target="lib\net5.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net5.0\FASTER.client.pdb" target="lib\net5.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net5.0\FASTER.client.xml" target="lib\net5.0" />

<file src="src\FASTER.common\bin\AnyCPU\Release\net6.0\FASTER.common.dll" target="lib\net6.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net6.0\FASTER.common.pdb" target="lib\net6.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net6.0\FASTER.common.xml" target="lib\net6.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net6.0\FASTER.client.dll" target="lib\net6.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net6.0\FASTER.client.pdb" target="lib\net6.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net6.0\FASTER.client.xml" target="lib\net6.0" />

<file src="src\FASTER.common\bin\AnyCPU\Release\net7.0\FASTER.common.dll" target="lib\net7.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net7.0\FASTER.common.pdb" target="lib\net7.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net7.0\FASTER.common.xml" target="lib\net7.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net7.0\FASTER.client.dll" target="lib\net7.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net7.0\FASTER.client.pdb" target="lib\net7.0" />
<file src="src\FASTER.client\bin\AnyCPU\Release\net7.0\FASTER.client.xml" target="lib\net7.0" />

</files>
</package>
18 changes: 9 additions & 9 deletions cs/remote/FASTER.server.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<dependency id="Microsoft.FASTER.Core" version="$version$" />
<dependency id="Microsoft.Extensions.Logging" version="6.0.0" />
</group>
<group targetFramework="net5.0">
<group targetFramework="net6.0">
<dependency id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" />
<dependency id="Microsoft.FASTER.Core" version="$version$" />
<dependency id="Microsoft.Extensions.Logging" version="6.0.0" />
</group>
<group targetFramework="net6.0">
<group targetFramework="net7.0">
<dependency id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" />
<dependency id="Microsoft.FASTER.Core" version="$version$" />
<dependency id="Microsoft.Extensions.Logging" version="6.0.0" />
Expand All @@ -53,18 +53,18 @@
<file src="src\FASTER.server\bin\AnyCPU\Release\netstandard2.1\FASTER.server.pdb" target="lib\netstandard2.1" />
<file src="src\FASTER.server\bin\AnyCPU\Release\netstandard2.1\FASTER.server.xml" target="lib\netstandard2.1" />

<file src="src\FASTER.common\bin\AnyCPU\Release\net5.0\FASTER.common.dll" target="lib\net5.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net5.0\FASTER.common.pdb" target="lib\net5.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net5.0\FASTER.common.xml" target="lib\net5.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net5.0\FASTER.server.dll" target="lib\net5.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net5.0\FASTER.server.pdb" target="lib\net5.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net5.0\FASTER.server.xml" target="lib\net5.0" />

<file src="src\FASTER.common\bin\AnyCPU\Release\net6.0\FASTER.common.dll" target="lib\net6.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net6.0\FASTER.common.pdb" target="lib\net6.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net6.0\FASTER.common.xml" target="lib\net6.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net6.0\FASTER.server.dll" target="lib\net6.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net6.0\FASTER.server.pdb" target="lib\net6.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net6.0\FASTER.server.xml" target="lib\net6.0" />

<file src="src\FASTER.common\bin\AnyCPU\Release\net7.0\FASTER.common.dll" target="lib\net7.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net7.0\FASTER.common.pdb" target="lib\net7.0" />
<file src="src\FASTER.common\bin\AnyCPU\Release\net7.0\FASTER.common.xml" target="lib\net7.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net7.0\FASTER.server.dll" target="lib\net7.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net7.0\FASTER.server.pdb" target="lib\net7.0" />
<file src="src\FASTER.server\bin\AnyCPU\Release\net7.0\FASTER.server.xml" target="lib\net7.0" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/samples/FixedLenClient/FixedLenClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/samples/FixedLenServer/FixedLenServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/samples/VarLenClient/VarLenClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/samples/VarLenServer/VarLenServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/src/FASTER.client/FASTER.client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/src/FASTER.common/FASTER.common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion cs/remote/src/FASTER.server/FASTER.server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions cs/samples/AzureBackedStore/AzureBackedStore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand All @@ -12,7 +12,6 @@
<RootNamespace>AzureBackedStore</RootNamespace>
<ErrorReport>prompt</ErrorReport>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
Expand Down
2 changes: 1 addition & 1 deletion cs/samples/CacheStore/CacheStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
14 changes: 7 additions & 7 deletions cs/samples/EpvsSample/EpvsBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ internal class EpvsBench

internal class Worker
{
private byte[] scratchPad;
readonly byte[] scratchPad;

private HashAlgorithm hasher;
readonly HashAlgorithm hasher;

// private long scratchPad;
private EpvsBench parent;
private List<int> versionChangeIndexes;
private int numOps, versionChangeDelay, numaStyle, threadId;
readonly EpvsBench parent;
readonly List<int> versionChangeIndexes;
readonly int numOps, versionChangeDelay, numaStyle, threadId;

private byte syncMode;
readonly byte syncMode;

internal Worker(EpvsBench parent, Options options, Random random, int threadId)
{
hasher = new SHA256Managed();
hasher = SHA256.Create();
scratchPad = new byte[hasher.HashSize / 8];
this.parent = parent;
versionChangeIndexes = new List<int>();
Expand Down
2 changes: 1 addition & 1 deletion cs/samples/EpvsSample/EpvsSample.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>net7.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Loading

0 comments on commit e35cde2

Please sign in to comment.