CI: cache Electron native rebuild outputs in main workflow#23272
Merged
Conversation
IDCs
previously approved these changes
May 21, 2026
erri120
reviewed
May 21, 2026
erri120
reviewed
May 21, 2026
erri120
reviewed
May 21, 2026
| id: electron-native-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | |
Member
There was a problem hiding this comment.
How are we going to maintain this list of paths?
Member
Author
There was a problem hiding this comment.
Maintenance burden is low because:
- Cache miss != breakage: an unlisted path just means that dep rebuilds every run (same as no cache, same as before). No risk.
- Stale entries are harmless: a listed path that doesn't exist on disk is simply ignored. No error; only warning.
- The list shrinks, not grows: we're actively removing native deps from Vortex, not adding them. We don't expect new entries anytime soon.
- Could automate: a short script scanning
node_modulescould regenerate this list when deps change. Given the above however, not worth the effort right now.
Not worried about it at the moment; since we're only planning to be removing deps. If a dep is removed then warning will show, so we'll know immediately by opening a CI run.
Sewer56
added a commit
to Sewer56/Vortex
that referenced
this pull request
May 21, 2026
Defer @vortex/main electron-rebuild during pnpm install, restore cached native build outputs, then run one explicit electron-rebuild step before pnpm run build. This branch is based on the separate Electron rebuild controls PR. This commit owns the behavior change from implicit postinstall rebuild to deferred explicit rebuild plus caches. Cached outputs cover @nexusmods/fomod-installer-native, drivelist, leveldown, winapi-bindings, xxhash-addon, and @parcel/watcher build/bin directories under pnpm's virtual store. Header caches cover ~/.electron-gyp and ~/.cache/node-gyp. Measurement on Sewer56/Vortex: Baseline full-postinstall main runs: - https://github.com/Sewer56/Vortex/actions/runs/26099098244 - https://github.com/Sewer56/Vortex/actions/runs/26099100086 - https://github.com/Sewer56/Vortex/actions/runs/26099101744 Warmup/verification run: - https://github.com/Sewer56/Vortex/actions/runs/26099103356 Optimized warm-cache runs: - https://github.com/Sewer56/Vortex/actions/runs/26099876762 - https://github.com/Sewer56/Vortex/actions/runs/26099878560 - https://github.com/Sewer56/Vortex/actions/runs/26099880447 All optimized warm-cache runs logged `Electron native cache hit: true` on both Ubuntu and Windows. Ubuntu combined install + cache restore + rebuild median: 86s -> 32s (-54s). Rebuild step itself was 1s with cache. Windows combined install + cache restore + rebuild median: 332s -> 260s (-72s). Rebuild step itself was 2s with cache. Note: the first verification run had a Windows native-output cache miss and spent 67s in the explicit rebuild, confirming warm-cache measurements need a serialized warmup first.
3eb7860 to
9e3864c
Compare
IDCs
previously approved these changes
May 27, 2026
Contributor
|
Same as #23274 |
IDCs
approved these changes
May 28, 2026
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 that first.
Summary
Cache Electron native rebuild outputs in
main.yml.Change
main.ymlnow:VORTEX_DEFER_ELECTRON_REBUILD=1~/.electron-gyp~/.cache/node-gypnode_modules/.pnpm/...pnpm --filter @vortex/main exec electron-rebuildCached modules:
@nexusmods/fomod-installer-nativedrivelistleveldownwinapi-bindingsxxhash-addon@parcel/watcherMeasurement
Baseline full-postinstall main runs:
Warmup/verification run:
Optimized warm-cache runs:
Results:
All optimized warm-cache runs logged
Electron native cache hit: trueon Ubuntu and Windows.