Skip to content

Commit 4ba642c

Browse files
committed
ci: adds benchmark runs and comparison
Signed-off-by: Vincent Biret <[email protected]>
1 parent 317e2f6 commit 4ba642c

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/ci-cd.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v4
1818
with:
19-
dotnet-version: 8.0.x
19+
dotnet-version: 8.x
2020

2121
- name: Checkout repository
2222
id: checkout_repo
@@ -51,3 +51,29 @@ jobs:
5151
- name: Validate Trimming warnings
5252
run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net8.0
5353
working-directory: ./test/Microsoft.OpenApi.Trimming.Tests
54+
55+
validate-performance:
56+
name: Validate performance of the library
57+
runs-on: ubuntu-latest
58+
needs: [ci]
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v4
62+
63+
- name: Setup .NET
64+
uses: actions/setup-dotnet@v4
65+
with:
66+
dotnet-version: 8.x
67+
68+
- name: Copy committed results
69+
run: |
70+
mkdir -p ./performanceResults
71+
cp -r ./performance/benchmark/BenchmarkDotNet.Artifacts/results/* ./performanceResults
72+
73+
- name: Run performance tests
74+
run: |
75+
dotnet run -c Release ./performance/benchmark/PerformanceTests.csproj
76+
77+
- name: Run comparison tool
78+
run: |
79+
dotnet run -c Release ./performance/resultsComparer/resultsComparer.csproj -- ./performanceResults/ComparisonResults/performance.EmptyModels-report.json

0 commit comments

Comments
 (0)