Skip to content

Commit 8f9ce05

Browse files
committed
Merge branch 'master' into build-dir
# Conflicts: # src/BenchmarkDotNet/Toolchains/DotNetCli/DotNetCliBuilder.cs # src/BenchmarkDotNet/Toolchains/DotNetCli/DotNetCliCommand.cs
2 parents b451881 + 5557aee commit 8f9ce05

File tree

238 files changed

+4679
-2227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+4679
-2227
lines changed

.github/workflows/publish-nightly.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,3 @@ jobs:
2525
env:
2626
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
2727
run: ./.dotnet/dotnet nuget push **/*.nupkg --source https://www.myget.org/F/benchmarkdotnet/api/v3/index.json --api-key $MYGET_API_KEY --timeout 600
28-
- name: Publish snupkg
29-
env:
30-
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
31-
run: ./.dotnet/dotnet nuget push **/*.snupkg --source https://www.myget.org/F/benchmarkdotnet/api/v3/index.json --api-key $MYGET_API_KEY --timeout 600

.github/workflows/run-tests.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ jobs:
2020
- uses: actions/checkout@v3
2121
- name: Run task 'build'
2222
shell: cmd
23-
run: |
24-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
25-
./build.cmd build
23+
run: ./build.cmd build
2624
- name: Run task 'in-tests-core'
2725
shell: cmd
28-
run: |
29-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
30-
./build.cmd in-tests-core -e
26+
run: ./build.cmd in-tests-core -e
3127
- name: Upload test results
3228
uses: actions/upload-artifact@v3
3329
if: always()
@@ -44,14 +40,10 @@ jobs:
4440
- uses: actions/checkout@v3
4541
- name: Run task 'build'
4642
shell: cmd
47-
run: |
48-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
49-
./build.cmd build
43+
run: ./build.cmd build
5044
- name: Run task 'in-tests-full'
5145
shell: cmd
52-
run: |
53-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
54-
./build.cmd in-tests-full -e
46+
run: ./build.cmd in-tests-full -e
5547
- name: Upload test results
5648
uses: actions/upload-artifact@v3
5749
if: always()
@@ -107,9 +99,9 @@ jobs:
10799
- uses: actions/setup-node@v3
108100
name: Setup node
109101
with:
110-
node-version: "16"
102+
node-version: "18"
111103
- name: Install cSpell
112-
run: npm install -g cspell
104+
run: npm install -g cspell@8.0.0
113105
- name: Copy cSpell config
114106
run: cp ./build/cSpell.json ./cSpell.json
115107
- name: Run cSpell

NuGet.Config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
1313
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
1414
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
15+
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
1516
</packageSources>
1617
</configuration>

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<div align="center">
88

