diff --git a/.github/workflows/update-rolldown-stats.yml b/.github/workflows/update-rolldown-stats.yml new file mode 100644 index 0000000..b31b669 --- /dev/null +++ b/.github/workflows/update-rolldown-stats.yml @@ -0,0 +1,76 @@ +name: Update Rolldown Stats + +on: + push: + branches: [main] + paths: + - 'apps/dashboard/**' + +permissions: + contents: write + +jobs: + update-stats: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Setup Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Run rolldown stats collection + run: pnpm rolldown:stats + + - name: Check for changes + id: git-check + run: | + if git diff --exit-code rolldown-version-stats.json; then + echo "No changes detected in rolldown-version-stats.json" + echo "changes=false" >> $GITHUB_OUTPUT + else + echo "Changes detected in rolldown-version-stats.json" + echo "changes=true" >> $GITHUB_OUTPUT + fi + + - name: Commit and push changes + if: steps.git-check.outputs.changes == 'true' + run: | + git config --local user.email "boshen@gmail.com" + git config --local user.name "Boshen" + git add rolldown-version-stats.json + git commit -m "chore: update rolldown version stats" + git push origin main + + - name: No changes to commit + if: steps.git-check.outputs.changes != 'true' + run: echo "No changes were detected in rolldown-version-stats.json, skipping commit." \ No newline at end of file diff --git a/apps/dashboard/README.md b/apps/dashboard/README.md index a3850d2..607e498 100644 --- a/apps/dashboard/README.md +++ b/apps/dashboard/README.md @@ -26,4 +26,7 @@ pnpm lint To customize the configuration, edit `.oxlintrc.json`. Oxlint supports most ESLint configuration options. +## Rolldown Stats Integration + +This dashboard displays build statistics from different rolldown versions, automatically updated via CI when changes are made to the dashboard code. diff --git a/rolldown-version-stats.json b/rolldown-version-stats.json index f720a2f..3af9984 100644 --- a/rolldown-version-stats.json +++ b/rolldown-version-stats.json @@ -1,7 +1,7 @@ [ { "version": "7.1.0", - "timestamp": "2025-08-25T04:10:30.355Z", + "timestamp": "2025-08-25T06:57:57.569Z", "files": [ { "path": "assets/index-DD-rq4eS.css", @@ -9,8 +9,8 @@ "type": "css" }, { - "path": "assets/index-xJMNECRy.js", - "size": 564642, + "path": "assets/index-DmHmC5BH.js", + "size": 566655, "type": "js" }, { @@ -24,24 +24,24 @@ "type": "other" } ], - "totalSize": 569457, + "totalSize": 571470, "totalGzipSize": 0, - "buildTime": 1741 + "buildTime": 3326 }, { "version": "7.1.1", - "timestamp": "2025-08-25T04:10:33.181Z", + "timestamp": "2025-08-25T06:58:02.241Z", "files": [ + { + "path": "assets/index-C3ViWK1P.js", + "size": 566643, + "type": "js" + }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, - { - "path": "assets/index-xMD4_U6M.js", - "size": 564629, - "type": "js" - }, { "path": "index.html", "size": 506, @@ -53,24 +53,24 @@ "type": "other" } ], - "totalSize": 569444, + "totalSize": 571458, "totalGzipSize": 0, - "buildTime": 1511 + "buildTime": 2937 }, { "version": "7.1.2", - "timestamp": "2025-08-25T04:10:36.031Z", + "timestamp": "2025-08-25T06:58:06.497Z", "files": [ + { + "path": "assets/index-C3ViWK1P.js", + "size": 566643, + "type": "js" + }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, - { - "path": "assets/index-xMD4_U6M.js", - "size": 564629, - "type": "js" - }, { "path": "index.html", "size": 506, @@ -82,24 +82,24 @@ "type": "other" } ], - "totalSize": 569444, + "totalSize": 571458, "totalGzipSize": 0, - "buildTime": 1464 + "buildTime": 2927 }, { "version": "7.1.3", - "timestamp": "2025-08-25T04:11:10.423Z", + "timestamp": "2025-08-25T06:58:10.694Z", "files": [ - { - "path": "assets/index-C_guGHi2.js", - "size": 563794, - "type": "js" - }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, + { + "path": "assets/index-KSGgoblA.js", + "size": 565809, + "type": "js" + }, { "path": "index.html", "size": 506, @@ -111,24 +111,24 @@ "type": "other" } ], - "totalSize": 568609, + "totalSize": 570624, "totalGzipSize": 0, - "buildTime": 1634 + "buildTime": 2886 }, { "version": "7.1.4", - "timestamp": "2025-08-25T04:11:13.184Z", + "timestamp": "2025-08-25T06:58:14.917Z", "files": [ - { - "path": "assets/index-C_guGHi2.js", - "size": 563794, - "type": "js" - }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, + { + "path": "assets/index-KSGgoblA.js", + "size": 565809, + "type": "js" + }, { "path": "index.html", "size": 506, @@ -140,8 +140,8 @@ "type": "other" } ], - "totalSize": 568609, + "totalSize": 570624, "totalGzipSize": 0, - "buildTime": 1467 + "buildTime": 2893 } ] \ No newline at end of file