Skip to content

build(deps): bump the actions-deps group with 2 updates (#371) #68

build(deps): bump the actions-deps group with 2 updates (#371)

build(deps): bump the actions-deps group with 2 updates (#371) #68

name: Base Benchmarks
on:
push:
branches: [main, release-v*]
# If new code is pushed to a PR branch, then cancel in progress workflows for
# that PR. Ensures that we don't waste CI time, and returns results quicker.
# https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
benchmark:
name: "Continuous Benchmarking: ${{ matrix.suite }}"
runs-on: ubuntu-latest
permissions:
checks: write
strategy:
fail-fast: false
matrix:
suite:
- historic_scanning
- latest_events_scanning
steps:
- name: Harden runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@908c540300062bd5a7e473851cdb4282204cee09 # v1.9.1
with:
# Pin to the anvil version used to generate benches/dumps/state_*.json.gz
# (see anvil_version in benches/dumps/state_*.metadata.json). Anvil's
# state-dump JSON is not version-compatible: loading a dump with a
# different version fails with SerializableTransactionType / missing
# field errors. Bump this together with the regenerated dump files.
version: v1.7.0
- name: Setup Bencher
# Official docs recommend using `main` commit, because discrepancies between CI version and Bencher's API version
# can cause bench failures.
# https://bencher.dev/docs/how-to/github-actions/
uses: bencherdev/bencher@main
- name: Prepare benchmark state
run: |
gunzip -kf benches/dumps/*.json.gz
ls -lh benches/dumps/
- name: Run benchmark
env:
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_PROJECT: ${{ vars.BENCHER_PROJECT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bencher run \
--project "$BENCHER_PROJECT" \
--token "$BENCHER_API_TOKEN" \
--branch main \
--testbed ubuntu-latest \
--adapter rust_criterion \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--github-actions "$GITHUB_TOKEN" \
--err \
"cargo bench --bench ${{ matrix.suite }} --features bench-utils"