Skip to content

v0.6.54.0 ci: turbo remote cache + path filter + native caches#336

Merged
jayzalowitz merged 3 commits into
mainfrom
jayzalowitz/speed-up-ci-builds
May 18, 2026
Merged

v0.6.54.0 ci: turbo remote cache + path filter + native caches#336
jayzalowitz merged 3 commits into
mainfrom
jayzalowitz/speed-up-ci-builds

Conversation

@jayzalowitz

Copy link
Copy Markdown
Owner

Summary

CI wall-clock optimization. Three changes:

  1. Turbo remote cache via dtinth/setup-github-actions-caching-for-turbo@v1 on every job. First job populates the GH Actions cache; 5+ downstream jobs get pnpm build as cache hits across the monorepo. No external account needed (free Actions cache is the backend).
  2. Path-filtered desktop + mobile jobs on PRs via dorny/paths-filter@v3. PRs that don't touch apps/desktop/**, apps/mobile/**, packages/**, or lockfiles skip the 5 desktop+mobile packaging jobs entirely. Push events to main and tag pushes always run everything, so release artifacts are unchanged.
  3. Native-toolchain caches: electron-builder (per-OS), Gradle (gradle/actions/setup-gradle@v4), CocoaPods (Pods/ + global cache). These were re-downloaded on every run before.

Public repo so Actions minutes are free; wall-clock is what we were burning. No code paths affected.

Why

Before: every PR rebuilt the entire TypeScript monorepo 6× (once per build/package job) and re-downloaded the electron toolchain on each desktop runner. After: 5 of those 6 pnpm builds become cache restores, and PRs that don't touch desktop/mobile skip 5 jobs entirely.

