Rust library to generate static websites
1name: CodSpeed
2
3on:
4 push:
5 branches:
6 - "main"
7 paths:
8 - "crates/**"
9 - "benchmarks/**"
10 - "Cargo.toml"
11 - "Cargo.lock"
12 pull_request:
13 paths:
14 - "crates/**"
15 - "benchmarks/**"
16 - "Cargo.toml"
17 - "Cargo.lock"
18 workflow_dispatch:
19
20env:
21 CODSPEED: true
22
23jobs:
24 benchmarks:
25 name: Run benchmarks
26 runs-on: ubuntu-latest
27 steps:
28 - uses: actions/checkout@v4
29
30 - name: Setup rust toolchain, cache and cargo-codspeed binary
31 uses: moonrepo/setup-rust@v1
32 with:
33 channel: stable
34 cache-target: release
35 bins: cargo-codspeed
36
37 - name: Setup pnpm
38 uses: pnpm/action-setup@v4
39
40 - name: Setup Node.js
41 uses: actions/setup-node@v4
42 with:
43 node-version: latest
44 cache: 'pnpm'
45
46 - name: Install dependencies
47 run: pnpm install
48
49 - name: Build JS dependencies
50 run: cargo xtask build-js
51
52 - name: Build the benchmark target(s)
53 run: cargo codspeed build
54
55 - name: Run the benchmarks
56 uses: CodSpeedHQ/action@v3
57 with:
58 run: cargo codspeed run
59 token: ${{ secrets.CODSPEED_TOKEN }}