Skip to content

Commit baf343b

Browse files
committed
Second try
1 parent 4cfe211 commit baf343b

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

.github/workflows/codspeed.yaml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,56 @@ name: CodSpeed
33
on:
44
push:
55
branches:
6-
- "develop"
7-
- "codspeed"
8-
# Run on pull requests
6+
- "main"
7+
- "codspeed"
98
pull_request:
109
# `workflow_dispatch` allows CodSpeed to trigger backtest
1110
# performance analysis in order to generate initial data.
1211
workflow_dispatch:
1312

1413
jobs:
15-
benchmarks:
14+
codspeed:
1615
name: Run benchmarks
1716
runs-on: ubuntu-latest
1817
steps:
1918
- uses: actions/checkout@v4
2019

21-
- name: Setup rust toolchain
20+
- name: Setup rust toolchain
2221
uses: dtolnay/rust-toolchain@stable
2322
with:
2423
toolchain: ${{ matrix.toolchain }}
2524

26-
- name: Run benchmarks
25+
- name: Download builder playground
26+
uses: flashbots/[email protected]
27+
with:
28+
builder-playground: v0.1.3
29+
30+
# https://github.com/swatinem/rust-cache
31+
- name: Run Swatinem/rust-cache@v2
32+
uses: Swatinem/rust-cache@v2
33+
with:
34+
cache-on-failure: true
35+
36+
# https://github.com/Mozilla-Actions/sccache-action
37+
- name: Run sccache-action
38+
uses: mozilla-actions/[email protected]
39+
40+
- name: Set sccache env vars
41+
run: |
42+
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
43+
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
44+
45+
- name: Build the rbuilder
46+
run: cargo build --features="${{ matrix.features }}"
47+
48+
- name: Run the playground
49+
run: builder-playground &
50+
51+
- name: Build the benchmark target(s)
52+
run: cargo codspeed build
53+
54+
- name: Run the benchmarks
2755
uses: CodSpeedHQ/action@v3
2856
with:
57+
run: cargo codspeed run
2958
token: ${{ secrets.CODSPEED_TOKEN }}
30-
run: "cargo bench"

0 commit comments

Comments
 (0)