Skip to content

Commit 98f4187

Browse files
CopilotBoshenactions-user
authored
Add CI workflow to auto-update rolldown stats on main branch changes (#27)
* Initial plan * Initial exploration: understand rolldown stats command and current CI setup Co-authored-by: Boshen <[email protected]> * Add GitHub Actions workflow to update rolldown stats on PRs Co-authored-by: Boshen <[email protected]> * Clean up backup file and add dashboard documentation about rolldown stats Co-authored-by: Boshen <[email protected]> * chore: update rolldown version stats * Update workflow to trigger on main branch and use Boshen's git config Co-authored-by: Boshen <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Boshen <[email protected]> Co-authored-by: GitHub Action <[email protected]>
1 parent 6cc9ca5 commit 98f4187

File tree

3 files changed

+116
-37
lines changed

3 files changed

+116
-37
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Update Rolldown Stats
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'apps/dashboard/**'
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
update-stats:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v5
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
fetch-depth: 0
22+
23+
- name: Setup Node.js LTS
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 'lts/*'
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
33+
- name: Get pnpm store directory
34+
shell: bash
35+
run: |
36+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
37+
38+
- name: Setup pnpm cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ env.STORE_PATH }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
46+
- name: Install dependencies
47+
run: pnpm install --frozen-lockfile
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Run rolldown stats collection
52+
run: pnpm rolldown:stats
53+
54+
- name: Check for changes
55+
id: git-check
56+
run: |
57+
if git diff --exit-code rolldown-version-stats.json; then
58+
echo "No changes detected in rolldown-version-stats.json"
59+
echo "changes=false" >> $GITHUB_OUTPUT
60+
else
61+
echo "Changes detected in rolldown-version-stats.json"
62+
echo "changes=true" >> $GITHUB_OUTPUT
63+
fi
64+
65+
- name: Commit and push changes
66+
if: steps.git-check.outputs.changes == 'true'
67+
run: |
68+
git config --local user.email "[email protected]"
69+
git config --local user.name "Boshen"
70+
git add rolldown-version-stats.json
71+
git commit -m "chore: update rolldown version stats"
72+
git push origin main
73+
74+
- name: No changes to commit
75+
if: steps.git-check.outputs.changes != 'true'
76+
run: echo "No changes were detected in rolldown-version-stats.json, skipping commit."

apps/dashboard/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ pnpm lint
2626

2727
To customize the configuration, edit `.oxlintrc.json`. Oxlint supports most ESLint configuration options.
2828

29+
## Rolldown Stats Integration
30+
31+
This dashboard displays build statistics from different rolldown versions, automatically updated via CI when changes are made to the dashboard code.
2932

rolldown-version-stats.json

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[
22
{
33
"version": "7.1.0",
4-
"timestamp": "2025-08-25T04:10:30.355Z",
4+
"timestamp": "2025-08-25T06:57:57.569Z",
55
"files": [
66
{
77
"path": "assets/index-DD-rq4eS.css",
88
"size": 2812,
99
"type": "css"
1010
},
1111
{
12-
"path": "assets/index-xJMNECRy.js",
13-
"size": 564642,
12+
"path": "assets/index-DmHmC5BH.js",
13+
"size": 566655,
1414
"type": "js"
1515
},
1616
{
@@ -24,24 +24,24 @@
2424
"type": "other"
2525
}
2626
],
27-
"totalSize": 569457,
27+
"totalSize": 571470,
2828
"totalGzipSize": 0,
29-
"buildTime": 1741
29+
"buildTime": 3326
3030
},
3131
{
3232
"version": "7.1.1",
33-
"timestamp": "2025-08-25T04:10:33.181Z",
33+
"timestamp": "2025-08-25T06:58:02.241Z",
3434
"files": [
35+
{
36+
"path": "assets/index-C3ViWK1P.js",
37+
"size": 566643,
38+
"type": "js"
39+
},
3540
{
3641
"path": "assets/index-DD-rq4eS.css",
3742
"size": 2812,
3843
"type": "css"
3944
},
40-
{
41-
"path": "assets/index-xMD4_U6M.js",
42-
"size": 564629,
43-
"type": "js"
44-
},
4545
{
4646
"path": "index.html",
4747
"size": 506,
@@ -53,24 +53,24 @@
5353
"type": "other"
5454
}
5555
],
56-
"totalSize": 569444,
56+
"totalSize": 571458,
5757
"totalGzipSize": 0,
58-
"buildTime": 1511
58+
"buildTime": 2937
5959
},
6060
{
6161
"version": "7.1.2",
62-
"timestamp": "2025-08-25T04:10:36.031Z",
62+
"timestamp": "2025-08-25T06:58:06.497Z",
6363
"files": [
64+
{
65+
"path": "assets/index-C3ViWK1P.js",
66+
"size": 566643,
67+
"type": "js"
68+
},
6469
{
6570
"path": "assets/index-DD-rq4eS.css",
6671
"size": 2812,
6772
"type": "css"
6873
},
69-
{
70-
"path": "assets/index-xMD4_U6M.js",
71-
"size": 564629,
72-
"type": "js"
73-
},
7474
{
7575
"path": "index.html",
7676
"size": 506,
@@ -82,24 +82,24 @@
8282
"type": "other"
8383
}
8484
],
85-
"totalSize": 569444,
85+
"totalSize": 571458,
8686
"totalGzipSize": 0,
87-
"buildTime": 1464
87+
"buildTime": 2927
8888
},
8989
{
9090
"version": "7.1.3",
91-
"timestamp": "2025-08-25T04:11:10.423Z",
91+
"timestamp": "2025-08-25T06:58:10.694Z",
9292
"files": [
93-
{
94-
"path": "assets/index-C_guGHi2.js",
95-
"size": 563794,
96-
"type": "js"
97-
},
9893
{
9994
"path": "assets/index-DD-rq4eS.css",
10095
"size": 2812,
10196
"type": "css"
10297
},
98+
{
99+
"path": "assets/index-KSGgoblA.js",
100+
"size": 565809,
101+
"type": "js"
102+
},
103103
{
104104
"path": "index.html",
105105
"size": 506,
@@ -111,24 +111,24 @@
111111
"type": "other"
112112
}
113113
],
114-
"totalSize": 568609,
114+
"totalSize": 570624,
115115
"totalGzipSize": 0,
116-
"buildTime": 1634
116+
"buildTime": 2886
117117
},
118118
{
119119
"version": "7.1.4",
120-
"timestamp": "2025-08-25T04:11:13.184Z",
120+
"timestamp": "2025-08-25T06:58:14.917Z",
121121
"files": [
122-
{
123-
"path": "assets/index-C_guGHi2.js",
124-
"size": 563794,
125-
"type": "js"
126-
},
127122
{
128123
"path": "assets/index-DD-rq4eS.css",
129124
"size": 2812,
130125
"type": "css"
131126
},
127+
{
128+
"path": "assets/index-KSGgoblA.js",
129+
"size": 565809,
130+
"type": "js"
131+
},
132132
{
133133
"path": "index.html",
134134
"size": 506,
@@ -140,8 +140,8 @@
140140
"type": "other"
141141
}
142142
],
143-
"totalSize": 568609,
143+
"totalSize": 570624,
144144
"totalGzipSize": 0,
145-
"buildTime": 1467
145+
"buildTime": 2893
146146
}
147147
]

0 commit comments

Comments
 (0)