Skip to content

CI: skip Electron rebuild in format workflow#23271

Open
Sewer56 wants to merge 4 commits into
Nexus-Mods:masterfrom
Sewer56:ci/opt-format-skip-electron-rebuild
Open

CI: skip Electron rebuild in format workflow#23271
Sewer56 wants to merge 4 commits into
Nexus-Mods:masterfrom
Sewer56:ci/opt-format-skip-electron-rebuild

Conversation

@Sewer56
Copy link
Copy Markdown
Member

@Sewer56 Sewer56 commented May 20, 2026

Part of LAZ-411

Depends on:

Merge it first.

Summary

Skip Electron native rebuild during format.yml dependency install.

Change

format.yml sets:

env:
  VORTEX_SKIP_ELECTRON_REBUILD: "1"

on its pnpm install step.

Format checking does not load Electron native modules, so rebuilding them here is unnecessary.

Measurement

Baseline full-postinstall format runs:

Optimized format-skip runs:

Result:

  • install step median: 80s → 30s (-50s)
  • format check median: 5s → 5s

Sewer56 added 2 commits May 19, 2026 21:14
Move @vortex/main postinstall into a small Node wrapper so CI workflows can opt out of or defer electron-rebuild with explicit environment variables.

This commit does not change CI timing by itself: without VORTEX_SKIP_ELECTRON_REBUILD or VORTEX_DEFER_ELECTRON_REBUILD, postinstall still runs pnpm exec electron-rebuild. The wrapper also uses shell=true on Windows so spawned pnpm resolves correctly in packaged install flows.

The follow-up optimization PRs use these controls independently: format skips rebuild, main defers rebuild to a cached explicit step, and package skips the deployed dist postinstall before restoring/rebuilding packaged native outputs.
@Sewer56 Sewer56 marked this pull request as ready for review May 20, 2026 17:10
@Sewer56 Sewer56 requested a review from a team as a code owner May 20, 2026 17:10
IDCs
IDCs previously approved these changes May 21, 2026
Sewer56 added 2 commits May 21, 2026 14:24
Replace VORTEX_SKIP_ELECTRON_REBUILD and VORTEX_DEFER_ELECTRON_REBUILD
with VORTEX_ELECTRON_REBUILD accepting "skip" or "defer" (default: run).
Both flags had identical behavior (exit 0), differing only in log message.
Set VORTEX_ELECTRON_REBUILD=skip for the format workflow's pnpm install step. Format checking does not load Electron native modules, so rebuilding @vortex/main native dependencies during install is unnecessary work.

This branch is based on the separate Electron rebuild controls PR, which adds the postinstall wrapper. The only optimization here is enabling the skip in format.yml.

Measurement on Sewer56/Vortex:

Baseline full-postinstall format runs:

- https://github.com/Sewer56/Vortex/actions/runs/26099086903
- https://github.com/Sewer56/Vortex/actions/runs/26099090697
- https://github.com/Sewer56/Vortex/actions/runs/26099094211

Optimized format-skip runs:

- https://github.com/Sewer56/Vortex/actions/runs/26099088840
- https://github.com/Sewer56/Vortex/actions/runs/26099092652
- https://github.com/Sewer56/Vortex/actions/runs/26099096096

Install step median: 80s -> 30s (-50s). Format check median stayed 5s -> 5s.
@Sewer56 Sewer56 force-pushed the ci/opt-format-skip-electron-rebuild branch from c4b179b to 48e96f4 Compare May 21, 2026 13:38
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.

2 participants