Skip to content

Commit cfc78a0

Browse files
authored
chore: Add CI benchmark on merge (#19518)
1 parent a1e41b1 commit cfc78a0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/benchmark-remote.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ name: Remote Benchmark
22

33
on:
44
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'main'
58
pull_request:
69
types: [ labeled ]
710

811
concurrency:
912
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.event.label.name == 'needs-bench' }}
1114

1215
env:
1316
SCALE_FACTOR: '10.0'
1417

1518
jobs:
1619
main:
17-
if: ${{ github.event.label.name == 'needs-bench' }}
20+
if: ${{ github.ref == 'refs/heads/main' || github.event.label.name == 'needs-bench' }}
1821
runs-on: self-hosted
1922
steps:
2023
- uses: actions/checkout@v4
@@ -63,3 +66,9 @@ jobs:
6366
working-directory: polars-benchmark
6467
run: |
6568
make run-polars-no-env
69+
70+
- name: Cache the Polars build
71+
if: ${{ github.ref == 'refs/heads/main' }}
72+
working-directory: py-polars
73+
run: |
74+
"$HOME/py-polars-cache/cache-build.sh" "$PWD/polars"

0 commit comments

Comments
 (0)