pyo3/.github/workflows/benches.yml

44 lines
1 KiB
YAML
Raw Normal View History

2023-08-29 06:26:36 +00:00
name: benches
on:
push:
branches:
- "main"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}-benches
cancel-in-progress: true
2023-08-29 06:26:36 +00:00
jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
2023-08-29 06:26:36 +00:00
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
2023-08-29 06:26:36 +00:00
- uses: Swatinem/rust-cache@v2
2023-08-29 06:26:36 +00:00
with:
workspaces: |
.
pyo3-benches
2023-08-29 06:26:36 +00:00
continue-on-error: true
- name: Install cargo-codspeed
run: cargo install cargo-codspeed
- name: Install nox
run: pip install nox
- name: Run the benchmarks
2023-12-04 19:03:56 +00:00
uses: CodSpeedHQ/action@v2
2023-08-29 06:26:36 +00:00
with:
run: nox -s codspeed
token: ${{ secrets.CODSPEED_TOKEN }}