ci: speed up linux and windows builds#71
Conversation
- Cache node_modules via actions/cache@v5, skip pnpm install on hit - Cache Electron binaries (~/.cache/electron, ~/.cache/electron-builder) - Use upload-artifact@v7 + download-artifact@v8 for dist transfer across jobs - archive: false for faster non-zipped artifact transfer - Replace raw docker build with docker/build-push-action + GHA layer cache - Bump actions/checkout@v6, actions/setup-node@v6, actions/cache@v5
Confidence Score: 4/5Issues Detected1. No All three Consider adding key: ${{ runner.os }}-nm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-nm-2. Frontend build artifact has no In - name: Restore frontend build
uses: actions/download-artifact@v8
with:
name: frontend-buildThe default - name: Restore frontend build
uses: actions/download-artifact@v8
with:
name: frontend-build
path: .3. macOS Electron cache key will miss on the first build after merge The Electron cache key changed from 4. Linux ( macOS ( This is correct today (GitHub's Improvements (non-blocking)
|
electron-builder generates arch-specific update manifests (latest-mac-arm64.yml) when building with --arm64 flag. The merge script expected latest-mac.yml in both artifacts, causing the release job to fail. - Add normalization step: copy latest-mac-*.yml to latest-mac.yml after packaging - Switch upload path to release/* to ensure all files are included - Improve merge script: fall back to arch-specific filenames, better debug output - Add artifact listing in release job for future debugging
|
Added a fix for the release job that was failing on master (electron-builder generates Changes in 2def9c6:
|
PR ReviewConfidence Score: 4/5 Issues Detected1. All three key: ${{ runner.os }}-nm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-nm-2. Electron cache path on Windows is likely incorrect # build.yml:193-195
path: |
~/.cache/electron
~/.cache/electron-builderOn 3. # build.yml:23-30
- name: Lint
run: pnpm exec vp lint
- name: Check
run: pnpm exec vp check
- name: Build frontend
run: pnpm exec vp build
4. Redundant dual caching layer (
5. No validation that download artifact succeeded before proceeding # build.yml:77-80, 141-144, 198-201
- name: Restore frontend build
uses: actions/download-artifact@v8
with:
name: frontend-buildIf 6. // merge-latest-mac.mjs:58
const merged = {
version: x64.version ?? arm64.version, // BUG: version mismatch is silently hidden
releaseDate,
files: [...(x64.files ?? []), ...(arm64.files ?? [])],
};If 7. // merge-latest-mac.mjs:50-55
const releaseDate = new Date(
Math.max(
new Date(x64.releaseDate ?? 0).getTime(),
new Date(arm64.releaseDate ?? 0).getTime(),
),
).toISOString();If neither manifest contains a 8. # build.yml:75
key: electron-cache-${{ runner.os }}-x64-${{ hashFiles('package.json') }}
# build.yml:196
key: electron-cache-${{ runner.os }}-x64-${{ hashFiles('package.json') }}While 9. macOS
10. On Improvements (non-blocking)
|


What
Linux and Windows builds were ~4 min each. This brings them to ~1.5-2 min.
Changes
Impact