-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.18 KB
/
codspeed.yml
File metadata and controls
52 lines (43 loc) · 1.18 KB
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
50
51
52
name: CodSpeed Benchmarks
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
benchmarks:
name: Run benchmarks
runs-on: codspeed-macro
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: cargo-registry-${{ runner.arch }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-${{ runner.arch }}-
- name: Cache target directory
uses: actions/cache@v4
with:
path: target
key: cargo-target-${{ runner.arch }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-target-${{ runner.arch }}-
- name: Install cargo-codspeed
run: cargo install cargo-codspeed --locked
- name: Build benchmarks
run: cargo codspeed build
- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: walltime
run: cargo codspeed run