Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,40 @@ jobs:

- name: Install dependencies
run: pnpm install
env:
VORTEX_ELECTRON_REBUILD: "defer"

- name: Cache native build headers
uses: actions/cache@v4
with:
path: |
~/.electron-gyp
~/.cache/node-gyp
Comment thread
Sewer56 marked this conversation as resolved.
key: native-headers-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'pnpm-lock.yaml') }}

- name: Cache Electron native rebuild outputs
id: electron-native-cache
uses: actions/cache@v4
with:
path: |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are we going to maintain this list of paths?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_modules could 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.

node_modules/.pnpm/@nexusmods+fomod-installer-native@*/node_modules/@nexusmods/fomod-installer-native/build
node_modules/.pnpm/@nexusmods+fomod-installer-native@*/node_modules/@nexusmods/fomod-installer-native/bin
node_modules/.pnpm/drivelist@*/node_modules/drivelist/build
node_modules/.pnpm/drivelist@*/node_modules/drivelist/bin
node_modules/.pnpm/leveldown@*/node_modules/leveldown/build
node_modules/.pnpm/leveldown@*/node_modules/leveldown/bin
node_modules/.pnpm/winapi-bindings@*/node_modules/winapi-bindings/build
node_modules/.pnpm/winapi-bindings@*/node_modules/winapi-bindings/bin
node_modules/.pnpm/xxhash-addon@*/node_modules/xxhash-addon/build
node_modules/.pnpm/xxhash-addon@*/node_modules/xxhash-addon/bin
node_modules/.pnpm/@parcel+watcher@*/node_modules/@parcel/watcher/build
node_modules/.pnpm/@parcel+watcher@*/node_modules/@parcel/watcher/bin
key: electron-native-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'src/main/postinstall.mjs') }}

- name: Rebuild Electron native modules
run: |
echo "Electron native cache hit: ${{ steps.electron-native-cache.outputs.cache-hit }}"
pnpm --filter @vortex/main exec electron-rebuild

- name: Build
run: pnpm run build
Expand Down
Loading