Skip to content

Commit 46f0713

Browse files
author
Gunter Schmidt
committed
Fix: Codspeed benchmark test
1 parent 3c493f6 commit 46f0713

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# spell-checker:ignore backtest moonrepo
2+
13
name: CodSpeed
24

35
on:
@@ -17,8 +19,19 @@ jobs:
1719
codspeed:
1820
name: Run benchmarks
1921
runs-on: ubuntu-latest
22+
env:
23+
CARGO_INCREMENTAL: 0
24+
strategy:
25+
matrix:
26+
type: [simulation, memory]
27+
package: [
28+
uu_cmp,
29+
uu_diff,
30+
]
2031
steps:
21-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
33+
with:
34+
persist-credentials: false
2235

2336
- name: Setup rust toolchain, cache and cargo-codspeed binary
2437
uses: moonrepo/setup-rust@v1
@@ -27,11 +40,20 @@ jobs:
2740
cache-target: release
2841
bins: cargo-codspeed
2942

30-
- name: Build the benchmark target(s)
31-
run: cargo codspeed build -m simulation
43+
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
44+
shell: bash
45+
run: |
46+
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
47+
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
3248
33-
- name: Run the benchmarks
49+
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
3450
uses: CodSpeedHQ/action@v4
51+
env:
52+
CODSPEED_LOG: debug
3553
with:
36-
mode: simulation
37-
run: cargo codspeed run
54+
mode: ${{ matrix.type }}
55+
run: |
56+
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
57+
cargo codspeed run -p ${{ matrix.package }} > /dev/null
58+
token: ${{ secrets.CODSPEED_TOKEN }}
59+

0 commit comments

Comments
 (0)