Reduce redundant nightly and Vercel build work

Closed
LA
2mo ago
+274-26

This PR removes redundant work from the Vercel and nightly macOS pipelines while preserving the current NIGHTLY/RC publishing contract.

Changes:

  • Retain Git metadata through Vercel's exclusion step so native-only changes can skip the web build.
  • Run the pinned native TypeScript compiler from Next's production-compile hook, generating Next route types first. Application and generated-route type errors remain fatal.
  • Compare main nightly inputs with the last published commit. Web/docs/test-only changes skip the native app build; unknown inputs, renames, truncated comparisons, and API failures rebuild defensively.
  • Download Sparkle 2.8.1's prebuilt tools with a pinned SHA-256 and retain the source-build fallback for other versions or explicitly supplied tools.
  • Keep all supported locales in generateStaticParams.
  • Preserve RC branch publishing and prevent fast/build-only measurements from publishing.

The branch was merged with current main to resolve the prior conflict in .github/workflows/nightly.yml. The PR is ready for review.

Verification on the repaired head:

  • bun test web/tests/production-types.test.ts web/tests/vercel-ignore-build.test.ts: 9 passed.
  • bun run typecheck: passed.
  • node --test tests/test_nightly_build_decision.mjs: 10 passed.
  • bash tests/test_nightly_universal_build.sh: passed.
  • bash tests/test_sparkle_generate_appcast_no_deltas.sh: passed under Bash 3.2 and Bash 5.3.
  • actionlint .github/workflows/nightly.yml: passed.
  • shellcheck scripts/sparkle_generate_appcast.sh: passed.

Native macOS compilation was not run locally. The existing branch evidence reports a warm matched app-stage build of 5m35s versus a cold 28m53s; this PR does not claim a 10x end-to-end improvement.

Summary by CodeRabbit

  • Build Improvements

    • Nightly macOS builds now skip changes that do not affect build inputs, reducing unnecessary builds.
    • Builds continue to run defensively when change information is unavailable or ambiguous.
    • Vercel deployments better recognize when native-only changes do not require a web build.
  • Release Tooling

    • Sparkle appcast generation can use prebuilt or externally supplied tools, reducing generation time.
  • Quality

    • Production builds now perform additional TypeScript and route validation checks.