Conversation
Restoring /opt/homebrew/Cellar/qt from the cache brought back Qt's files but not Homebrew's symlinks, while the cache hit skipped `brew install qt`. Since `brew --prefix qt` prints /opt/homebrew/opt/qt even when Qt is not installed, the PATH silently pointed at a missing directory and qmake was not found. - Cache only the downloaded bottles, never the Cellar. - Always run `brew install qt`; it is a no-op when Qt is present and it is what creates the symlinks the later steps rely on. - Export the Qt bin directory once through $GITHUB_PATH. - Fail early with an explicit `qmake --version` check.
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
The macOS job started failing with
qmake: command not foundas soon as the Homebrew cache was populated by an earlier green run.Two things combined:
/opt/homebrew/Cellar/qtbrings back Qt's files but not Homebrew's symlinks (/opt/homebrew/opt/qt, thebin/entries), and the cache hit skippedbrew install qt, which is what creates them.brew --prefix qtprints/opt/homebrew/opt/qteven when Qt is not installed, soexport PATH="$(brew --prefix qt)/bin:$PATH"silently pointed at a missing directory instead of failing.Changes, macOS job only:
~/Library/Caches/Homebrew/downloads), never the Cellar.brew install qt— a no-op when Qt is already installed, and the step that creates the symlinks the rest of the job relies on.bindirectory once through$GITHUB_PATHinstead of repeatingexport PATHin every step.qmake --versioncheck so a broken toolchain fails at install time with a clear message.Always cache brewstep;actions/cache@v5saves in its post-step.The Windows and Ubuntu jobs are untouched.
Test plan
build-macosreachesCheck Qt installationand prints a Qt versionbuild-macosconfigures, builds, and runs the testsbuild-windowsandbuild-ubuntustay green