Skip to content

Commit 315901a

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

File tree

4 files changed

+368
-97
lines changed

4 files changed

+368
-97
lines changed

.github/workflows/benchmark.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Codspeed
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: actions/checkout@v5
25+
26+
- name: Setup Rust
27+
uses: dtolnay/rust-toolchain@stable
28+
with:
29+
targets: x86_64-unknown-linux-gnu
30+
31+
- uses: actions/setup-node@v5
32+
with:
33+
node-version: 22
34+
cache: 'yarn'
35+
- name: Install dependencies
36+
run: yarn install
37+
- name: Download fixtures
38+
run: node download-fixtures.js
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- uses: taiki-e/install-action@v2
43+
with:
44+
tool: cargo-codspeed
45+
46+
- name: Build benchmark
47+
run: cargo codspeed build
48+
49+
- name: Run benchmark
50+
uses: CodSpeedHQ/action@v4
51+
timeout-minutes: 15
52+
with:
53+
run: cargo codspeed run
54+
mode: instrumentation
55+
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)