CI: skip Electron rebuild in format workflow#23271
Open
Sewer56 wants to merge 4 commits into
Open
Conversation
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.
IDCs
previously approved these changes
May 21, 2026
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.
c4b179b to
48e96f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of LAZ-411
Depends on:
Merge it first.
Summary
Skip Electron native rebuild during
format.ymldependency install.Change
format.ymlsets:on its
pnpm installstep.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:
80s → 30s(-50s)5s → 5s