-
Notifications
You must be signed in to change notification settings - Fork 962
53 lines (44 loc) · 1.47 KB
/
benches.yml
File metadata and controls
53 lines (44 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: benches
on:
push:
branches:
- "main"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}-benches
cancel-in-progress: true
env:
UV_PYTHON: "3.14t"
jobs:
benchmarks:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.0.2
- uses: astral-sh/setup-uv@v7
with:
save-cache: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
# Using this action is still necessary for CodSpeed to build flamegraphs correctly,
# see note about setup-python in https://codspeed.io/docs/benchmarks/python#recipes
- uses: actions/setup-python@v6
with:
python-version: ${{ env.UV_PYTHON }}
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
pyo3-benches
save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
cache-all-crates: "true"
cache-workspace-crates: "true"
- uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
run: uvx nox -s codspeed
token: ${{ secrets.CODSPEED_TOKEN }}
mode: simulation