Skip to content

Commit 565e857

Browse files
committed
Add codspeed
1 parent d9d3f52 commit 565e857

6 files changed

Lines changed: 680 additions & 0 deletions

File tree

.github/workflows/codspeed.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CodSpeed Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
# `workflow_dispatch` allows CodSpeed to trigger backtest
9+
# performance analysis in order to generate initial data.
10+
workflow_dispatch:
11+
12+
env:
13+
CODSPEED_PERF_ENABLED: false
14+
15+
permissions:
16+
contents: read # required for actions/checkout
17+
id-token: write # required for OIDC authentication with CodSpeed
18+
19+
jobs:
20+
benchmarks:
21+
name: Run benchmarks
22+
runs-on: codspeed-macro
23+
24+
steps:
25+
- uses: actions/checkout@v6
26+
- uses: dtolnay/rust-toolchain@stable
27+
with:
28+
targets: wasm32-unknown-unknown
29+
- name: Install LLVM
30+
uses: ZhongRuoyu/setup-llvm@ec41d6e5f3c15c96fa642a49c6e7effac6261778
31+
with:
32+
# Rustc v1.93
33+
llvm-version: 21
34+
- name: Install TSC
35+
if: runner.os == 'macOS'
36+
run: npm install -g typescript
37+
- name: Update Node.js
38+
if: runner.os == 'Linux' || runner.os == 'macOS'
39+
uses: actions/setup-node@v6
40+
with:
41+
node-version: latest
42+
- run: |
43+
cd client
44+
cargo bench --workspace
45+
- name: Upload benchmark results
46+
uses: CodSpeedHQ/action@v4
47+
with:
48+
mode: walltime
49+
run: cargo run --manifest-path common/wcodspeed/Cargo.toml client/target/jbg_benchmark.json

common/wcodspeed/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

0 commit comments

Comments
 (0)