Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/codspeed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CodSpeed

on:
push:
branches:
- "main"
- "codspeed"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
codspeed:
name: Run benchmarks
runs-on: warp-ubuntu-latest-x64-32x
env:
# Set features for the Makefile
FEATURES: ${{ matrix.features }}
RUSTFLAGS: "-Awarnings"
strategy:
matrix:
toolchain:
- stable
features:
- ""
steps:
- uses: actions/checkout@v4

- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}

- name: Download builder playground
uses: flashbots/flashbots-toolchain@v0.1
with:
builder-playground: v0.1.3

# https://github.com/swatinem/rust-cache
- name: Run Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

# https://github.com/Mozilla-Actions/sccache-action
- name: Run sccache-action
uses: mozilla-actions/sccache-action@v0.0.9

- name: Set sccache env vars
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV

- name: Build the rbuilder
run: cargo build --features="${{ matrix.features }}"

- name: Run the playground
run: builder-playground &

- name: Install codspeed
run: cargo install cargo-codspeed

- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 256

- name: Build the benchmark target(s)
run: cargo codspeed build --package rbuilder

- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
Loading