Skip to content

Commit

Permalink
feat: added benchmark step on GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
sifnoc committed Dec 19, 2023
1 parent 8dca58b commit 2877be9
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Benchmark

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
workflow_dispatch:
inputs:
run_benchmark:
description: 'Run benchmark tests (yes/no)'
required: true
default: 'no'

env:
CARGO_TERM_COLOR: always

jobs:
wakeup:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::490752553772:role/summa-solvency-ec2-slc
role-duration-seconds: 900
aws-region: us-west-2

- name: Wakeup runner
run: .github/scripts/wakeup.sh

benchmark:
runs-on: [summa-solvency-runner]
needs: [wakeup]
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_benchmark == 'yes' }}
steps:
- uses: actions/checkout@v3

- name: Run Benchmark
run: |
cd zk_prover
cargo bench
- name: Upload Benchmark Results
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: zk_prover/target/criterion

0 comments on commit 2877be9

Please sign in to comment.