Skip to content

Daily benchmark

Daily benchmark #22

Workflow file for this run

name: Daily
on:
# Run daily at midnight.
schedule:
- cron: 0 0 * * *
# Run whenever this workflow is changed.
push:
branches: [main]
# Allow running manually.
workflow_dispatch:
env:
# Force colorful output, even though we're running in Github Actions.
CARGO_TERM_COLOR: always
jobs:
bench:
name: Bench
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: bevy
steps:
- name: Checkout Bevy
uses: actions/checkout@v4
with:
repository: bevyengine/bevy
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache build files
uses: Leafwing-Studios/cargo-cache@v1
with:
cargo-target-dir: benches/target
- name: Install Bencher
uses: bencherdev/[email protected]
- name: Run benchmarks
working-directory: benches
run: cargo bench -- 2>&1 | tee results.txt
- name: Upload benchmarks
env:
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
run: |
bencher run \
--branch main \
--testbed github-actions \
--adapter rust_criterion \
--err \
--file benches/results.txt