Skip to content

fix: separate .build cache keys for self-hosted runners - #22

Merged
ltetzlaff merged 1 commit into
mainfrom
fix/self-hosted-build-cache
Oct 28, 2026
Merged

ltetzlaff merged 1 commit into
mainfrom
fix/self-hosted-build-cache

Conversation

@ltetzlaff

@ltetzlaff ltetzlaff commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Self-hosted ARC runners check out under /home/runner/_work, hosted runners under /home/runner/work. Clang's module cache in .build records absolute paths, so a .build restored from a hosted run fails on the self-hosted runner:

error: precompiled file '…/.build/out/ModuleCache.noindex/…/SwiftShims-….pcm' was compiled with module cache path '/home/runner/work/…'
error: missing required module 'SwiftShims'

This adds a self-hosted- segment to the key and restore-keys when runner.environment == 'self-hosted'. Hosted keys are unchanged, so existing caches stay warm.

@ltetzlaff
ltetzlaff merged commit 1c04ec5 into main Oct 28, 2026
10 of 11 checks passed
@ltetzlaff
ltetzlaff deleted the fix/self-hosted-build-cache branch October 28, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant