Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
saucecontrol committed Jun 13, 2020
1 parent 6313bcd commit e7be2e2
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 48 deletions.
7 changes: 4 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ pool:

name: $(Year:yy)$(DayOfYear)$(Rev:r)
steps:
- task: NuGetAuthenticate@0
condition: ne(variables['Build.Reason'], 'PullRequest')

- task: UseDotNet@2
displayName: Ensure 3.1 SDK
inputs:
version: 3.1.x
performMultiLevelLookup: true

- task: UseDotNet@2
displayName: Ensure 2.1 Runtime
Expand All @@ -32,6 +30,9 @@ steps:
env:
COMPlus_EnableAVX: 0

- task: NuGetAuthenticate@0
condition: ne(variables['Build.Reason'], 'PullRequest')

- script: dotnet nuget push --api-key AzureArtifacts --source https://pkgs.dev.azure.com/saucecontrol/Blake2Fast/_packaging/blake2fast_ci/nuget/v3/index.json out\bin\Blake2Fast\Dist\SauceControl.Blake2Fast.*.nupkg
displayName: Push
condition: ne(variables['Build.Reason'], 'PullRequest')
Expand Down
4 changes: 4 additions & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@
<SourceRoot Include="$(RepositoryRoot)" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="all" />
</ItemGroup>

</Project>
9 changes: 5 additions & 4 deletions src/Blake2Fast/Blake2Fast.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
</ItemGroup>

<ItemGroup Condition="!$(DefineConstants.Contains('BUILTIN_SPAN'))">
<PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Memory" Version="4.5.3" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.0'">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" />
<ItemGroup Condition="$(DefineConstants.Contains('BUILTIN_SPAN')) And '$(TargetFramework)'!='netcoreapp3.0'">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions tests/Blake2.Bench/Blake2.Bench.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.11.5" />
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
<PackageReference Include="ByteTerrace.Maths.Cryptography.Blake2" Version="0.0.6" />
<PackageReference Include="Isopoh.Cryptography.Blake2b" Version="1.1.2" />
<PackageReference Include="Isopoh.Cryptography.Blake2b" Version="1.1.3" />
<PackageReference Include="Konscious.Security.Cryptography.Blake2" Version="1.0.9" />
<PackageReference Include="System.Data.HashFunction.Blake2" Version="2.0.0" />
<PackageReference Include="blake2s-net" Version="0.1.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('netcore'))">
<PackageReference Include="Blake2Core" Version="1.0.0" />
<PackageReference Include="libsodium" Version="1.0.17.1" />
<PackageReference Include="NSec.Cryptography" Version="19.5.0" />
<PackageReference Include="NSec.Cryptography" Version="20.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 4 additions & 6 deletions tests/Blake2.Bench/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using System.Collections.Generic;
using System.Security.Cryptography;

using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Filters;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Attributes;
Expand Down Expand Up @@ -61,16 +59,16 @@ 4. Blake2Fast performance on multiple runtimes (check SDK paths in Program.cs)
singleRun();
break;
case ConsoleKey.D1:
BenchmarkRunner.Run<Blake2Bench>(new AllowNonOptimizedConfig(false).With(new AllCategoriesFilter(new[] { "OtherHash" })));
BenchmarkRunner.Run<Blake2Bench>(new AllowNonOptimizedConfig(false).AddFilter(new AllCategoriesFilter(new[] { "OtherHash" })));
break;
case ConsoleKey.D2:
BenchmarkRunner.Run<Blake2Bench>(new AllowNonOptimizedConfig().With(new AllCategoriesFilter(new[] { "Blake2b" })));
BenchmarkRunner.Run<Blake2Bench>(new AllowNonOptimizedConfig().AddFilter(new AllCategoriesFilter(new[] { "Blake2b" })));
break;
case ConsoleKey.D3:
BenchmarkRunner.Run<Blake2Bench>(new AllowNonOptimizedConfig().With(new AllCategoriesFilter(new[] { "Blake2s" })));
BenchmarkRunner.Run<Blake2Bench>(new AllowNonOptimizedConfig().AddFilter(new AllCategoriesFilter(new[] { "Blake2s" })));
break;
case ConsoleKey.D4:
BenchmarkRunner.Run<Blake2Bench>(new MultipleJitConfig().With(new AllCategoriesFilter(new[] { "JitTest" })));
BenchmarkRunner.Run<Blake2Bench>(new MultipleJitConfig().AddFilter(new AllCategoriesFilter(new[] { "JitTest" })));
break;
default:
Console.WriteLine("Unrecognized command.");
Expand Down
49 changes: 21 additions & 28 deletions tests/Blake2.Bench/bdn/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public MultipleJitConfig()
var cli21_32 = NetCoreAppSettings.NetCoreApp21.WithCustomDotNetCliPath(Paths.DotNetCLIx86, "Default");
var cli21_64 = NetCoreAppSettings.NetCoreApp21.WithCustomDotNetCliPath(Paths.DotNetCLIx64, "Default");

Add(Job.ShortRun.With(Jit.RyuJit).With(Platform.X64).With(CsProjCoreToolchain.From(cli30_64)).WithId("netcoreapp3.0"));
Add(Job.ShortRun.With(Jit.RyuJit).With(Platform.X86).With(CsProjCoreToolchain.From(cli30_32)).WithId("netcoreapp3.0"));
Add(Job.ShortRun.With(Jit.RyuJit).With(Platform.X64).With(CsProjCoreToolchain.From(cli21_64)).WithId("netcoreapp2.1"));
Add(Job.ShortRun.With(Jit.RyuJit).With(Platform.X86).With(CsProjCoreToolchain.From(cli21_32)).WithId("netcoreapp2.1"));

