-
-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (42 loc) · 1.18 KB
/
codspeed.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CodSpeed Benchmarks
on:
pull_request:
push:
branches:
- main
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
Benchmarks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.toml') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Setup Rust
run: |
rustup update nightly --no-self-update
rustup default nightly
- name: Install cargo-codspeed (with cache)
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-codspeed
- name: Build the benchmark target(s)
run: cargo codspeed build --features half
- uses: CodSpeedHQ/action@v3
name: Run benchmarks
with:
run: cargo codspeed run