Skip to content

fix(deps): update swc monorepo (major) #2500

fix(deps): update swc monorepo (major)

fix(deps): update swc monorepo (major) #2500

name: Performance Report
on:
pull_request_target:
types:
- synchronize
- opened
- reopened
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-artefacts:
if: >-
${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' ||
(github.event.action == 'labeled' && github.event.label.name == 'x⁸ ⚙️ build repl artefacts') }}
strategy:
matrix:
settings:
- name: current
ref: ${{ github.event.pull_request.head.sha }}
- name: previous
ref: ${{ github.event.pull_request.base.sha }}
name: Build ${{matrix.settings.name}} artefact
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{matrix.settings.ref}}
- name: Install Toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: nightly-2025-07-25
components: rust-src
- name: Restore Cargo cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: x86_64-unknown-linux-gnu-cargo-ubuntu-latest-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: x86_64-unknown-linux-gnu-cargo-ubuntu-latest
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.10.0
- name: Install and Cache Node Dependencies
uses: ./.github/actions/install-and-cache-node-deps
- name: Build artefacts 123
run: npm exec -- concurrently -c green,blue 'npm:build:napi -- --release' 'npm:build:cjs' && npm run build:copy-native && npm run build:bootstrap:cjs && npm run build:copy-native
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.settings.name }}
path: dist/
if-no-files-found: error
report:
needs: build-artefacts
permissions:
pull-requests: write # for peter-evans/find-comment and peter-evans/create-or-update-comment
runs-on: ubuntu-latest
name: Report Performance
steps:
- name: Checkout Commit
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: nightly-2025-07-25
components: rust-src
- name: Restore Cargo cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: x86_64-unknown-linux-gnu-cargo-ubuntu-latest-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: x86_64-unknown-linux-gnu-cargo-ubuntu-latest
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.10.0
- name: Install and Cache Node Dependencies
uses: ./.github/actions/install-and-cache-node-deps
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: _benchmark
- name: Change rollup import in internal benchmark
run: |
echo "export { rollup as previousRollup, VERSION as previousVersion } from '../../_benchmark/previous/rollup.js';" > ./scripts/perf-report/rollup-artefacts.js
echo "export { rollup as newRollup } from '../../_benchmark/current/rollup.js';" >> ./scripts/perf-report/rollup-artefacts.js
- name: Run internal benchmark
run: node --expose-gc scripts/perf-report/index.js
- name: Find Performance report
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
id: findPerformanceReport
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Performance report'
- name: Create or update Performance report
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
id: createOrUpdatePerformanceReport
with:
comment-id: ${{ steps.findPerformanceReport.outputs.comment-id }}
issue-number: ${{ github.event.number }}
edit-mode: replace
body-path: _benchmark/result.md