ci: reduce CLI build and snapshot time - #2739
Conversation
f3912c9 to
05133b1
Compare
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.15 MiB | 2.15 MiB | 0 B (0.00%) |
packages/core/dist |
Directory total | 3.95 MiB | 3.95 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 6.09 MiB | 6.09 MiB | 0 B (0.00%) |
vp (Linux x64) |
Binary | 11.22 MiB | 11.22 MiB | 0 B (0.00%) |
vp (Linux x64) |
gzip -9 | 4.85 MiB | 4.85 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | Binary | 32.03 MiB | 32.03 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | gzip -9 | 12.70 MiB | 12.70 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
Binary | 8.36 MiB | 8.36 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
gzip -9 | 4.23 MiB | 4.23 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | Binary | 39.64 MiB | 39.64 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 17.01 MiB | 17.01 MiB | 0 B (0.00%) |
vp (Windows x64) |
Binary | 9.10 MiB | 9.10 MiB | 0 B (0.00%) |
vp (Windows x64) |
gzip -9 | 3.97 MiB | 3.97 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | Binary | 26.99 MiB | 26.99 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | gzip -9 | 10.81 MiB | 10.81 MiB | -2 B (-0.00%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.03 KiB | 7.03 KiB | 0 B (0.00%) |
| Installer (Windows x64) | Binary | 4.53 MiB | 4.53 MiB | 0 B (0.00%) |
| Installer (Windows x64) | gzip -9 | 2.12 MiB | 2.12 MiB | +1 B (+0.00%) |
Registry bridge build (
|
| Package | Version |
|---|---|
vite-plus |
0.0.0-commit.fc34de6d09defa0001912374f7845673c985aeb8 |
@voidzero-dev/vite-plus-core |
0.0.0-commit.fc34de6d09defa0001912374f7845673c985aeb8 |
Install the Vite+ CLI built from this commit, then migrate a project:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/fc34de6d09defa0001912374f7845673c985aeb8/packages/cli/install.sh | VP_PR_VERSION=2739 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/fc34de6d09defa0001912374f7845673c985aeb8/packages/cli/install-legacy.sh bash# Windows (PowerShell)
$env:VP_PR_VERSION="2739"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/fc34de6d09defa0001912374f7845673c985aeb8/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/fc34de6d09defa0001912374f7845673c985aeb8/packages/cli/install.ps1 | iexOr download the standalone Windows installer built from this commit:
| Architecture | Installer |
|---|---|
| x64 | vp-setup-x86_64-pc-windows-msvc.exe |
| Arm64 | vp-setup-aarch64-pc-windows-msvc.exe |
GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:
.\vp-setup.exe --version "0.0.0-commit.fc34de6d09defa0001912374f7845673c985aeb8" --registry "https://registry-bridge.viteplus.dev/"After installing, upgrade the current project's vite-plus to this test build with:
vp migrateOr point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:
| Package manager | Registry config |
|---|---|
| npm / pnpm / Bun | .npmrc: registry=https://registry-bridge.viteplus.dev/ |
| Yarn (v2+) | .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/" |
Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):
{
"devDependencies": {
"vite-plus": "0.0.0-commit.fc34de6d09defa0001912374f7845673c985aeb8",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.fc34de6d09defa0001912374f7845673c985aeb8"
}
}
🐳 Docker preview imageBuilt from this PR's registry bridge build:
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2739 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2739Quick check: docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2739 vp --versionSee docs/guide/docker.md for usage. |
Linux and macOS snapshot shards and CLI E2E jobs rebuilt the same native binaries. A shared job now builds the native binding, global CLI, snapshot runner, and helper once per platform. The snapshot shards and CLI E2E jobs reuse these artifacts and build only TypeScript packages. These jobs no longer need Rust setup or a Cargo cache.
Jobs that reuse native binaries read Cargo metadata from the artifact and skip the preliminary CLI TypeScript build.
Eleven snapshot cases exceeded 20 seconds on Windows in CI run 35299447671. These cases now use
skip-platforms = ["windows"]. Linux and macOS continue to run them.All table values are seconds. Build times cover
Build with upstream.The snapshot build comparison uses native-cache misses in both run 35316025047 (
b8d716e24) and run 35321861243 (304ba791d). After totals include the shared build and all three shards.Combined snapshot build time fell from 37m26s to 14m00s (62.6%).
CLI E2E build times compare run 35321861243 with measured PR run 35323220184 (
3d4616e9e). These jobs now wait for the shared artifact instead of rebuilding when its cache is not ready.Windows timings compare base run 35308723711 (
78439cd9e) with the measured PR run. Snapshot times coverRun PTY snapshot tests.Totals add time across parallel jobs. They do not measure workflow duration. Runner and cache conditions can affect these single-run measurements.