Skip to content

Commit 67a17a5

Browse files
add benchmark ci
1 parent 69db09a commit 67a17a5

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Benchmark and Commit Results
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
benchmark:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
19+
- name: Install Rust toolchain
20+
uses: dtolnay/rust-toolchain@stable
21+
with:
22+
toolchain: nightly
23+
- name: Setup upterm session
24+
uses: lhotari/action-upterm@v1
25+
with:
26+
wait-timeout-minutes: 5
27+
28+
- name: Run benchmark script
29+
run: |
30+
export PATH="$HOME/.cargo/bin:$PATH"
31+
sudo -E bash scripts/bench.sh > benchmark_results.txt
32+
sudo cat benchmark_results.txt
33+
34+
- name: Commit and push results
35+
run: |
36+
git config --global user.name "github-actions[bot]"
37+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
38+
git add benchmark_results.txt
39+
git commit -m "Update benchmark results [skip ci]" || exit 0
40+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:master

readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
## run
44

5-
`bash scripts/bench.sh`
5+
`bash scripts/bench.sh`
6+
7+
## result
8+
9+
[result](./benchmark_results.txt)

0 commit comments

Comments
 (0)