forked from shotover/shotover-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.1 KB
/
bench_run.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: MicroBenchmarks
on:
push:
branches:
- "main"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
# this line means that only the main branch writes to the cache
# benefits:
# * prevents main branch caches from being evicted in favor of a PR cache
# * saves about 1min per workflow by skipping the actual cache write
# downsides:
# * PRs that update rust version or changes deps will be slow to iterate on due to changes not being cached.
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed
- name: Build the benchmark target(s)
run: cargo codspeed build --features alpha-transforms
- name: Run the benchmarks
uses: CodSpeedHQ/action@v2
with:
run: cargo codspeed run