feat: migrate rspack ecosystem CI to the central repo#23
Conversation
- 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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
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.
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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>
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:
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 bug —file:overrides for packages with nativeoptionalDependenciescause version mismatch or silent registry fallback. This was the original motivation for Verdaccio in web-infra-dev/rspack#10962.The solution uses the existing
--releasemode with zero changes toecosystem-ci.ts/utils.ts:@rspack/*packages to a local Verdaccio registryNPM_CONFIG_REGISTRY=http://localhost:4873and--release "$VERSION"Changes
prepare-rspack-binding/action.yamlinstall-binding-dependenciesandTARGET_CC=clang(align with rspackreusable-build.yml)ci.yml(rspack job)--releasefor all suites except_selftest_selftestonlyubuntu-22.04→ubuntu-latestrspack-ecosystem-ci-from-commit.ymlupdateCommentinputrsbuild-rsc-pluginsuite--release(with_selftestexclusion)lynx-stackubuntu-22.04→ubuntu-latestrspack-ecosystem-ci-from-pr.ymlrsbuild-rsc-pluginsuite--releaselynx-stackubuntu-22.04→ubuntu-latestrspack-ecosystem-ci-selected.ymlprepare-bindingandbuild-rspackwere usinginputs.suiteRefinstead ofinputs.refbuild-rspackwas missingrepositoryinputrsbuild-rsc-pluginsuite--releaseubuntu-22.04→ubuntu-latest