surrealpatch/.github/workflows/bench.yml

54 lines
1.1 KiB
YAML
Raw Normal View History

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
2023-09-06 13:51:33 +00:00
uses: dtolnay/rust-toolchain@stable
2023-08-24 16:33:57 +00:00
with:
toolchain: 1.71.1
- 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
2023-09-06 13:51:33 +00:00
run: cargo install --debug cargo-make
- name: Benchmark baseline
2023-09-06 13:51:33 +00:00
run: cargo make bench-baseline
- name: Checkout changes
uses: actions/checkout@v3
- name: Benchmark changes
2023-09-06 13:51:33 +00:00
run: cargo make bench-changes
- name: Benchmark results
2023-09-06 13:51:33 +00:00
run: cargo make bench-compare
- name: Save results as artifact
uses: actions/upload-artifact@v1
with:
name: Benchmark Results
path: benchmark_results