-
-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (45 loc) · 1.39 KB
/
Copy pathbench.yml
File metadata and controls
53 lines (45 loc) · 1.39 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
53
name: bench
on:
pull_request:
paths:
- ".github/workflows/bench.yml"
- "crates/**"
- "Cargo.lock"
- "Cargo.toml"
push:
branches: [main]
paths:
- ".github/workflows/bench.yml"
- "crates/**"
- "Cargo.lock"
- "Cargo.toml"
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659
with:
toolchain: stable
- name: Cache corpus
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: crates/djls-testing/.corpus
key: ${{ runner.os }}-corpus-${{ hashFiles('crates/djls-testing/manifest.lock') }}
restore-keys: |
${{ runner.os }}-corpus-
- name: Sync corpus
run: cargo run -q -p djls-testing --bin corpus -- sync
- run: cargo install cargo-codspeed --locked
- name: Build the benchmark target(s)
run: cargo codspeed build -p djls-bench
- name: Run the benchmarks
uses: CodSpeedHQ/action@a4a36bb07c0638b0b4ca52bf1f3dad1b4289e52f
with:
mode: simulation
run: cargo codspeed run -p djls-bench