From 2f26bed922b5383bc3075b0fed5fb8d23599fe0c Mon Sep 17 00:00:00 2001 From: Ammar Date: Mon, 1 Dec 2025 21:37:55 -0600 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20ci:=20parallelize=20macOS=20?= =?UTF-8?q?PR=20builds=20by=20skipping=20signing=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR builds were running x64 and arm64 sequentially (~180s) because: 1. CSC_LINK was set by the signing setup script 2. Makefile sees CSC_LINK and forces sequential builds to avoid keychain conflicts 3. But electron-builder skips signing for PRs anyway! Fix: Skip signing setup for PRs entirely. This allows the Makefile to run both architectures in parallel, saving ~90 seconds per PR build. Evidence from run #19845830777: - 03:24:40 "🔐 Code signing enabled - building sequentially..." - 03:26:12 "Current build is a part of pull request, code signing will be skipped" - x64: 03:26:12 → 03:27:43 (~91s) - arm64: 03:27:59 → 03:29:29 (~90s) - started AFTER x64 finished With this change, both will build simultaneously. _Generated with mux_ --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c0dff6836..e07f45d1ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,11 @@ jobs: - uses: ./.github/actions/setup-mux + # Skip signing setup for PRs - electron-builder skips signing anyway, + # but setting CSC_LINK forces our Makefile to build sequentially. + # Without CSC_LINK, x64 and arm64 build in parallel (~90s savings). - name: Setup code signing + if: github.event_name != 'pull_request' run: ./scripts/setup-macos-signing.sh env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} @@ -28,6 +32,7 @@ jobs: AC_APIKEY_ISSUER_ID: ${{ secrets.AC_APIKEY_ISSUER_ID }} - name: Verify signing setup + if: github.event_name != 'pull_request' run: | if [ -n "${CSC_LINK:-}" ]; then echo "✅ Code signing enabled" @@ -39,8 +44,6 @@ jobs: - name: Package for macOS run: make dist-mac - env: - CSC_FOR_PULL_REQUEST: ${{ github.event.pull_request.number == 234 }} - name: Upload macOS DMG (x64) uses: actions/upload-artifact@v4 From 27bbd01715b7fbfbca50fc90a6a14991c55d539f Mon Sep 17 00:00:00 2001 From: Ammar Date: Mon, 1 Dec 2025 21:54:38 -0600 Subject: [PATCH 2/2] ci: skip bun cache restore when node_modules hits The bun install cache (~470MB, ~104k files) only benefits 'bun install' runs. When node_modules cache hits, we skip install entirely, so restoring the bun cache wastes ~37 seconds extracting files we never use. Add condition to only restore bun cache on node_modules miss. --- .github/actions/setup-mux/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-mux/action.yml b/.github/actions/setup-mux/action.yml index 2764a8f58f..b999afb231 100644 --- a/.github/actions/setup-mux/action.yml +++ b/.github/actions/setup-mux/action.yml @@ -23,6 +23,7 @@ runs: ${{ runner.os }}-${{ runner.arch }}-bun-${{ steps.bun-version.outputs.version }}-node-modules- - name: Cache bun install cache + if: steps.cache-node-modules.outputs.cache-hit != 'true' id: cache-bun-install uses: actions/cache@v4 with: