-
-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (38 loc) · 1.16 KB
/
benchmarks.yml
File metadata and controls
49 lines (38 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Benchmarks
on:
workflow_dispatch:
jobs:
benchmark:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build -c Release --no-restore
- name: Run benchmarks and update docs
shell: pwsh
run: .github/scripts/Update-BenchmarkDocs.ps1
- name: Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Check if there are changes to commit
if git diff --quiet docs/guide/performance.md; then
echo "No changes to commit"
exit 0
fi
git add docs/guide/performance.md
git commit -m "📊 Update benchmark results [skip ci]"
# Pull with rebase in case changes were pushed while benchmarks ran
git pull --rebase origin main
git push