Test plan

  • CI on this PR completes successfully (validates the workflows themselves parse + run)
  • test job populates turbo cache; subsequent jobs in same run show cache hits in the pnpm build step (look for "FULL TURBO" or per-task cache hit, replaying logs lines)
  • Confirm desktop+mobile jobs are skipped on this PR (this PR only touches .github/workflows/**, VERSION, CHANGELOG.md — and .github/workflows/build.yml is in the path filter so they WILL run once for self-validation)
  • Open a follow-up trivial PR that doesn't touch any of the filtered paths and confirm desktop/mobile are skipped
  • On main push after merge, confirm all jobs run (path filter shouldn't apply to push events)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 18, 2026 06:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

CI wall-clock optimization for the existing GitHub Actions workflows. Adds a Turbo remote cache (backed by the GH Actions cache), path-filtered desktop/mobile packaging jobs on PRs, and native-toolchain caches (electron-builder, Gradle, CocoaPods). No application/source code is changed.

Changes:

  • Add dtinth/setup-github-actions-caching-for-turbo@v1 to every job that runs pnpm build across build.yml, evals.yml, and release.yml, plus set TURBO_TELEMETRY_DISABLED=1.
  • New changes job using dorny/paths-filter@v3 to skip the 5 desktop/mobile packaging jobs on PRs that don't touch apps/desktop/**, apps/mobile/**, packages/**, or lockfiles; push/tag events are unaffected via github.event_name != 'pull_request'.
  • Per-OS electron-builder caches, gradle/actions/setup-gradle@v4, and CocoaPods caches added to the relevant jobs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
VERSION Bumps version to 0.6.54.0.
CHANGELOG.md Adds 0.6.54.0 entry describing the three CI changes.
.github/workflows/build.yml Adds changes job, turbo cache step, electron-builder/Gradle/CocoaPods caches, and if:/needs: gating for desktop & mobile jobs.
.github/workflows/evals.yml Adds turbo cache step to the evals job.
.github/workflows/release.yml Adds turbo cache step and per-OS electron-builder caches in the release matrix.
Comments suppressed due to low confidence (1)

.github/workflows/build.yml:81

  • dorny/paths-filter@v3 on tag push events typically sees github.event.before as all zeros and falls back to treating all filters as changed (or, depending on configuration, may emit warnings). Because the downstream if: short-circuits with github.event_name != 'pull_request', the outputs aren't consulted on tag pushes, but if this changes job ever fails on a tag push (e.g., due to a shallow checkout / missing base ref), the entire needs: [test, changes] chain will block the release jobs and prevent a release from being produced. Consider either gating this job to pull_request events only (see related comment), or adding if: always() && ... semantics on the dependents so a failed/skipped changes job cannot block tag-driven releases.
    needs: [test, changes]
    if: github.event_name != 'pull_request' || needs.changes.outputs.desktop == 'true'

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mobile:
- 'apps/mobile/**'
- 'pnpm-lock.yaml'
- 'package.json'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6f707bc — added turbo.json to the mobile filter for symmetry with desktop. Good catch.

Comment on lines +28 to +35
changes:
name: Detect changed paths
runs-on: ubuntu-latest
outputs:
desktop: ${{ steps.filter.outputs.desktop }}
mobile: ${{ steps.filter.outputs.mobile }}
steps:
- uses: actions/checkout@v6

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged but won't fix: gating changes on pull_request would skip it on push events, and the dependent jobs declare needs: [test, changes] to be able to read needs.changes.outputs.* in their if: clauses. Skipping changes would skip the dependents (skipped != success in GH Actions' default needs semantics). Working around that requires if: always() && needs.test.result == 'success' && (...) on every dependent job — more complexity than the 6-second savings justify. Leaving as-is.

Comment on lines +93 to +103
- uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Cache electron-builder downloads
uses: actions/cache@v4
with:
path: |
~/Library/Caches/electron
~/Library/Caches/electron-builder
key: ${{ runner.os }}-electron-${{ hashFiles('apps/desktop/package.json', 'pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — real DRY violation. Deferring to a follow-up PR that extracts a composite action (./.github/actions/setup-skytwin) bundling checkout + pnpm + node + turbo cache. Out of scope for this PR — keeping it focused on the wall-clock wins.

jayzalowitz and others added 3 commits May 18, 2026 02:48
…ive-toolchain caches

Three changes to .github/workflows/{build,evals,release}.yml to slash CI
wall-clock without changing release artifact coverage:

1. Turbo remote cache via dtinth/setup-github-actions-caching-for-turbo@v1
   on every job that runs `pnpm build`. The first job populates the GitHub
   Actions cache; the 5+ downstream jobs (desktop-mac/win/linux, mobile-
   android/ios, evals, release matrix) get `pnpm build` as cache hits across
   the whole monorepo. No external account needed.

2. Path-filtered desktop + mobile jobs on PRs via dorny/paths-filter@v3.
   PRs that don't touch apps/desktop/**, apps/mobile/**, packages/**, or
   lockfiles skip the 5 desktop+mobile packaging jobs entirely. Push events
   to main and tag pushes always run everything, so release artifacts are
   unaffected.

3. Native-toolchain caches: electron-builder downloads (per-OS paths),
   Gradle (gradle/actions/setup-gradle@v4), CocoaPods (Pods/ + global
   cache). These were re-downloaded on every run before.

Public repo so Actions minutes are free; wall-clock is what we were burning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
dtinth/setup-github-actions-caching-for-turbo@v1 writes to /tmp/turbogha.log,
which doesn't exist on Windows runners (fails with ENOENT on D:\tmp).

Skip on Windows only. Linux + macOS still get the turbo cache benefit.
Electron-builder packaging dominates Windows wall-clock anyway; missing
the TS-compile cache there is negligible.

Caught by this PR's own CI run on the first push.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
For symmetry with the desktop filter — turbo.json changes can affect mobile
build cache keys too. Copilot review caught the asymmetry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jayzalowitz jayzalowitz force-pushed the jayzalowitz/speed-up-ci-builds branch from 6f707bc to 13c6d5a Compare May 18, 2026 06:48
@jayzalowitz jayzalowitz merged commit 51e755b into main May 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants