From 121b2eb459fa2c9e2a391e8936a4d10495341932 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Mon, 25 Nov 2024 16:35:51 +0100 Subject: [PATCH] add bench compile to github CI --- .github/workflows/ci.yml | 16 ++++++++++++++++ benches/nova.rs | 5 +---- 2 files changed, 17 insertions(+), 4 deletions(-) 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};