Skip to content

Commit 44d545a

Browse files
committed
[CI] Add on-demand job size benchmark workflow
1 parent 6d2b4dd commit 44d545a

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Job Size Benchmark
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
sizes:
7+
description: "Comma-separated parallel job sizes to measure"
8+
required: false
9+
default: "10,20,40,60,80,100"
10+
11+
env:
12+
COMPOSER_ROOT_VERSION: "dev-main"
13+
14+
jobs:
15+
jobsize_benchmark:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 20
18+
19+
steps:
20+
- uses: actions/checkout@v5
21+
22+
-
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: 8.4
26+
coverage: none
27+
28+
- run: composer install --no-progress --ansi
29+
30+
# measures Rector wall time across parallel job sizes, results land in the job summary
31+
- run: php scripts/rector-jobsize-benchmark.php --bin=bin/rector --sizes=${{ inputs.sizes }} | tee results.txt
32+
33+
- run: cat results.txt >> "$GITHUB_STEP_SUMMARY"
34+
if: always()
35+
36+
-
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: jobsize-benchmark-results
41+
path: results.txt

0 commit comments

Comments
 (0)