From 2423af2f7ceab3132031b1a686513d6d3d9c13d0 Mon Sep 17 00:00:00 2001 From: tjjfvi Date: Mon, 25 Mar 2024 10:07:09 -0400 Subject: [PATCH] add bench workflow --- .github/workflows/bench.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/bench.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 00000000..62f128b5 --- /dev/null +++ b/.github/workflows/bench.yml @@ -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 }}