Skip to content

perf(ci): skip LTO when building native test binaries - #2988

Draft
fengmk2 wants to merge 1 commit into
mainfrom
perf/ci-native-test-profile
Draft

fengmk2 wants to merge 1 commit into
mainfrom
perf/ci-native-test-profile

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 11, 2026

Copy link
Copy Markdown
Member

CI applies whole-program optimization to native test binaries. This increases cold build time.

Set CARGO_PROFILE_RELEASE_LTO=off and CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 in jobs that build native binaries for tests. Include both settings in the binary cache key. Published binaries and the Windows trampoline keep their existing profiles.

The following runs use the same source and ubuntu-latest runner, with all configured caches disabled.

Cold build stage Before After Change
NAPI binding 9m27s 5m12s 🟢 ↓4m15s (45.0%)
Global CLI 3m25s 1m48s 🟢 ↓1m37s (47.3%)
Complete package build 13m39s 7m48s 🟢 ↓5m51s (42.9%)

These measurements cover the package build. Full CI comparisons with warm and cold caches are not yet available.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://perf-ci-native-test-profile-viteplus-dev.voidzero-docs.workers.dev (commit a17374d)

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://8fd36030-viteplus-dev.voidzero-docs.workers.dev a17374d 2026-10-11T03:10:34.562Z Visit the dashboard ↗

@github-actions

Copy link
Copy Markdown
Contributor

CLI artifact sizes (a17374d)

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 3.99 MiB 3.99 MiB 0 B (0.00%)
Combined package dist Directory total 6.07 MiB 6.07 MiB 0 B (0.00%)
vp (Linux x64) Binary 11.37 MiB 11.37 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.91 MiB 4.91 MiB 0 B (0.00%)
NAPI (Linux x64) Binary 32.73 MiB 32.73 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 13.00 MiB 13.00 MiB 0 B (0.00%)
vp (macOS ARM64) Binary 8.46 MiB 8.46 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 4.28 MiB 4.28 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 40.20 MiB 40.20 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 17.28 MiB 17.28 MiB 0 B (0.00%)
vp (Windows x64) Binary 9.24 MiB 9.24 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 4.03 MiB 4.03 MiB 0 B (0.00%)
NAPI (Windows x64) Binary 27.61 MiB 27.61 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 11.09 MiB 11.09 MiB -7 B (-0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.08 KiB 7.09 KiB +3 B (+0.04%)
Installer (Windows x64) Binary 4.56 MiB 4.56 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.13 MiB 2.13 MiB -1 B (-0.00%)

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