Skip to content

fix(ci): preserve dependencies in Cargo V2 caches - #3000

Draft
fengmk2 wants to merge 2 commits into
perf/ci-test-schedulingfrom
perf/ci-rust-cache-layout
Draft

fengmk2 wants to merge 2 commits into
perf/ci-test-schedulingfrom
perf/ci-rust-cache-layout

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Cargo's current output layout uses dependency directories without a trailing hash. rust-cache v2.9.1 truncates names that contain hyphens and deletes those dependencies before it saves the cache. Warm jobs then rebuild the missing dependencies and their dependents.

Use rust-cache v2.9.2, which includes the Cargo layout fix. A local setup action supplies this version because oxc-project/setup-rust still includes v2.9.1. The Rust toolchain and tool installer pins remain the same.

Use the v1-rust cache namespace so existing incomplete entries do not prevent the corrected action from saving dependencies. Preserve each caller's cache key, save policy, workspace settings, and target directory.

The focused musl comparison uses identical Rust inputs and test commands. Both runs require an exact cache hit. Each run passes the same 2,282 tests.

Warm musl job Before: v2.9.1 After: v2.9.2 Change
Elapsed time 4m14s 3m22s 🟢 ↓52s (20.5%)
Compilation messages 489 34 🟢 ↓455 (93.0%)

The corrected cache restores 611 dependency libraries, compared with 480 before the change. These results use one sample per version. See the combined full-workflow measurements below.

These runs combine #2986, #2987, #2988, #2995, and #3000 against main at bd0b43fa9.

Both variants use the same runner profiles and retain the complete test matrices. Runs execute in sequence.
Both variants also include #3006, which selects available API ports for the browser fixtures.
Install checks use the same six pinned repository commits. Ecosystem projects retain their existing pinned commits.
Cold runs bypass configured caches. Each warm run follows a separate cache preparation run and requires exact cache hits.
Dependency caches are shared only when their production keys match. Native binary and test archive caches use separate variant prefixes.
Cache preparation runs are excluded. Measured runs do not save caches.

Elapsed time includes queueing, setup, tests, and final jobs. It starts when GitHub creates the run and ends when its last job finishes.

Workflow Cache Before After Change
CI Cold 26m14s 9m50s 🟢 ↓16m24s (62.5%)
CI Warm #1 8m55s 13m56s 🔴 ↑5m01s (56.3%)
CI Warm #2 Pending Pending Pending
Ecosystem Cold Pending Pending Pending
Ecosystem Warm Pending Pending Pending

CI warm #1 (after): Build CLI test binaries (x86_64-unknown-linux-gnu) waited 9m02s for dispatch, then ran for 0m23s.
This wait remains part of the elapsed time above.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://perf-ci-rust-cache-layout-viteplus-dev.voidzero-docs.workers.dev (commit 9fcc6e9)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f8c85a9d-viteplus-dev.voidzero-docs.workers.dev 9fcc6e9 2026-10-12T10:12:42.793Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c882334d-viteplus-dev.voidzero-docs.workers.dev 79654cf 2026-10-12T06:10:13.047Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f5a7c25d-viteplus-dev.voidzero-docs.workers.dev 50756a7 2026-10-12T06:02:16.520Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://00c5f330-viteplus-dev.voidzero-docs.workers.dev b637277 2026-10-12T05:59:26.543Z Visit the dashboard ↗

@fengmk2
fengmk2 force-pushed the perf/ci-rust-cache-layout branch from b637277 to 50756a7 Compare October 12, 2026 06:01
@fengmk2
fengmk2 changed the base branch from main to perf/ci-test-scheduling October 12, 2026 06:01
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

CLI artifact sizes (9fcc6e9)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.08 MiB 2.08 MiB 0 B (0.00%)
packages/core/dist Directory total 4.08 MiB 4.08 MiB 0 B (0.00%)
Combined package dist Directory total 6.16 MiB 6.16 MiB 0 B (0.00%)
vp (Linux x64) Binary 11.42 MiB 11.42 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.94 MiB 4.94 MiB 0 B (0.00%)
NAPI (Linux x64) Binary 32.79 MiB 32.79 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 13.03 MiB 13.03 MiB 0 B (0.00%)
vp (macOS ARM64) Binary 8.50 MiB 8.50 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 4.31 MiB 4.31 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 40.24 MiB 40.24 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 17.30 MiB 17.30 MiB 0 B (0.00%)
vp (Windows x64) Binary 9.29 MiB 9.29 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 4.05 MiB 4.05 MiB 0 B (0.00%)
NAPI (Windows x64) Binary 27.66 MiB 27.66 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 11.11 MiB 11.11 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.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.63 MiB 4.63 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.17 MiB 2.17 MiB -1 B (-0.00%)

@fengmk2
fengmk2 force-pushed the perf/ci-rust-cache-layout branch from 79654cf to 9fcc6e9 Compare October 12, 2026 10:11

This branch has not been deployed

No deployments
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