diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0319acd9..67a70f3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,22 @@ jobs: - name: Run examples run: cargo run --release --example 2>&1 | grep -E '^ ' | xargs -n1 cargo run --release --example + # run the benchmarks with the flag `--no-run` to ensure that they compile, + # but without executing them. + bench: + if: github.event.pull_request.draft == false + name: Bench compile + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/cargo@v1 + with: + command: bench + args: --no-run + fmt: if: github.event.pull_request.draft == false name: Rustfmt diff --git a/benches/nova.rs b/benches/nova.rs index 3706e192..469e2358 100644 --- a/benches/nova.rs +++ b/benches/nova.rs @@ -1,8 +1,5 @@ use criterion::*; -use pprof::{ - criterion::{Output, PProfProfiler}, - flamegraph::Options, -}; +use pprof::criterion::{Output, PProfProfiler}; use ark_bn254::{constraints::GVar as bn_GVar, Fr as bn_Fr, G1Projective as bn_G}; use ark_grumpkin::{constraints::GVar as grumpkin_GVar, Projective as grumpkin_G};