63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
name: Benchmark
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
bench:
|
|
name: Bench library
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install stable toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get -qq -y update
|
|
cargo install --quiet critcmp
|
|
|
|
- name: Checkout baseline
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.base_ref }}
|
|
|
|
- name: Install cargo-make
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: install
|
|
args: --debug cargo-make
|
|
|
|
- name: Benchmark baseline
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: make
|
|
args: bench-baseline
|
|
|
|
- name: Checkout changes
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Benchmark changes
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: make
|
|
args: bench-changes
|
|
|
|
- name: Benchmark results
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: make
|
|
args: bench-compare
|
|
|
|
- name: Save results as artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: Benchmark Results
|
|
path: benchmark_results
|