Skip to content

Commit b68335e

Browse files
committed
ci: limit PR-time CI to one installer per platform
The PR-time CI workflow previously built the full Windows installer matrix (NSIS x3 + MSI + AppX x3) on every push. That's a lot of billed minutes for installer packaging that rarely changes. Now each platform builds one representative installer that non- developer teammates can grab and try from any PR: NSIS x64 on Windows (via a new 'nsis-x64' wrapper shortname) and DMG on macOS. Both platforms specify their target explicitly so the wrapper's default behavior isn't load-bearing. The full multi-arch matrix still runs on release-candidate dispatch where the artifacts actually ship. Estimated savings: Windows CI job drops from ~11 min to ~4 min, with proportional reductions in billed compute minutes.
1 parent eb07313 commit b68335e

2 files changed

Lines changed: 25 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,33 @@ jobs:
8484
media-
8585
- name: Test
8686
run: npm run test
87-
- name: Build
87+
# Each platform builds one representative installer on PR-time CI so non-developer
88+
# teammates can grab and try the latest from any PR. The full multi-arch matrix
89+
# only runs on release-candidate dispatch where the artifacts actually ship.
90+
- name: Build macOS DMG
91+
if: matrix.os == 'macos-latest'
8892
timeout-minutes: 30
8993
env:
9094
# TODO: fix whatever is causing excessive memory usage during build
9195
NODE_OPTIONS: --max-old-space-size=4096
92-
run: npm run distDev
96+
run: npm run distDev -- --target=dmg
97+
- name: Build Windows NSIS x64
98+
if: matrix.os == 'windows-latest'
99+
timeout-minutes: 30
100+
env:
101+
NODE_OPTIONS: --max-old-space-size=4096
102+
run: npm run distDev -- --target=nsis-x64
93103
- name: Upload macOS artifacts
94104
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
95105
if: matrix.os == 'macos-latest'
96106
with:
97107
name: macOS-unsigned
98108
path: dist/Scratch*.dmg
99-
- name: Upload Windows artifacts
109+
compression-level: 0
110+
- name: Upload Windows NSIS x64
100111
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
101112
if: matrix.os == 'windows-latest'
102113
with:
103-
name: Windows-unsigned
104-
path: |
105-
dist/Scratch*.appx
106-
dist/Scratch*.exe
114+
name: Windows-NSIS-x64
115+
path: "dist/Scratch *x64 Setup.exe"
116+
compression-level: 0

scripts/electron-builder-wrapper.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ const calculateTargets = function (wrapperConfig) {
135135
name: 'nsis:ia32 nsis:x64 nsis:arm64 msi:x64',
136136
platform: 'win32'
137137
},
138+
windowsNsisX64: {
139+
// Single representative installer for PR-time CI — the smallest build that still
140+
// produces something a non-developer teammate can install and try on Windows x64.
141+
name: 'nsis:x64',
142+
platform: 'win32'
143+
},
138144
linuxAppImage: {
139145
name: 'appimage',
140146
platform: 'linux'
@@ -154,7 +160,8 @@ const calculateTargets = function (wrapperConfig) {
154160
'appx': availableTargets.microsoftStore,
155161
'nsis': availableTargets.windowsDirectDownload,
156162
'msi': availableTargets.windowsManagedDeployment,
157-
'installers': availableTargets.windowsInstallers
163+
'installers': availableTargets.windowsInstallers,
164+
'nsis-x64': availableTargets.windowsNsisX64
158165
};
159166
const selected = targetsByShortName[wrapperConfig.target];
160167
if (!selected) {

0 commit comments

Comments
 (0)