99
[![NuGet](https://img.shields.io/nuget/v/BenchmarkDotNet.svg)](https://www.nuget.org/packages/BenchmarkDotNet/)
10-
[![MyGet](https://img.shields.io/myget/benchmarkdotnet/vpre/benchmarkdotnet?label=myget)](https://www.myget.org/feed/Packages/benchmarkdotnet)
10+
[![MyGet](https://img.shields.io/myget/benchmarkdotnet/vpre/benchmarkdotnet?label=myget)](https://www.myget.org/feed/benchmarkdotnet/package/nuget/BenchmarkDotNet)
1111
[![Downloads](https://img.shields.io/nuget/dt/benchmarkdotnet.svg)](https://www.nuget.org/packages/BenchmarkDotNet/)
1212
[![Stars](https://img.shields.io/github/stars/dotnet/BenchmarkDotNet?color=brightgreen)](https://github.com/dotnet/BenchmarkDotNet/stargazers)
13-
![License](https://img.shields.io/badge/license-MIT-blue.svg)
13+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dotnet/BenchmarkDotNet/blob/master/LICENSE.md)
1414
[![Twitter](https://img.shields.io/twitter/follow/BenchmarkDotNet?style=social&label=Twitter)](https://twitter.com/BenchmarkDotNet)
1515

1616
</div>
@@ -30,7 +30,7 @@ It's no harder than writing unit tests!
3030
Under the hood, it performs a lot of [magic](#automation) that guarantees [reliable and precise](#reliability) results thanks to the [perfolizer](https://github.com/AndreyAkinshin/perfolizer) statistical engine.
3131
BenchmarkDotNet protects you from popular benchmarking mistakes and warns you if something is wrong with your benchmark design or obtained measurements.
3232
The results are presented in a [user-friendly](#friendliness) form that highlights all the important facts about your experiment.
33-
BenchmarkDotNet is already adopted by [16600+ GitHub projects](https://github.com/dotnet/BenchmarkDotNet/network/dependents) including
33+
BenchmarkDotNet is already adopted by [18100+ GitHub projects](https://github.com/dotnet/BenchmarkDotNet/network/dependents) including
3434
[.NET Runtime](https://github.com/dotnet/runtime),
3535
[.NET Compiler](https://github.com/dotnet/roslyn),
3636
[.NET Performance](https://github.com/dotnet/performance),
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88
<ItemGroup>
9-
<PackageReference Include="Cake.Frosting" Version="3.0.0" />
9+
<PackageReference Include="Cake.Frosting" Version="4.0.0" />
1010
<PackageReference Include="Cake.FileHelpers" Version="6.1.3" />
1111
<PackageReference Include="Cake.Git" Version="3.0.0" />
12-
<PackageReference Include="Microsoft.DocAsCode.App" Version="2.67.5" />
13-
<PackageReference Include="Octokit" Version="7.0.0" />
12+
<PackageReference Include="Docfx.App" Version="2.74.1" />
13+
<PackageReference Include="Octokit" Version="9.0.0" />
1414
</ItemGroup>
1515
</Project>

build/BenchmarkDotNet.Build/BuildContext.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public BuildContext(ICakeContext context)
5959
BuildDirectory = RootDirectory.Combine("build");
6060
ArtifactsDirectory = RootDirectory.Combine("artifacts");
6161

62+
var toolFileName = context.IsRunningOnWindows() ? "dotnet.exe" : "dotnet";
63+
var toolFilePath = RootDirectory.Combine(".dotnet").CombineWithFilePath(toolFileName);
64+
context.Tools.RegisterFile(toolFilePath);
6265

6366
SolutionFile = RootDirectory.CombineWithFilePath("BenchmarkDotNet.sln");
6467

build/BenchmarkDotNet.Build/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public class InTestsFullTask : FrostingTask<BuildContext>, IHelpProvider
9898
public class InTestsCoreTask : FrostingTask<BuildContext>, IHelpProvider
9999
{
100100
private const string Name = "in-tests-core";
101-
public override void Run(BuildContext context) => context.UnitTestRunner.RunInTests("net7.0");
101+
public override void Run(BuildContext context) => context.UnitTestRunner.RunInTests("net8.0");
102102
public HelpInfo GetHelp() => new();
103103
}
104104

@@ -222,7 +222,10 @@ public class ReleaseTask : FrostingTask<BuildContext>, IHelpProvider
222222
{
223223
new Example(Name)
224224
.WithArgument(KnownOptions.Stable)
225-
.WithArgument(KnownOptions.NextVersion, "v0.1.1729")
225+
.WithArgument(KnownOptions.NextVersion, "0.1.1729")
226+
.WithArgument(KnownOptions.Push),
227+
new Example(Name)
228+
.WithArgument(KnownOptions.Stable)
226229
.WithArgument(KnownOptions.Push)
227230
}
228231
};

build/BenchmarkDotNet.Build/Runners/BuildRunner.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public void Restore()
2424
context.DotNetRestore(context.SolutionFile.FullPath,
2525
new DotNetRestoreSettings
2626
{
27-
MSBuildSettings = context.MsBuildSettingsRestore
27+
MSBuildSettings = context.MsBuildSettingsRestore,
28+
Verbosity = DotNetVerbosity.Normal
2829
});
2930
}
3031

build/BenchmarkDotNet.Build/Runners/DocumentationRunner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ private void RunDocfx()
133133

134134
var currentDirectory = Directory.GetCurrentDirectory();
135135
Directory.SetCurrentDirectory(docfxJsonFile.GetDirectory().FullPath);
136-
Microsoft.DocAsCode.Dotnet.DotnetApiCatalog.GenerateManagedReferenceYamlFiles(docfxJsonFile.FullPath).Wait();
137-
Microsoft.DocAsCode.Docset.Build(docfxJsonFile.FullPath).Wait();
136+
Docfx.Dotnet.DotnetApiCatalog.GenerateManagedReferenceYamlFiles(docfxJsonFile.FullPath).Wait();
137+
Docfx.Docset.Build(docfxJsonFile.FullPath).Wait();
138138
Directory.SetCurrentDirectory(currentDirectory);
139139
}
140140

build/BenchmarkDotNet.Build/Runners/ReleaseRunner.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Linq;
33
using System.Text;
4-
using System.Text.RegularExpressions;
54
using System.Threading.Tasks;
65
using BenchmarkDotNet.Build.Helpers;
76
using BenchmarkDotNet.Build.Meta;
@@ -34,9 +33,15 @@ public void Run()
3433
else
3534
EnvVar.NuGetToken.SetEmpty();
3635

37-
var nextVersion = KnownOptions.NextVersion.AssertHasValue(context);
3836
var currentVersion = context.VersionHistory.CurrentVersion;
3937
var tag = "v" + currentVersion;
38+
var nextVersion = KnownOptions.NextVersion.Resolve(context);
39+
if (nextVersion == "")
40+
{
41+
var version = Version.Parse(currentVersion);
42+
nextVersion = $"{version.Major}.{version.Minor}.{version.Build + 1}";
43+
context.Information($"Evaluated NextVersion: {nextVersion}");
44+
}
4045

4146
context.GitRunner.Tag(tag);
4247

@@ -101,7 +106,7 @@ private void PushNupkg()
101106
var nuGetToken = EnvVar.NuGetToken.GetValue();
102107

103108
var files = context
104-
.GetFiles(context.ArtifactsDirectory.CombineWithFilePath("*").FullPath)
109+
.GetFiles(context.ArtifactsDirectory.CombineWithFilePath("*.nupkg").FullPath)
105110
.OrderBy(file => file.FullPath);
106111
var settings = new DotNetNuGetPushSettings
107112
{

0 commit comments

Comments
 (0)