Skip to content

ci: hand prepared macOS SDK to downstream jobs#7463

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
thepastaclaw:ci-macos-sdk-artifact
Jul 14, 2026
Merged

ci: hand prepared macOS SDK to downstream jobs#7463
PastaPastaPasta merged 1 commit into
dashpay:developfrom
thepastaclaw:ci-macos-sdk-artifact

Conversation

@thepastaclaw

Copy link
Copy Markdown

Issue being fixed or feature implemented

Fork pull request workflows can restore GitHub Actions caches but cannot persist a missing macOS SDK cache entry. The trusted build-depends cache-check job prepares the SDK, but both the downstream depends build and macOS source build previously required a successful cache restore, so the prepared SDK was lost between jobs.

Fixes #7461.

What was done?

  • Expose a short-lived same-run SDK artifact from the macOS depends cache-check job whenever it prepares the SDK.
  • Restore the persistent SDK cache first in both downstream consumers, then download the prepared artifact when the exact cache entry is unavailable.
  • Fail with an explicit error if neither the cache nor the same-run artifact is available.
  • Keep the existing trusted cache-warming behavior unchanged.

How Has This Been Tested?

  • actionlint schema and expression validation for the three changed workflows (ignoring the repository's pre-existing ShellCheck warnings)
  • Ruby YAML parsing for the three changed workflows
  • test/lint/lint-whitespace.py
  • git diff upstream/develop...HEAD --check
  • git show --check
  • git verify-commit HEAD
  • Independent exact-commit code review: zero findings, recommendation ship

The hosted cache/artifact transfer itself requires a live GitHub Actions run and will be validated by this pull request's CI.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests (workflow-only change; validated with workflow and repository linters)
  • I have made corresponding changes to the documentation (not applicable)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@PastaPastaPasta PastaPastaPasta marked this pull request as ready for review July 14, 2026 16:37
@thepastaclaw

thepastaclaw commented Jul 14, 2026

Copy link
Copy Markdown
Author

🔍 Review in progress — actively reviewing now (commit 7a80e79)

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d146b62a-01ce-48f0-b9a1-242b2be742a6

📥 Commits

Reviewing files that changed from the base of the PR and between ed436ec and 7a80e79.

📒 Files selected for processing (3)
  • .github/workflows/build-depends.yml
  • .github/workflows/build-src.yml
  • .github/workflows/build.yml
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/build-src.yml
  • .github/workflows/build-depends.yml
  • .github/workflows/build.yml

Walkthrough

The CI workflows coordinate macOS SDK preparation through cache restoration and short-lived artifacts. The depends workflow prepares and uploads SDKs on cache miss, exposing the artifact name as a job and reusable-workflow output. The source-build workflow accepts that artifact and uses it when cache restoration misses, otherwise failing explicitly. The main workflow passes the depends output into the macOS build.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Depends as depends-mac
  participant Cache as SDK cache
  participant Artifact as SDK artifact
  participant SourceBuild as build-src
  Depends->>Cache: restore SDK cache
  alt cache miss
    Depends->>Artifact: upload prepared depends/SDKs
  end
  SourceBuild->>Cache: restore SDK cache
  alt cache miss and artifact provided
    SourceBuild->>Artifact: download prepared SDKs
  else cache miss and no artifact
    SourceBuild-->>SourceBuild: fail with error
  end
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: passing a prepared macOS SDK to downstream CI jobs.
Description check ✅ Passed The description matches the workflow changes and the stated fix for missing macOS SDK caches.
Linked Issues check ✅ Passed The PR implements the linked fix by transferring the prepared SDK via same-run artifact and using it on cache miss.
Out of Scope Changes check ✅ Passed The changes stay focused on macOS SDK cache fallback and artifact handoff, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build-depends.yml:
- Around line 102-107: Update the prepare-sdks step to avoid expanding workflow
inputs directly in shell-executed template expressions; pass the required input
through the step’s environment and reference that environment variable within
the run block. Preserve the existing mac target condition, SDK setup command,
and artifact output behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e2224c18-c02d-41c2-8142-348d9da05da4

📥 Commits

Reviewing files that changed from the base of the PR and between f2b15fb and ed436ec.

📒 Files selected for processing (3)
  • .github/workflows/build-depends.yml
  • .github/workflows/build-src.yml
  • .github/workflows/build.yml

Comment thread .github/workflows/build-depends.yml
Fork pull requests can restore caches but cannot create a missing exact SDK cache entry. The cache-check job already prepares the SDK, but separate depends and source jobs lose that runner-local copy.

Upload freshly prepared SDKs as a short-lived same-run artifact and use it when either downstream exact restore misses. Trusted runs continue warming the persistent SDK cache.

Fixes dashpay#7461
@thepastaclaw thepastaclaw force-pushed the ci-macos-sdk-artifact branch from ed436ec to 7a80e79 Compare July 14, 2026 17:09
@PastaPastaPasta PastaPastaPasta merged commit 58cc177 into dashpay:develop Jul 14, 2026
44 of 46 checks passed
@UdjinM6 UdjinM6 added this to the 24 milestone Jul 14, 2026
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.

ci: mac source build fails when SDK cache entry is absent

3 participants