Skip to content

Commit 87d2ce0

Browse files
Add CodSpeed continuous performance testing
1 parent b867f8c commit 87d2ce0

6 files changed

Lines changed: 249 additions & 58 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CodSpeed
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- .cargo/config.toml
10+
- .github/workflows/codspeed.yml
11+
- crates/**
12+
- legacy/**
13+
- Cargo.lock
14+
- Cargo.toml
15+
- rust-toolchain.toml
16+
# `workflow_dispatch` allows CodSpeed to trigger backtest
17+
# performance analysis in order to generate initial data.
18+
workflow_dispatch:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
permissions:
25+
contents: read
26+
id-token: write
27+
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
jobs:
32+
codspeed:
33+
name: Benchmarks
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v6
37+
38+
- uses: moonrepo/setup-rust@v1
39+
with:
40+
bins: cargo-codspeed
41+
cache: false
42+
43+
- name: Build the benchmark targets
44+
run: cargo codspeed build -p moon_affected -p moon_workspace
45+
46+
- name: Run the benchmarks
47+
uses: CodSpeedHQ/action@v4
48+
with:
49+
mode: simulation
50+
run: cargo codspeed run

0 commit comments

Comments
 (0)