roc/.github/workflows/benchmarks.yml
2021-06-09 19:56:40 +02:00

42 lines
1.3 KiB
YAML

on: [pull_request]
name: Benchmarks
env:
RUST_BACKTRACE: 1
jobs:
prep-dependency-container:
name: cd cli; cargo criterion
runs-on: [self-hosted, i7-6700K]
timeout-minutes: 60
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v2
with:
ref: "5e4fc1dc2fed40fe9f04fbc0797da99090e8bf49" # benchmarking on trunk first in order to compare results
clean: "true"
- name: Earthly version
run: earthly --version
- name: on trunk; prepare a self-contained benchmark folder
run: earthly --config ci/earthly-conf.yml --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: earthly --config ci/earthly-conf.yml +prep-bench-folder
- name: benchmark trunk
run: cd bench-folder-trunk && ./target/release/deps/time_bench --bench
- name: move benchmark results so they can be compared later
run: cd .. && cp bench-folder-trunk/target/criterion bench-folder-branch/target/
- name: benchmark current branch
run: cd bench-folder-branch && ./target/release/deps/time_bench --bench