Skip to content

Refactor LazyCache to use std::sync::LazyLock #1529

Refactor LazyCache to use std::sync::LazyLock

Refactor LazyCache to use std::sync::LazyLock #1529

name: Bench mina circuits (check regressions against master)
on:
pull_request:
merge_group:
env:
CARGO_TERM_COLOR: always
jobs:
bench-compare:
runs-on: ubuntu-latest
name: Run benches
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Load versions
id: versions
uses: ./.github/actions/load-versions
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v14
with:
workflow: benches-mina-prover-set-baseline.yml
name: criterion-ps-mina-master-baseline
path: criterion-ps-mina-master-baseline/
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ steps.versions.outputs.rust-msrv }}
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml_version: ${{ steps.versions.outputs.ocaml-version }}
- name: Ensure that everything builds
run: |
eval $(opam env)
cargo check --benches --examples
# 'sleep 1' are necessary because otherwise the outputs are intermixed.
- name: Copy previous baseline to target folder
run: |
set -x
pwd
sleep 1
ls .
sleep 1
tree criterion-ps-mina-master-baseline/
sleep 1
# This copies paths as follows... into ./target/
# target/criterion/proof_creation/proof creation (SRS size 2_{16}, 1014 gates)/ci-master-latest/benchmark.json
# target/criterion/proof_creation/proof creation (SRS size 2_{16}, 1014 gates)/ci-master-latest/estimates.json
# target/criterion/proof_creation/proof creation (SRS size 2_{16}, 1014 gates)/ci-master-latest/sample.json
# target/criterion/proof_creation/proof creation (SRS size 2_{16}, 1014 gates)/ci-master-latest/tukey.json
rsync -av $(realpath ./criterion-ps-mina-master-baseline/target) .
sleep 1
ls target/
- name: Run criterion bench
run: |
set -x
eval $(opam env)
BASELINE_NAME=master-baseline-data bash scripts/bench-criterion-mina-circuits.sh cargo bench -p kimchi --bench proof_criterion