fix: update bootstrap_mac.sh with modern Homebrew installer and dependencies#1399
fix: update bootstrap_mac.sh with modern Homebrew installer and dependencies#1399Devansh-567 wants to merge 9 commits into
Conversation
…dencies Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
|
It would be good to have a CI check for this. |
I have added a CI workflow in .github/workflows/test-macos-bootstrap.yml that tests the bootstrap script on macos-13 (x86_64), macos-14 (arm64), and macos-15 (arm64) whenever the script changes. It follows the same pattern as test.yml including the check-changes job and concurrency cancellation. Please let me know if you would like any adjustments. |
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
27e444c to
e373866
Compare
|
You can skip macos-14. There are some errors now, which we likely need to fix. |
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
|
Fixed - the pip3 install failure on macos-15 was due to PEP 668 which prevents system-wide pip installs on modern macOS. Added --break-system-packages flag to resolve it. |
|
We can also drop macos-13 since Github likely does not have any runners left for that. |
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
|
If I understand correctly, these changes are for a setup bash script for macOS. They do not actually build BMv2 on macOS, and neither does the macOS CI action? If so, that is fine. Just curious if anyone has tried building BMv2 on macOS after running this updated setup script. And if that works, should the CI task also do so? |
Good point. The current CI workflow only verifies that the bootstrap script runs without errors and that key packages are installed, it does not attempt to build BMv2 itself. I have not personally tested a full BMv2 build on macOS after running this script, as I don't have a macOS machine available. If you think it would be valuable, I can extend the CI workflow to attempt a BMv2 build after the bootstrap step, similar to what the Ubuntu jobs do in test.yml. That would give much stronger confidence that the script produces a working build environment. Let me know how you'd like to proceed. |
A full build is required. As is, the CI test is not very useful. |
|
@Devansh-567 I understand that you do not have a local macOS system for testing out build steps, but if you are willing, you are perfectly welcome to use as many pushes re-triggering the CI run on Github to get it to work there. Feel free to add test commands in the script, e.g. echo commands or other things, if they help you discover what is failing (if any of your attempts fail to build). The normal output of all commands should be visible in the CI logs. |
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
|
Added a full BMv2 build step to the CI workflow. It sets up the correct PATH for Homebrew bison and PKG_CONFIG_PATH for openssl before running autogen.sh, configure, and make. Using GitHub CI to iterate if anything fails as @jafingerhut suggested. |
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
Fixes #1396
Updates tools/macos/bootstrap_mac.sh to use modern macOS setup conventions:
bash installer (https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
Modeled after the approach used in p4c's tools/install_mac_deps.sh.