Add(Job.ShortRun.With(Runtime.Clr).With(Jit.RyuJit).With(Platform.X64).WithId("net472").AsBaseline());
Add(Job.ShortRun.With(Runtime.Clr).With(Jit.LegacyJit).With(Platform.X86).WithId("net472").AsBaseline());

Add(DefaultConfig.Instance.GetLoggers().ToArray());
Add(DefaultConfig.Instance.GetColumnProviders().Where(cp => cp.GetType().Name != "ParamsColumnProvider").ToArray());
Add(DefaultConfig.Instance.GetExporters().ToArray());
Add(MemoryDiagnoser.Default);
Add(new DataLengthColumn());
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithToolchain(CsProjCoreToolchain.From(cli30_64)).WithId("netcoreapp3.0"));
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X86).WithToolchain(CsProjCoreToolchain.From(cli30_32)).WithId("netcoreapp3.0"));
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithToolchain(CsProjCoreToolchain.From(cli21_64)).WithId("netcoreapp2.1"));
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X86).WithToolchain(CsProjCoreToolchain.From(cli21_32)).WithId("netcoreapp2.1"));

AddJob(Job.ShortRun.WithRuntime(ClrRuntime.Net472).WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithId("net472").AsBaseline());
AddJob(Job.ShortRun.WithRuntime(ClrRuntime.Net472).WithJit(Jit.LegacyJit).WithPlatform(Platform.X86).WithId("net472").AsBaseline());

AddLogger(DefaultConfig.Instance.GetLoggers().ToArray());
AddColumnProvider(DefaultConfig.Instance.GetColumnProviders().Where(cp => cp.GetType().Name != "ParamsColumnProvider").ToArray());
AddExporter(DefaultConfig.Instance.GetExporters().ToArray());
AddDiagnoser(MemoryDiagnoser.Default);
AddColumn(new DataLengthColumn());
Orderer = ByPlatformByDataLengthOrderer.Instance;
ArtifactsPath = @"..\..\out\bdn\Blake2.Bench";
}
Expand All @@ -39,23 +39,16 @@ public class AllowNonOptimizedConfig : ManualConfig
{
public AllowNonOptimizedConfig(bool includeHash = true)
{
var cli30_32 = NetCoreAppSettings.NetCoreApp30.WithCustomDotNetCliPath(Paths.DotNetCLIx86, "Default");
var cli30_64 = NetCoreAppSettings.NetCoreApp30.WithCustomDotNetCliPath(Paths.DotNetCLIx64, "Default");

//Add(Job.ShortRun.With(Jit.RyuJit).With(Platform.X64).With(CsProjCoreToolchain.From(cli30_64)).WithId("netcoreapp3.0"));
//Add(Job.ShortRun.With(Jit.RyuJit).With(Platform.X86).With(CsProjCoreToolchain.From(cli30_32)).WithId("netcoreapp3.0"));
//Add(Job.ShortRun.With(Runtime.Clr).With(Jit.RyuJit).With(Platform.X64).WithId("net472").AsBaseline());
//Add(Job.ShortRun.With(Runtime.Clr).With(Jit.LegacyJit).With(Platform.X86).WithId("net472").AsBaseline());
Add(Job.ShortRun);
AddJob(Job.ShortRun);

Add(JitOptimizationsValidator.DontFailOnError); // needed for Blake2Core, which is not optimized in nuget package
AddValidator(JitOptimizationsValidator.DontFailOnError); // needed for Blake2Core, which is not optimized in nuget package

Add(DefaultConfig.Instance.GetLoggers().ToArray());
Add(DefaultConfig.Instance.GetColumnProviders().Where(cp => cp.GetType().Name != "ParamsColumnProvider").ToArray());
Add(DefaultConfig.Instance.GetExporters().ToArray());
Add(MemoryDiagnoser.Default);
if (includeHash) Add(new HashColumn());
Add(new DataLengthColumn());
AddLogger(DefaultConfig.Instance.GetLoggers().ToArray());
AddColumnProvider(DefaultConfig.Instance.GetColumnProviders().Where(cp => cp.GetType().Name != "ParamsColumnProvider").ToArray());
AddExporter(DefaultConfig.Instance.GetExporters().ToArray());
AddDiagnoser(MemoryDiagnoser.Default);
if (includeHash) AddColumn(new HashColumn());
AddColumn(new DataLengthColumn());
Orderer = ByPlatformByDataLengthOrderer.Instance;
ArtifactsPath = @"..\..\out\bdn\Blake2.Bench";
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Blake2.Test/Blake2.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Json" Version="4.7.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" />
<PackageReference Include="System.Json" Version="4.7.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion tests/runsettings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<RunSettings>
<RunConfiguration>
<TargetPlatform>x86</TargetPlatform>
<TargetPlatform>x64</TargetPlatform>
<DisableAppDomain>true</DisableAppDomain>
<ResultsDirectory>..\out\testresults</ResultsDirectory>
</RunConfiguration>
Expand Down

0 comments on commit e7be2e2

Please sign in to comment.