brew CI: install non-rotary build deps#1452
Conversation
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
4a08fbb to
3542f94
Compare
| brew install ${PROJECT_FORMULA} ${PROJECT_ARGS} --only-dependencies ${HEAD_FLAG} | ||
| # the following is needed to install :build dependencies of a formula | ||
| brew install $(brew deps --1 --include-build ${PROJECT_FORMULA}) | ||
| # filter out the rotary dependencies since they require --HEAD |
There was a problem hiding this comment.
I was going to ask about this but I saw that you had reverted a commit adding - -HEAD. With this change you're r filtering out rotary packages? Do they not need to be installed?
There was a problem hiding this comment.
the issue is that brew install --only-dependencies doesn't install :build dependencies like pybind11. My initial fix for this in #630 was to run brew install a second time and explicitly pass it all dependencies (including build dependencies).
The initial form of this PR in 4a08fbb removed the second brew install invocation and added --build-bottle to the brew install --only-dependencies call. I think this would work if we didn't have formulae using --HEAD, but it failed when I tested it:
https://build.osrfoundation.org/job/gz_utils-ci-pr_any-homebrew-arm64/21/console
15:41:28 + brew install gz-utils5 --only-dependencies --build-bottle --HEAD
...
15:41:30 ==> Installing gz-rotary-utils from osrf/simulation
15:41:30 Error: The following formula cannot be installed from bottle and must be
15:41:30 built from source.
15:41:30 gz-rotary-cmake
So that would have been a more elegant approach, but it explicitly doesn't work with --HEAD formulae. So my hacky alternative is to just exclude gz-rotary-* formulae from the second brew install call so that we don't have to pass --HEAD to that call
Let me know if I should include any of this in the script comments, since I apparently didn't explain it enough there
There was a problem hiding this comment.
Okay. The part I was missing was that brew deps --1 include-build will include all dependencies including :build, not just the :build dependencies.
Follow-up to #1451 to fix the failure in gazebosim/gz-utils#203.
The
brew install $(brew deps --1 --include-build ${PROJECT_FORMULA})line is an attempt to install the build dependencies of a formula. I had previously not included--HEADin this command since it would try to install the HEAD version of build tools (which we don't want), but now it's failing if the package has rotary dependencies. For now, I think the simplest thing is to filter out thegz-rotary-*dependencies.Testing
Testing in gazebosim/gz-utils#203