roc/.github/workflows/benchmarks.yml
ayazhafiz d4d8f6d902 Turn on concurrency groups for GitHub CI
This ensures that we only one set of workflows is running for an active
GH ref (usually a PR). Stale workflows will be term'd when a new one
associated with the same PR is kicked off.

See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
2022-04-19 21:21:11 -04:00

48 lines
1.2 KiB
YAML

on: [pull_request]
name: Benchmarks
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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@v2
with:
ref: "trunk"
clean: "true"
- name: Earthly version
run: earthly --version
- name: on trunk; prepare a self-contained benchmark folder
run: ./ci/safe-earthly.sh --build-arg BENCH_SUFFIX=trunk +prep-bench-folder
- uses: actions/checkout@v2
with:
clean: "false" # we want to keep the benchmark folder
- name: on current branch; prepare a self-contained benchmark folder
run: ./ci/safe-earthly.sh +prep-bench-folder
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: build benchmark runner
run: cd ci/bench-runner && cargo build --release && cd ../..
- name: run benchmarks with regression check
run: ./ci/bench-runner/target/release/bench-runner --check-executables-changed