Skip to content

feat: migrate rspack ecosystem CI to the central repo#23

Merged
fi3ework merged 2 commits intomainfrom
feat/rspack-verdaccio-migration
Mar 27, 2026
Merged

feat: migrate rspack ecosystem CI to the central repo#23
fi3ework merged 2 commits intomainfrom
feat/rspack-verdaccio-migration

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Mar 27, 2026

Motivation

rspack is the last rstack project still running ecosystem CI in its own repo (web-infra-dev/rspack), consuming ~140 runner-minutes per push to main. All other stacks (rsbuild, rslib, rspress, rstest, rsdoctor) already use this central repo.

This PR enables the central repo to run rspack ecosystem CI, so that:

  1. Centralized management — all rstack ecosystem CI lives in one place
  2. Reduced runner load — heavy compilation and suite jobs move off rspack's own runners

After this lands, rspack repo only needs a lightweight dispatch job (~1 min) to trigger these workflows.

Implementation

Verdaccio for rspack overrides

Unlike other stacks, rspack cannot use file: protocol overrides because of a known pnpm bugfile: overrides for packages with native optionalDependencies cause version mismatch or silent registry fallback. This was the original motivation for Verdaccio in web-infra-dev/rspack#10962.

The solution uses the existing --release mode with zero changes to ecosystem-ci.ts / utils.ts:

  1. Build rspack (binding from artifact + JS from source)
  2. Publish @rspack/* packages to a local Verdaccio registry
  3. Run suites with NPM_CONFIG_REGISTRY=http://localhost:4873 and --release "$VERSION"

Changes

prepare-rspack-binding/action.yaml

  • Add install-binding-dependencies and TARGET_CC=clang (align with rspack reusable-build.yml)

ci.yml (rspack job)

  • Add Verdaccio + --release for all suites except _selftest
  • Lint → _selftest only
  • ubuntu-22.04ubuntu-latest

rspack-ecosystem-ci-from-commit.yml

  • Add updateComment input
  • Add rsbuild-rsc-plugin suite
  • Add Verdaccio + --release (with _selftest exclusion)
  • Add conditional Rust setup for lynx-stack
  • ubuntu-22.04ubuntu-latest

rspack-ecosystem-ci-from-pr.yml

  • Add rsbuild-rsc-plugin suite
  • Add Verdaccio + --release
  • Add conditional Rust setup for lynx-stack
  • ubuntu-22.04ubuntu-latest

rspack-ecosystem-ci-selected.yml

  • Fix bug: prepare-binding and build-rspack were using inputs.suiteRef instead of inputs.ref
  • Fix bug: build-rspack was missing repository input
  • Add rsbuild-rsc-plugin suite
  • Add Verdaccio + --release
  • ubuntu-22.04ubuntu-latest

- Use Verdaccio local registry to publish rspack packages, then run
  suites with --release and NPM_CONFIG_REGISTRY to work around pnpm
  bug (pnpm/pnpm#9270) with file: protocol overrides for native
  optionalDependencies.
- Add install-binding-dependencies and TARGET_CC=clang to
  prepare-rspack-binding action (align with rspack reusable-build.yml).
- Fix rspack-ecosystem-ci-selected.yml ref bugs: prepare-binding and
  build-rspack were using inputs.suiteRef instead of inputs.ref.
- Add rsbuild-rsc-plugin suite to all rspack workflow matrices.
- Add updateComment input to rspack-ecosystem-ci-from-commit.yml.
- Move pnpm lint to _selftest only in ci.yml rspack job.
- Add conditional Rust toolchain setup for lynx-stack in
  execute-selected-suite paths.
- Skip Verdaccio for _selftest suite (uses direct file: overrides).
- Migrate all rspack matrix OS from ubuntu-22.04 to ubuntu-latest.

Amp-Thread-ID: https://ampcode.com/threads/T-019d29d2-39df-76ce-8a7b-fd06c8874b65
Co-authored-by: Amp <amp@ampcode.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the GitHub Action for preparing Rspack bindings by configuring the TARGET_CC environment variable and adding a step to install binding dependencies. Feedback was provided to include set -e in the build script to improve error handling by ensuring the process terminates upon any command failure.

@fi3ework fi3ework changed the title feat: migrate rspack ecosystem CI to Verdaccio-based --release mode feat: migrate rspack ecosystem CI to the central repo Mar 27, 2026
@fi3ework
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

The execute-selected-suite job in from-commit workflow was running
_selftest through Verdaccio/--release mode, which masks local build
failures. Now consistent with ci.yml and execute-all: _selftest uses
direct file: overrides to verify workspace/rspack/dist exists.

Amp-Thread-ID: https://ampcode.com/threads/T-019d29d2-39df-76ce-8a7b-fd06c8874b65
Co-authored-by: Amp <amp@ampcode.com>
@fi3ework fi3ework merged commit a04a873 into main Mar 27, 2026
17 of 22 checks passed
@fi3ework fi3ework deleted the feat/rspack-verdaccio-migration branch March 27, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant