2020-03-14 14:05:10 +00:00
|
|
|
name: Benchmark
|
2020-03-05 01:20:05 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
types: [opened, reopened, synchronize]
|
2021-05-25 22:42:55 +00:00
|
|
|
concurrency:
|
|
|
|
group: benchmark-${{ github.head_ref }}
|
|
|
|
cancel-in-progress: true
|
2020-03-05 01:20:05 +00:00
|
|
|
jobs:
|
2020-11-28 00:50:18 +00:00
|
|
|
benchmark:
|
|
|
|
name: Benchmark
|
2020-03-05 01:20:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-04-10 10:31:46 +00:00
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-05-25 22:42:55 +00:00
|
|
|
profile: minimal
|
2020-04-10 10:31:46 +00:00
|
|
|
toolchain: stable
|
2021-05-25 22:42:55 +00:00
|
|
|
override: true
|
2020-04-10 10:31:46 +00:00
|
|
|
- name: Checkout base
|
2020-03-05 01:20:05 +00:00
|
|
|
uses: actions/checkout@v2
|
2020-04-10 10:31:46 +00:00
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
- name: Bench base
|
2020-04-25 19:21:54 +00:00
|
|
|
run: cargo bench -- --output-format bencher | tee output.txt
|
2020-04-10 10:31:46 +00:00
|
|
|
- name: Save base benchmark
|
|
|
|
uses: pksunkara/github-action-benchmark@v1
|
2020-03-05 01:20:05 +00:00
|
|
|
with:
|
|
|
|
tool: cargo
|
|
|
|
output-file-path: output.txt
|
2020-04-10 10:31:46 +00:00
|
|
|
external-data-json-path: ./benchmark-data.json
|
|
|
|
read-commit-id: true
|
|
|
|
- name: Checkout pull request
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
- name: Bench pull request
|
2020-04-25 19:21:54 +00:00
|
|
|
run: cargo bench -- --output-format bencher | tee output.txt
|
2020-04-10 10:31:46 +00:00
|
|
|
- name: Compare benchmarks
|
2020-04-13 00:36:08 +00:00
|
|
|
uses: pksunkara/github-action-benchmark@v2
|
2020-03-14 14:05:10 +00:00
|
|
|
with:
|
|
|
|
tool: cargo
|
|
|
|
output-file-path: output.txt
|
2020-04-10 10:31:46 +00:00
|
|
|
external-data-json-path: ./benchmark-data.json
|
2020-03-14 14:05:10 +00:00
|
|
|
github-token: ${{ github.token }}
|
2020-04-13 00:36:08 +00:00
|
|
|
annotate-always: true
|