Skip to content

Commit d30865b

Browse files
Merge branch 'master' into fix-validators
2 parents b19c33b + ccbaf08 commit d30865b

File tree

280 files changed

+6528
-1122
lines changed

Some content is hidden

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

280 files changed

+6528
-1122
lines changed

.github/workflows/build.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build-windows:
99
runs-on: windows-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
- name: Run
1313
shell: cmd
1414
run: |
@@ -17,7 +17,7 @@ jobs:
1717
build-linux:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- name: Set up Clang
2222
uses: egor-tensin/setup-clang@v1
2323
with:
@@ -30,6 +30,6 @@ jobs:
3030
build-macos:
3131
runs-on: macOS-latest
3232
steps:
33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v3
3434
- name: Run
3535
run: ./build.sh

.github/workflows/docs-stable.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: docs-stable
2+
3+
on:
4+
push:
5+
branches:
6+
- docs-stable
7+
workflow_dispatch:
8+
9+
permissions: write-all
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
steps:
15+
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
ref: docs-stable
20+
21+
- name: Build BenchmarkDotNet
22+
run: ./build.bat --target Build
23+
24+
# Temporary disabled because of the API limit
25+
# - name: Download changelog
26+
# run: ./build.bat --target DocFX_Changelog_Download --LatestVersions true --StableVersions true
27+
# env:
28+
# GITHUB_PRODUCT: ChangelogBuilder
29+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Build documentation
32+
run: ./build.bat --target DocFX_Build
33+
34+
- name: Upload Artifacts
35+
uses: actions/upload-artifact@v1
36+
with:
37+
name: site
38+
path: docs/_site
39+
40+
deploy:
41+
concurrency: ci-${{ github.ref }}
42+
needs: [build]
43+
runs-on: ubuntu-latest
44+
steps:
45+
46+
- name: Checkout
47+
uses: actions/checkout@v3
48+
with:
49+
ref: docs-stable
50+
51+
- name: Download Artifacts
52+
uses: actions/download-artifact@v1
53+
with:
54+
name: site
55+
56+
- name: Deploy documentation
57+
uses: JamesIves/[email protected]
58+
with:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
BRANCH: gh-pages
61+
FOLDER: site
62+
GIT_CONFIG_NAME: Andrey Akinshin
63+
GIT_CONFIG_EMAIL: [email protected]
64+
CLEAN: true

.github/workflows/spellcheck.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "docs/**/*"
9+
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- "docs/**/*"
14+
jobs:
15+
spellcheck:
16+
name: "Docs: Spellcheck"
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
name: Check out the code
21+
- uses: actions/setup-node@v1
22+
name: Setup node
23+
with:
24+
node-version: "16"
25+
- run: npm install -g cspell
26+
name: Install cSpell
27+
- run: cspell --config ./cSpell.json "docs/**/*.md" --no-progress
28+
name: Run cSpell

NuGet.Config

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
<clear />
99

1010
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
11-
<add key="perfolizer-nightly" value="https://www.myget.org/F/perfolizer/api/v3/index.json" />
12-
<!-- reuquired to run Mono Wasm benchmarks -->
13-
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
1411
<!-- reuquired to run Mono AOT benchmarks -->
1512
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
1613
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
14+
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
1715
</packageSources>
1816
</configuration>

build/Build.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
66
</PropertyGroup>
77
<ItemGroup>

build/Program.cs

+51-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.IO;
23
using System.Linq;
34
using System.Text;
@@ -47,6 +48,11 @@ public class BuildContext : FrostingContext
4748

4849
public DirectoryPath ChangeLogDirectory { get; }
4950
public DirectoryPath ChangeLogGenDirectory { get; }
51+
52+
public DirectoryPath RedirectRootDirectory { get; }
53+
public DirectoryPath RedirectProjectDirectory { get; }
54+
public DirectoryPath RedirectSourceDirectory { get; }
55+
public DirectoryPath RedirectTargetDirectory { get; }
5056

5157
public FilePath SolutionFile { get; }
5258
public FilePath UnitTestsProjectFile { get; }
@@ -80,6 +86,11 @@ public BuildContext(ICakeContext context)
8086

8187
ChangeLogDirectory = RootDirectory.Combine("docs").Combine("changelog");
8288
ChangeLogGenDirectory = RootDirectory.Combine("docs").Combine("_changelog");
89+
90+
RedirectRootDirectory = RootDirectory.Combine("docs").Combine("_redirects");
91+
RedirectProjectDirectory = RedirectRootDirectory.Combine("RedirectGenerator");
92+
RedirectSourceDirectory = RedirectRootDirectory.Combine("redirects");
93+
RedirectTargetDirectory = RootDirectory.Combine("docs").Combine("_site");
8394

