-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MacOS runner to Ventura, add MacOS Sonoma (M1) runner #4393
Conversation
b4925d1
to
e8e3413
Compare
d90750f
to
390d1ef
Compare
425db07
to
11b7e36
Compare
11b7e36
to
8e8d361
Compare
tools/install_mac_deps.sh
Outdated
# Install some custom requirements on OS X using brew | ||
BOOST_LIB="boost@1.84" | ||
brew install autoconf automake bdw-gc ccache cmake \ | ||
libtool openssl pkg-config coreutils bison grep \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's about flex? I remember macos shipped some ancient version by default, I do not recall the present status (esp. on builders)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Ventura laptop I'm having:
/usr/bin/flex --version
flex 2.6.4 Apple(flex-34)
This seems to be enough, ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I have an older version on Sonoma (14.3.1):
flex 2.5.35 Apple(flex-32)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably depends on installed xcode / command line tools as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, should I add a custom version? I believe in any case flex should be new enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default version is fine for recent versions of MacOS. I've built it locally on my system in the past with 2.5.35.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, default is fine now.
tools/install_mac_deps.sh
Outdated
BOOST_LIB="boost@1.76" | ||
# Set up Homebrew differently for arm64. | ||
if [[ $(uname -m) == 'arm64' ]]; then | ||
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a clean environment each time CI runs? I assume it is, but asking in case we need to check for the eval line before adding it to .zprofile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a suggestion for a cleaner command to set up brew
? I do not have a Mac so I am just pasting what people suggest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, one should be able to run this command locally, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used ChatGPT to "enhance" the script with some guards, please take another look.
Just side one: in order to test the action before commit the proper way is:
|
Interesting, never tried this. Although you still need to have your changes uploaded, no? This is a workflow to test without creating a PR or a fork? |
Yes. exactly. Just push the branch and trigger from branch by hands. Might be better and not waste CI cycles for other actions |
4430de0
to
173ce55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #4390. Build P4C for MacOS Sonoma (M1) and Ventura.
https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
TODO: Add support for the behavioral model and P4Testgen. I might do that in a separate PR.