From 648c5520969736e8ab3ff63afb5066e657600e86 Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Mon, 26 Jan 2026 13:54:32 +0100 Subject: [PATCH 1/3] only run codspeed benchmarks on PRs labelled 'benchmark' --- .github/workflows/codspeed.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index c9c2f7b4c1..278c8fa877 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -5,6 +5,7 @@ on: branches: - "main" pull_request: + types: [labeled, synchronize] # `workflow_dispatch` allows CodSpeed to trigger backtest # performance analysis in order to generate initial data. workflow_dispatch: @@ -16,6 +17,11 @@ jobs: benchmarks: name: Run benchmarks runs-on: codspeed-macro + # Only run benchmarks for: pushes to main, manual triggers, or PRs with 'benchmark' label + if: | + github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'benchmark')) steps: - uses: actions/checkout@v6 with: From abb4987d4a60517759441b4f341dcdf892403bd0 Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Mon, 26 Jan 2026 13:55:58 +0100 Subject: [PATCH 2/3] changelog --- changes/3668.misc.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/3668.misc.md diff --git a/changes/3668.misc.md b/changes/3668.misc.md new file mode 100644 index 0000000000..83643f5d3c --- /dev/null +++ b/changes/3668.misc.md @@ -0,0 +1 @@ +Benchmark CI now only runs for PRs with the `benchmark` label, reducing CodSpeed credit usage. From 32fabc1228a5b06703e118955369cf68ba78127a Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Mon, 26 Jan 2026 13:56:52 +0100 Subject: [PATCH 3/3] rename changelog --- changes/{3668.misc.md => 3673.misc.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changes/{3668.misc.md => 3673.misc.md} (100%) diff --git a/changes/3668.misc.md b/changes/3673.misc.md similarity index 100% rename from changes/3668.misc.md rename to changes/3673.misc.md