8495
SolutionFile = RootDirectory.CombineWithFilePath("BenchmarkDotNet.sln");
8596
UnitTestsProjectFile = RootDirectory.Combine("tests").Combine("BenchmarkDotNet.Tests")
@@ -132,7 +143,7 @@ public void RunTests(FilePath projectFile, string alias, string tfm)
132143
public void DocfxChangelogDownload(string version, string versionPrevious, string lastCommit = "")
133144
{
134145
this.Information("DocfxChangelogDownload: " + version);
135-
// Required environment variables: GITHIB_PRODUCT, GITHUB_TOKEN
146+
// Required environment variables: GITHUB_PRODUCT, GITHUB_TOKEN
136147
var changeLogBuilderDirectory = ChangeLogGenDirectory.Combine("ChangeLogBuilder");
137148
var changeLogBuilderProjectFile = changeLogBuilderDirectory.CombineWithFilePath("ChangeLogBuilder.csproj");
138149
this.DotNetRun(changeLogBuilderProjectFile.FullPath,
@@ -198,11 +209,26 @@ public void RunDocfx(FilePath docfxJson, string args = "")
198209
else
199210
this.StartProcess(DocfxExeFile.FullPath, new ProcessSettings { Arguments = docfxJson + " " + args });
200211
}
212+
213+
public void GenerateRedirects()
214+
{
215+
var redirectProjectFile = RedirectProjectDirectory.CombineWithFilePath("RedirectGenerator.csproj");
216+
this.Information(redirectProjectFile.FullPath);
217+
this.DotNetBuild(redirectProjectFile.FullPath);
218+
this.DotNetRun(redirectProjectFile.FullPath, new DotNetRunSettings
219+
{
220+
WorkingDirectory = RedirectProjectDirectory,
221+
});
222+
223+
this.Information(RedirectTargetDirectory);
224+
this.EnsureDirectoryExists(RedirectTargetDirectory);
225+
this.CopyFiles(RedirectSourceDirectory + "/**/*", RedirectTargetDirectory, true);
226+
}
201227
}
202228

203229
public static class DocumentationHelper
204230
{
205-
public const string DocFxVersion = "2.59.3";
231+
public const string DocFxVersion = "2.59.4";
206232

207233
public static readonly string[] BdnAllVersions =
208234
{
@@ -428,12 +454,19 @@ public override void Run(BuildContext context)
428454
context.DocfxChangelogDownload(
429455
DocumentationHelper.BdnAllVersions[i],
430456
DocumentationHelper.BdnAllVersions[i - 1]);
457+
} else if (context.Argument("LatestVersions", false))
458+
{
459+
for (int i = DocumentationHelper.BdnAllVersions.Length - 2; i < DocumentationHelper.BdnAllVersions.Length; i++)
460+
context.DocfxChangelogDownload(
461+
DocumentationHelper.BdnAllVersions[i],
462+
DocumentationHelper.BdnAllVersions[i - 1]);
431463
}
432464

433-
context.DocfxChangelogDownload(
434-
DocumentationHelper.BdnNextVersion,
435-
DocumentationHelper.BdnAllVersions.Last(),
436-
"HEAD");
465+
if (!context.Argument("StableVersions", false))
466+
context.DocfxChangelogDownload(
467+
DocumentationHelper.BdnNextVersion,
468+
DocumentationHelper.BdnAllVersions.Last(),
469+
"HEAD");
437470
}
438471
}
439472

@@ -454,6 +487,15 @@ public override void Run(BuildContext context)
454487
}
455488
}
456489

490+
[TaskName("DocFX_Generate_Redirects")]
491+
public class DocfxGenerateRedirectsTask : FrostingTask<BuildContext>
492+
{
493+
public override void Run(BuildContext context)
494+
{
495+
context.GenerateRedirects();
496+
}
497+
}
498+
457499
// In order to work around xref issues in DocFx, BenchmarkDotNet and BenchmarkDotNet.Annotations must be build
458500
// before running the DocFX_Build target. However, including a dependency on BuildTask here may have unwanted
459501
// side effects (CleanTask).
@@ -466,6 +508,7 @@ public class DocfxChangelogBuildTask : FrostingTask<BuildContext>
466508
public override void Run(BuildContext context)
467509
{
468510
context.RunDocfx(context.DocfxJsonFile);
511+
context.GenerateRedirects();
469512
}
470513
}
471514

@@ -476,6 +519,8 @@ public class DocfxChangelogServeTask : FrostingTask<BuildContext>
476519
{
477520
public override void Run(BuildContext context)
478521
{
522+
context.RunDocfx(context.DocfxJsonFile);
523+
context.GenerateRedirects();
479524
context.RunDocfx(context.DocfxJsonFile, "--serve");
480525
}
481526
}

