Cache desktop build assets in CI and release workflows#2543
Cache desktop build assets in CI and release workflows#2543juliusmarminge merged 2 commits intomainfrom
Conversation
- Use actions/cache restore/save for Bun, Turbo, Playwright, and desktop artifacts - Stage per-platform release assets before publishing
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Cross-OS cache restore fails without enableCrossOsArchive
- Added enableCrossOsArchive: true to the cache/save step in the build job and all four cache/restore steps in the release job, ensuring the runner OS is excluded from the cache version hash and cross-OS cache lookups succeed.
Or push these changes by commenting:
@cursor push 5ff99450c1
Preview (5ff99450c1)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -358,6 +358,7 @@
with:
path: release-artifacts/desktop-${{ matrix.platform }}-${{ matrix.arch }}
key: release-assets-${{ github.run_id }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.run_attempt }}
+ enableCrossOsArchive: true
publish_cli:
name: Publish CLI to npm
@@ -440,6 +441,7 @@
restore-keys: |
release-assets-${{ github.run_id }}-mac-arm64-
fail-on-cache-miss: true
+ enableCrossOsArchive: true
- name: Restore macOS x64 desktop assets
uses: actions/cache/restore@v5
@@ -449,6 +451,7 @@
restore-keys: |
release-assets-${{ github.run_id }}-mac-x64-
fail-on-cache-miss: true
+ enableCrossOsArchive: true
- name: Restore Linux x64 desktop assets
uses: actions/cache/restore@v5
@@ -458,6 +461,7 @@
restore-keys: |
release-assets-${{ github.run_id }}-linux-x64-
fail-on-cache-miss: true
+ enableCrossOsArchive: true
- name: Restore Windows x64 desktop assets
uses: actions/cache/restore@v5
@@ -467,6 +471,7 @@
restore-keys: |
release-assets-${{ github.run_id }}-win-x64-
fail-on-cache-miss: true
+ enableCrossOsArchive: true
- name: Stage desktop assets
shell: bashYou can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit a2460de. Configure here.
ApprovabilityVerdict: Approved Changes are limited to CI/CD workflow files, optimizing how desktop build artifacts are cached between jobs. No runtime code is affected, and the modifications follow standard GitHub Actions caching patterns with added validation checks. You can customize Macroscope's approvability policy. Learn more. |
…fact transfer The build jobs save caches on macOS and Windows runners, but the release job restores them on a Linux runner. actions/cache includes runner.os in its internal version hash by default, making caches from other OSes invisible even when the user-specified key matches. Adding enableCrossOsArchive: true on both cache/save and cache/restore steps ensures the OS is excluded from the version hash, allowing cross-OS cache lookup to succeed. Applied via @cursor push command


Summary
Testing
release-artifacts/desktop-*before publishing.Note
Medium Risk
Release pipeline now depends on Actions cache entries (restore/save + cross-OS archives) instead of uploaded artifacts, so cache misses/evictions or key mismatches could break publishing. Changes are workflow-only but affect critical build/release automation.
Overview
Improves CI caching behavior by splitting Bun/Turbo and Playwright caches into explicit
actions/cache/restore+ conditionalactions/cache/savesteps, saving only on cache miss.Changes release asset handoff by replacing
upload-artifact/download-artifactwith per-platform/arch cached bundles (release-artifacts/desktop-*) keyed by run metadata, then explicitly restoring and staging them intorelease-assetswith fail-fast validation before publishing/merging manifests.Reviewed by Cursor Bugbot for commit 2319620. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Cache desktop build assets in CI and release workflows
actions/cacheinto separate restore and conditional save steps in ci.yml for Bun/Turbo and Playwright caches, so saves only occur on cache misses.actions/upload-artifactwithactions/cache/savefor desktop build artifacts, writing outputs to per-matrix directories keyed by run ID, platform, arch, and attempt.publish_clijob now restores each platform's cache explicitly withfail-on-cache-miss: true, then stages all assets into a flatrelease-assetsdirectory with validation that no directory is empty.download-artifactfor these assets will no longer find them.Macroscope summarized 2319620.