os/.github/workflows/benchmark.yml

41 lines
975 B
YAML

name: Benchmark Performance
on:
push:
branches: [ main, develop ]
paths:
- 'bootloader/**'
- 'kernel/**'
- 'benchmarks/**'
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
env:
CARGO_TERM_COLOR: always
jobs:
benchmark:
name: Performance Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Run benchmarks
run: cargo bench --all --all-features --verbose
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: target/criterion/output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true