Skip to content

Commit b8f71f1

Browse files
committed
ci: add benchmark
1 parent 5076c7a commit b8f71f1

File tree

4 files changed

+354
-97
lines changed

4 files changed

+354
-97
lines changed

.github/workflows/benchmark.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Benchmark
2+
3+
permissions: {}
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
13+
cancel-in-progress: true
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
jobs:
20+
benchmark:
21+
name: Benchmark
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: taiki-e/checkout-action@v1
25+
26+
- uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.2
27+
with:
28+
cache-key: benchmark
29+
save-cache: ${{ github.ref_name == 'main' }}
30+
tools: cargo-codspeed
31+
32+
- name: Build benchmark
33+
run: cargo codspeed build
34+
35+
- name: Run benchmark
36+
uses: CodSpeedHQ/action@v4
37+
timeout-minutes: 15
38+
with:
39+
run: cargo codspeed run
40+
mode: instrumentation
41+
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)