Skip to content

Commit

Permalink
add bench workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi committed Mar 25, 2024
1 parent 7a8557d commit 2423af2
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bench

on:
pull_request:

concurrency:
group: bench-${{ github.ref }}
cancel-in-progress: true

jobs:
bench:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}
- name: compare perf
run: |
git clone https://github.com/higherorderco/hvm-compare-perf
cd hvm-compare-perf
NO_COLOR=1 cargo run bench -r main -r ${{ github.sha }} -f programs/c2.hvmc > ../table
- name: write comment
run: |
echo 'Perf run for [`'`git rev-parse --short ${{ github.sha }}`'`](https://github.com/higherorderco/hvm-core/commit/${{ github.sha }}):'' >> comment
echo '```' >> comment
cat ../table >> comment
echo '```' >> comment
- name: post comment
run: gh pr comment ${{ github.event.number }} -F comment
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 2423af2

Please sign in to comment.