Skip to content

build(deps): bump brace-expansion from 1.1.12 to 1.1.13 in /book #342

build(deps): bump brace-expansion from 1.1.12 to 1.1.13 in /book

build(deps): bump brace-expansion from 1.1.12 to 1.1.13 in /book #342

Workflow file for this run

name: Benchmarks
on:
pull_request:
types:
- labeled
env:
CARGO_TERM_COLOR: always
jobs:
bench:
runs-on: ubuntu-latest
name: Run benchmarks
if: github.event.label.name == 'benchmark'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Load versions
id: versions
uses: ./.github/actions/load-versions
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ steps.versions.outputs.rust-msrv }}
- name: Install dependencies
run: |
set -x
cargo install cargo-criterion
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml_version: ${{ steps.versions.outputs.ocaml-version }}
# - name: Run iai bench
# run: |
# set -x
# cargo bench -p kimchi --bench proof_iai > iai_bench
# cat iai_bench
- name: Run criterion bench
run: |
set -x
eval $(opam env)
cargo criterion -p kimchi --bench proof_criterion --color never > criterion_bench 2>&1
cat criterion_bench
- name: Write result in PR
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');
// read the output file
// const iai_bench = fs.readFileSync("iai_bench", {encoding:'utf8', flag:'r'});
const criterion_bench = fs.readFileSync("criterion_bench", {encoding:'utf8', flag:'r'});
// form message
const message = `Hello there👋
Here are some benchmark results using [criterion](https://bheisler.github.io/criterion.rs/). Keep in mind that since this runs in CI, it is not really accurate (as it depends on the host load)
<pre><code>${criterion_bench}</code></pre>`;
/*
const iai = `Here's some more accurate benchmark with [iai](https://github.com/bheisler/iai)
<pre><code>${iai_bench}</code></pre>`;
*/
// post comment
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: message
})