Skip to content

Update CodSpeedHQ/action action to v4.19.1 #684

Update CodSpeedHQ/action action to v4.19.1

Update CodSpeedHQ/action action to v4.19.1 #684

Workflow file for this run

# This workflow is based on the example provided by CodSpeedHQ
# See https://codspeed.io/docs/guides/how-to-benchmark-rust-code
name: CodSpeed Benchmarks
on:
push:
branches:
- "main"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
permissions: # optional for public repositories
contents: read # required for actions/checkout
id-token: write # required for OIDC authentication with CodSpeed
# Cancel running jobs for the same workflow and branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
with:
channel: stable
cache-target: release
bins: cargo-codspeed
- name: Build the benchmark target(s)
run: cargo codspeed build -p dtl_benchmark
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Install dependencies
run: uv sync --dev
- name: Run the benchmarks
uses: CodSpeedHQ/action@f22792bfac16f3e14eb9fbea76f4a48e9cc22b93 # v4.19.1
with:
mode: simulation
run: |
cargo codspeed run -p dtl_benchmark
uv run pytest tests/ --codspeed