Skip to content

Commit b345806

Browse files
committed
Run benchmarks for .NET 8 and .NET 10
1 parent bd98ed9 commit b345806

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ jobs:
3636
- name: setup dotnet
3737
uses: actions/setup-dotnet@v5
3838
with:
39-
dotnet-version: 8
39+
dotnet-version: |
40+
8
41+
10
4042
4143
- name: restore
4244
run: dotnet restore
@@ -80,7 +82,9 @@ jobs:
8082
- name: setup dotnet
8183
uses: actions/setup-dotnet@v5
8284
with:
83-
dotnet-version: 8
85+
dotnet-version: |
86+
8
87+
10
8488
8589
- name: restore
8690
run: dotnet restore
@@ -91,12 +95,12 @@ jobs:
9195
- name: benchmark
9296
shell: bash
9397
run: |
94-
dotnet run -c Release --project tests/VbaCompiler.Benchmark/VbaCompiler.Benchmark.csproj -- -e github --artifacts
98+
dotnet run -c Release -f net10.0 --launch-profile benchmark --project tests/VbaCompiler.Benchmark/VbaCompiler.Benchmark.csproj
9599
96100
{
97101
echo "## VBA Compiler Benchmark"
98102
echo ""
99103
echo "Runner: \`${{ matrix.os }}\`"
100104
echo ""
101-
cat "BenchmarkDotNet.Artifacts/results/CompileMacroBenchmark-report-github.md"
105+
cat "BenchmarkDotNet.Artifacts/results/*-report-github.md"
102106
} >> $GITHUB_STEP_SUMMARY

tests/VbaCompiler.Benchmark/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
using BenchmarkDotNet.Running;
44

5-
// var summary = BenchmarkRunner.Run<CompileVbaProjectBenchmark>();
6-
var summary = BenchmarkRunner.Run<CompileMacroBenchmark>();
5+
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"profiles": {
3+
"benchmark": {
4+
"commandName": "Project",
5+
"commandLineArgs": "--runtimes net8.0 net10.0 -f * -e github --artifacts"
6+
}
7+
}
8+
}

tests/VbaCompiler.Benchmark/VbaCompiler.Benchmark.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

0 commit comments

Comments
 (0)