-
-
Notifications
You must be signed in to change notification settings - Fork 481
62 lines (54 loc) · 1.48 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Benchmarks
on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize ]
branches:
- main
- next
paths:
- 'Cargo.lock'
- 'crates/**_parser/**/*.rs'
- 'crates/**_formatter/**/*.rs'
- 'crates/**_analyze/**/*.rs'
- 'crates/biome_grit_patterns/**/*.rs'
push:
branches:
- main
- next
paths:
- 'Cargo.lock'
- 'crates/**_parser/**/*.rs'
- 'crates/**_formatter/**/*.rs'
- 'crates/**_analyze/**/*.rs'
- 'crates/biome_grit_patterns/**/*.rs'
env:
RUST_LOG: info
jobs:
bench:
permissions:
pull-requests: write
name: Bench
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ steps.sha.outputs.result }}
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
channel: stable
cache-target: release
bins: cargo-codspeed
cache-base: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compile
run: cargo codspeed build --features codspeed -p xtask_bench
- name: Run the benchmarks
uses: CodSpeedHQ/action@fa1dcde8d58f2ab0b407a6a24d6cc5a8c1444a8c # v3.1.0
timeout-minutes: 30
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}