CI: key macOS-metal CMake cache on Homebrew dependency versions#1204
Open
ChinChangYang wants to merge 1 commit into
Open
CI: key macOS-metal CMake cache on Homebrew dependency versions#1204ChinChangYang wants to merge 1 commit into
ChinChangYang wants to merge 1 commit into
Conversation
The build-macos-metal job cached CMakeCache.txt/build.ninja keyed only on CMakeLists.txt hashes. Those cached files bake in version-pinned Homebrew Cellar paths from pkg-config (e.g. -L/opt/homebrew/Cellar/protobuf/<ver>/lib). When Homebrew bumps protobuf/abseil, those paths vanish; an incremental `cmake .` does not refresh the cached pkg-config vars, so the re-link fails with "ld: library 'protobuf' not found". Include the installed protobuf/abseil versions in the cache key and scope restore-keys to those versions, so a dependency bump invalidates the stale configure and forces a fresh pkg-config resolution instead of resurrecting dead Cellar paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 tasks
Contributor
Author
|
I reviewed and approved this PR. |
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
Split out from #1202 as a standalone, orthogonal CI fix.
The
build-macos-metaljob cachesCMakeCache.txt/build.ninjakeyed only onCMakeLists.txthashes. Those cached files bake in version-pinned Homebrew Cellar paths emitted by pkg-config at configure time (e.g.-L/opt/homebrew/Cellar/protobuf/<ver>/lib). When Homebrew bumpsprotobuf/abseil, those paths vanish, and an incrementalcmake .does not refresh the cached pkg-config vars — so the re-link fails withld: library 'protobuf' not found.Fix
protobuf/abseilversions into adepversstep output.restore-keysto them, so a dependency bump invalidates the stale configure and forces a fresh pkg-config resolution instead of resurrecting dead Cellar paths.Touches only
.github/workflows/build.yml.🤖 Generated with Claude Code