-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.19 KB
/
benchmarks.yml
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
50
51
# Workflow for credential-proving benchmarks
name: Run benchmarks
on:
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: "benchmark"
cancel-in-progress: false
jobs:
benchmark:
runs-on: ubuntu-latest-l
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup env
uses: ./.github/actions/setup
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install & build packages
run: |
pnpm i
pnpm run build
- name: Run benchmarks
run: pnpm run benchmark
- name: Commit benchmark results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
if git show-ref --quiet refs/remotes/origin/benchmark-results; then
git fetch origin benchmark-results
git checkout benchmark-results
git merge FETCH_HEAD
else
git checkout -b benchmark-results
fi
git add .
git commit -m "Update benchmark results" || echo "No changes to commit"
git push origin benchmark-results