-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 943 Bytes
/
benchmark.yml
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
name: Benchmark
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- '**/*.rs'
- 'Cargo.lock'
- 'rust-toolchain.toml'
push:
branches:
- main
paths:
- '**/*.rs'
- 'Cargo.lock'
- 'rust-toolchain.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: Boshen/setup-rust@main
with:
save-cache: ${{ github.ref_name == 'main' }}
tools: cargo-codspeed
- name: Build Benchmark
run: cargo codspeed build --features codspeed
- name: Run benchmark
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}