diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96ff4827..644f65d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ jobs: build: name: Build App (${{ matrix.os }}) runs-on: ${{ matrix.os }} + timeout-minutes: 25 strategy: matrix: os: [macos-latest] @@ -53,8 +54,34 @@ jobs: - name: Build and package app working-directory: packages/app - run: pnpm run package + env: + NODE_OPTIONS: --max-old-space-size=4096 + run: | + set -euo pipefail + mkdir -p .automation/build-check + pnpm run package 2>&1 | tee .automation/build-check/package.log + # Forge can return zero after a Vite subprocess runs out of memory. + ! grep -E 'FATAL ERROR|heap out of memory' .automation/build-check/package.log + test -s .vite/build/main.js + test -s .vite/build/preload.js + test -s .vite/renderer/main_window/index.html + test -n "$(find out -type d -name 'Convera.app' -print -quit)" - name: Make distribution files working-directory: packages/app - run: pnpm run make + env: + NODE_OPTIONS: --max-old-space-size=4096 + run: | + set -euo pipefail + # Package was verified above; do not silently build it a second time. + pnpm exec electron-forge make --skip-package 2>&1 | tee .automation/build-check/make.log + ! grep -E 'FATAL ERROR|heap out of memory' .automation/build-check/make.log + test -n "$(find out/make -type f -name '*.dmg' -size +0c -print -quit)" + + - name: Upload build diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: convera-build-check-logs + path: packages/app/.automation/build-check + if-no-files-found: warn diff --git a/docs/ux-build-verification.md b/docs/ux-build-verification.md new file mode 100644 index 00000000..98822696 --- /dev/null +++ b/docs/ux-build-verification.md @@ -0,0 +1,14 @@ +# Verify Electron build results + +An independent validation fix discovered while testing provider UX changes. + +Before: Build Check run https://github.com/CodeFox-Repo/Convera/actions/runs/36857249679 reported success even though its package and make logs each contained `FATAL ERROR: ... heap out of memory`. The Electron Forge subprocess failure did not reliably reach the job exit status. A green badge alone therefore did not establish a usable renderer. + +After: +- Give the build a bounded 4 GiB Node heap, also verified by the actual Electron before/after UX workflow +- Preserve strict shell/pipeline exit codes and reject fatal/OOM log output +- Require nonempty main, preload and renderer entry files plus a packaged Convera.app +- Make the distribution from the already verified package rather than building a second time +- Require a nonempty DMG and retain diagnostics on success or failure + +This does not sign, publish, merge, deploy or change production. It changes only pull-request build verification. Review independently of the website and provider-copy PRs.