From b282a907f6641e346161ab5d76988d9fdb56c308 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Thu, 23 Apr 2026 17:13:06 +0100 Subject: [PATCH] ci: use `setup-python` install so codspeed builds flamegraphs correctly --- .github/workflows/benches.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benches.yml b/.github/workflows/benches.yml index 7b7275cdeb2..44307da58ac 100644 --- a/.github/workflows/benches.yml +++ b/.github/workflows/benches.yml @@ -20,9 +20,14 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: astral-sh/setup-uv@v7 with: - # codspeed action needs to be run from within the final Python environment - activate-environment: true 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