roc/.github/workflows/benchmarks.yml
2024-01-27 10:57:53 -05:00

38 lines
1.0 KiB
YAML

on:
workflow_call:
name: Benchmarks
env:
RUST_BACKTRACE: 1
ROC_NUM_WORKERS: 1
jobs:
prep-dependency-container:
name: benchmark roc programs
runs-on: [self-hosted, i7-6700K]
timeout-minutes: 60
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
with:
ref: "main"
clean: "true"
- name: on main; prepare a self-contained benchmark folder
run: nix develop -c ./ci/benchmarks/prep_folder.sh main
- uses: actions/checkout@v4
with:
clean: "false" # we want to keep the benchmark folder
- name: on current branch; prepare a self-contained benchmark folder
run: nix develop -c ./ci/benchmarks/prep_folder.sh branch
- name: build benchmark runner
run: nix develop -c bash -c "cd ci/benchmarks/bench-runner && cargo build --release && cd ../../.."
- name: run benchmarks with regression check
run: nix develop -c ./ci/benchmarks/bench-runner/target/release/bench-runner --check-executables-changed