cSpell.json

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"Alloc",
6+
"analyse",
7+
"analyser",
8+
"Analysers",
9+
"Autofac",
10+
"bitness",
11+
"corlib",
12+
"Cygwin",
13+
"Diagnoser",
14+
"diagnosers",
15+
"disassemblers",
16+
"disassm",
17+
"Jits",
18+
"Jitting",
19+
"LINQ",
20+
"microbenchmarking",
21+
"microbenchmarks",
22+
"Mispredict",
23+
"Mispredictions",
24+
"msbuild",
25+
"Multimodal",
26+
"multimodality",
27+
"netcoreapp",
28+
"powerplans",
29+
"Pseudocode",
30+
"runtimes",
31+
"Serilog",
32+
"Tailcall",
33+
"toolchains",
34+
"unmanaged"
35+
],
36+
"ignoreWords": [
37+
"Akinshin",
38+
"Andrey",
39+
"Expecto",
40+
"Jint",
41+
"LoongArch64",
42+
"macrobenchmark",
43+
"MediatR",
44+
"Nagórski's",
45+
"Newtonsoft",
46+
"NodaTime",
47+
"Npgsql",
48+
"Sitnik's",
49+
"Wojciech",
50+
"Avalonia",
51+
"Gitter"
52+
],
53+
"patterns": [
54+
{
55+
"name": "Markdown links",
56+
"pattern": "\\((.*)\\)",
57+
"description": ""
58+
},
59+
{
60+
"name": "Markdown code blocks",
61+
"pattern": "/^(\\s*`{3,}).*[\\s\\S]*?^\\1/gmx",
62+
"description": "Taken from the cSpell example at https://cspell.org/configuration/patterns/#verbose-regular-expressions"
63+
},
64+
{
65+
"name": "Inline code blocks",
66+
"pattern": "\\`([^\\`\\r\\n]+?)\\`",
67+
"description": "https://stackoverflow.com/questions/41274241/how-to-capture-inline-markdown-code-but-not-a-markdown-code-fence-with-regex"
68+
},
69+
{
70+
"name": "Link contents",
71+
"pattern": "\\<a(.*)\\>",
72+
"description": ""
73+
},
74+
{
75+
"name": "Snippet references",
76+
"pattern": "-- snippet:(.*)",
77+
"description": ""
78+
},
79+
{
80+
"name": "Snippet references 2",
81+
"pattern": "\\<\\[sample:(.*)",
82+
"description": "another kind of snippet reference"
83+
},
84+
{
85+
"name": "Multi-line code blocks",
86+
"pattern": "/^\\s*```[\\s\\S]*?^\\s*```/gm"
87+
},
88+
{
89+
"name": "HTML Tags",
90+
"pattern": "<[^>]*>",
91+
"description": "Reference: https://stackoverflow.com/questions/11229831/regular-expression-to-remove-html-tags-from-a-string"
92+
}
93+
],
94+
"ignoreRegExpList": [
95+
"Markdown links",
96+
"Markdown code blocks",
97+
"Inline code blocks",
98+
"Link contents",
99+
"Snippet references",
100+
"Snippet references 2",
101+
"Multi-line code blocks",
102+
"HTML Tags"
103+
],
104+
"ignorePaths": [
105+
"docs/_changelog/**/*.md",
106+
"docs/articles/team.md"
107+
]
108+
}

docs/_changelog/footer/v0.10.7.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ _Date: June 05, 2017_
22

33
_Milestone: [v0.10.7](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.7)_
44

5-
_Overview post: http://aakinshin.net/blog/post/bdn-v0_10_7/_
5+
_Overview post: https://aakinshin.net/posts/bdn-v0_10_7/_
66

77
_NuGet Packages:_
88
* https://www.nuget.org/packages/BenchmarkDotNet/0.10.7

docs/_changelog/header/v0.10.10.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Highlights:
22

3-
* Disassembly Diagnoser (read more here: [Disassembling .NET Code with BenchmarkDotNet](http://adamsitnik.com/Disassembly-Diagnoser/))
3+
* Disassembly Diagnoser (read more here: [Disassembling .NET Code with BenchmarkDotNet](https://adamsitnik.com/Disassembly-Diagnoser/))
44
* ParamsSources
55
* .NET Core x86 support
66
* Environment variables and Mono args support
77
* Better environment description
88
* More: additional sections in the documentation, bug fixes, build script improvements, internal refactoring.
99

10-
Overview post: [BenchmarkDotNet v0.10.10](http://aakinshin.net/blog/post/bdn-v0_10_10/)
10+
Overview post: [BenchmarkDotNet v0.10.10](https://aakinshin.net/posts/bdn-v0_10_10/)

0 commit comments

Comments
 (0)