Skip to content

Commit 914ecbf

Browse files
committed
ci: adds benchmark runs and comparison
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent e87e2e6 commit 914ecbf

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.github/workflows/ci-cd.yml

Lines changed: 42 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
@@ -36,3 +36,44 @@ jobs:
3636
shell: pwsh
3737
run: |
3838
dotnet test Microsoft.OpenApi.sln -c Release -v n
39+
40+
validate-trimming:
41+
name: Validate Project for Trimming
42+
runs-on: windows-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- name: Setup .NET
47+
uses: actions/setup-dotnet@v4
48+
with:
49+
dotnet-version: 8.x
50+
51+
- name: Validate Trimming warnings
52+
run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net8.0
53+
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)