CI: warm Ghostty cache on main so PRs share it#178
Merged
dhilgaertner merged 2 commits intomainfrom Apr 16, 2026
Merged
Conversation
Closes #177 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dgershman
approved these changes
Apr 16, 2026
Collaborator
dgershman
left a comment
There was a problem hiding this comment.
Code & Security Review
Security Review
Strengths:
- No secrets, credentials, or sensitive data involved — this is a pure build-cache workflow
- No elevated
permissionsrequested (defaults to read-only) - Uses pinned action versions (
actions/checkout@v4,actions/cache@v4)
Concerns:
- None
Code Quality
- Cache key
ghostty-${{ runner.os }}-${{ runner.arch }}-${{ steps.ghostty-sha.outputs.sha }}is identical across all three workflows (ci.yml:40,release.yml:137,cache-warm.yml:40) — cache sharing will work correctly via GitHub's default-branch fallback - Ghostty SHA extraction step, Zig setup, Xcode version, runner (
macos-15), and theunset ZIG_LOCAL_CACHE_DIR ZIG_GLOBAL_CACHE_DIRguard are all consistent with existing workflows concurrency.cancel-in-progress: falseis the right call — avoids killing a real Ghostty build mid-flightif: steps.ghostty-cache.outputs.cache-hit != 'true'means repeated pushes with the same submodule SHA are fast no-ops (~1 min)- No path filter is a reasonable tradeoff given the no-op cost is low
Summary Table
| Priority | Issue |
|---|---|
| Green | Consider extracting the shared Ghostty cache steps into a composite action to reduce duplication across the three workflows (not blocking) |
Recommendation: Approve — clean, minimal workflow that exactly mirrors existing cache patterns. No security or correctness concerns.
dgershman
approved these changes
Apr 20, 2026
Collaborator
dgershman
left a comment
There was a problem hiding this comment.
Code & Security Review
Critical Issues
None.
Security Review
Strengths:
- No secrets or credentials exposed
- Cache key is deterministic and scoped to submodule SHA — no cache poisoning vector
cancel-in-progress: falseprevents an attacker from using rapid pushes to cancel legitimate builds- Workflow triggers only on
pushtomain(protected branch), not on external PRs
Concerns:
- None identified
Code Quality
- Cache key format (
ghostty-${{ runner.os }}-${{ runner.arch }}-${{ steps.ghostty-sha.outputs.sha }}) matchesci.ymlandrelease.ymlexactly — cache sharing will work as intended ZIG_VERSIONmatches the other workflows (0.15.2)- Xcode version, runner OS, and action versions are consistent with the existing CI matrix
- The
unset ZIG_LOCAL_CACHE_DIR ZIG_GLOBAL_CACHE_DIRin the build step matches the pattern in other workflows - Concurrency group is scoped to
cache-warm-${{ github.ref }}which is appropriate — only one warm job per ref at a time
Summary Table
| Priority | Issue |
|---|---|
| Green | No path filter — docs-only pushes still trigger the job, but as noted in the PR description these are ~1 min no-ops due to cache hit. Acceptable trade-off for simplicity. |
Recommendation: Approve — this is a clean, minimal workflow that correctly shares the Ghostty framework cache with PR and release builds. No security or correctness concerns.
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.
Closes #177
Summary
.github/workflows/cache-warm.ymltriggered onpush: mainthat does checkout → setup-xcode → setup-zig →actions/cachelookup →make ghostty(guarded bycache-hit != 'true'). Noswift build/ tests.ci.yml/release.yml(ghostty-${runner.os}-${runner.arch}-${submodule-sha}) so PRs and tag releases start hitting the warm slot automatically via the default-branch fallback.concurrency: cancel-in-progress: falseso an in-flight real Ghostty build isn't killed by a later merge. No path filter — unchanged-SHA runs are ~1 min cache-hit no-ops anyway.Why option 2 (dedicated workflow) over adding
push: maintoci.ymlAvoids re-running the full Build & Test matrix on every merge. When
vendor/ghosttyhasn't changed since the last warm, the job is effectively a no-op.Test plan
maincompletes and its "Cache Ghostty framework" post-job step logs a cache write forghostty-macOS-ARM64-<sha>.cache-hit: trueand "Build Ghostty" is skipped.mainand confirm "Cache Warm" finishes in ~1 min with a cache hit (no new cache entry created).🤖 Generated with Claude Code