From e7be2e22883383fbd1cb9a4f3d4f09898edff75b Mon Sep 17 00:00:00 2001 From: Clinton Ingram Date: Fri, 12 Jun 2020 21:34:19 -0700 Subject: [PATCH] update dependencies --- azure-pipelines.yml | 7 ++-- build/Common.props | 4 +++ src/Blake2Fast/Blake2Fast.csproj | 9 ++--- tests/Blake2.Bench/Blake2.Bench.csproj | 7 ++-- tests/Blake2.Bench/Program.cs | 10 +++--- tests/Blake2.Bench/bdn/Configs.cs | 49 +++++++++++--------------- tests/Blake2.Test/Blake2.Test.csproj | 4 +-- tests/runsettings | 2 +- 8 files changed, 44 insertions(+), 48 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c2f243a..308e3d5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 @@ -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') diff --git a/build/Common.props b/build/Common.props index b8b912e..e416b45 100644 --- a/build/Common.props +++ b/build/Common.props @@ -51,4 +51,8 @@ + + + + diff --git a/src/Blake2Fast/Blake2Fast.csproj b/src/Blake2Fast/Blake2Fast.csproj index cef3a44..642316f 100644 --- a/src/Blake2Fast/Blake2Fast.csproj +++ b/src/Blake2Fast/Blake2Fast.csproj @@ -19,12 +19,13 @@ - - + + + - - + + diff --git a/tests/Blake2.Bench/Blake2.Bench.csproj b/tests/Blake2.Bench/Blake2.Bench.csproj index 4928a2c..8c684d0 100644 --- a/tests/Blake2.Bench/Blake2.Bench.csproj +++ b/tests/Blake2.Bench/Blake2.Bench.csproj @@ -8,9 +8,9 @@ - + - + @@ -18,8 +18,7 @@ - - + diff --git a/tests/Blake2.Bench/Program.cs b/tests/Blake2.Bench/Program.cs index 0c8d09e..b59a2b7 100644 --- a/tests/Blake2.Bench/Program.cs +++ b/tests/Blake2.Bench/Program.cs @@ -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; @@ -61,16 +59,16 @@ 4. Blake2Fast performance on multiple runtimes (check SDK paths in Program.cs) singleRun(); break; case ConsoleKey.D1: - BenchmarkRunner.Run(new AllowNonOptimizedConfig(false).With(new AllCategoriesFilter(new[] { "OtherHash" }))); + BenchmarkRunner.Run(new AllowNonOptimizedConfig(false).AddFilter(new AllCategoriesFilter(new[] { "OtherHash" }))); break; case ConsoleKey.D2: - BenchmarkRunner.Run(new AllowNonOptimizedConfig().With(new AllCategoriesFilter(new[] { "Blake2b" }))); + BenchmarkRunner.Run(new AllowNonOptimizedConfig().AddFilter(new AllCategoriesFilter(new[] { "Blake2b" }))); break; case ConsoleKey.D3: - BenchmarkRunner.Run(new AllowNonOptimizedConfig().With(new AllCategoriesFilter(new[] { "Blake2s" }))); + BenchmarkRunner.Run(new AllowNonOptimizedConfig().AddFilter(new AllCategoriesFilter(new[] { "Blake2s" }))); break; case ConsoleKey.D4: - BenchmarkRunner.Run(new MultipleJitConfig().With(new AllCategoriesFilter(new[] { "JitTest" }))); + BenchmarkRunner.Run(new MultipleJitConfig().AddFilter(new AllCategoriesFilter(new[] { "JitTest" }))); break; default: Console.WriteLine("Unrecognized command."); diff --git a/tests/Blake2.Bench/bdn/Configs.cs b/tests/Blake2.Bench/bdn/Configs.cs index 32b106d..ce615a0 100644 --- a/tests/Blake2.Bench/bdn/Configs.cs +++ b/tests/Blake2.Bench/bdn/Configs.cs @@ -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"; } @@ -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"; } diff --git a/tests/Blake2.Test/Blake2.Test.csproj b/tests/Blake2.Test/Blake2.Test.csproj index 956c914..a925739 100644 --- a/tests/Blake2.Test/Blake2.Test.csproj +++ b/tests/Blake2.Test/Blake2.Test.csproj @@ -5,8 +5,8 @@ - - + + diff --git a/tests/runsettings b/tests/runsettings index 3297b0f..451afe9 100644 --- a/tests/runsettings +++ b/tests/runsettings @@ -1,6 +1,6 @@ - x86 + x64 true ..\out\testresults