refactor(ci): extract preview release into separate workflow and fix native binary cache#682
Merged
Merged
Conversation
The hashFiles glob `swift/**` included .build/ artifacts on macOS runners, producing a different hash than clean Ubuntu checkouts — so cache restores never matched. Narrowed to Package.swift + Sources/** to stabilize the key. Also: trigger native builds when their workflow YAML changes, fall back to building when the cache misses (instead of failing), and use needs.*.result to decide artifact-vs-cache in release-preview.
hashFiles produces different results on Windows vs Linux, so Rust binary caches saved from Windows runners couldn't be restored on Ubuntu. Fix by: - Computing the Rust source hash once on Ubuntu and passing it to the build-native-rust workflow as an input for cache key consistency - Checking all 3 platform caches (linux-x64, linux-arm64, win32-x64) before deciding whether to skip the Rust build - Using the pre-computed hash for cache restores in release-preview
9a26eb7 to
d26a6cd
Compare
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-docs-mcp | d26a6cd | May 01 2026, 06:56 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | d26a6cd | Commit Preview URL Branch Preview URL |
May 01 2026, 06:58 AM |
Move check-release-packages into build-and-test job and use its output to skip all native binary checks/builds when varlock is not part of the preview release. This avoids expensive macOS/Rust builds on PRs that only change integrations or other packages.
Instead of manually diffing files and mapping them to packages, use bumpy's `inCurrentBranch` flag to determine which packages are being bumped in this PR. This correctly handles bump files (which live at the repo root, not inside package dirs) and avoids publishing previews for packages with pending bumps already on main.
commit: |
Contributor
|
The changes in this PR will be included in the next version bump.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
test.yamlinto its ownrelease-preview.yamlworkflow, triggered byworkflow_runafter the CI test suite passestest.yaml— now just lint, typecheck, build, and test (no more native binary builds or preview publishing)Motivation
The preview release logic was coupled into the test workflow, which meant:
Now the test workflow runs fast and focused. Preview releases happen in a separate workflow that only runs after tests pass.
Test plan
test.yamlshould pass on PRs without needing native binariesrelease-preview.yamltriggers after test suite completes on PRs