ci: install bash5 on macOS via Brew w/ no auto-update#63
ci: install bash5 on macOS via Brew w/ no auto-update#63Sylvain303 merged 1 commit intodocopt:masterfrom
bash5 on macOS via Brew w/ no auto-update#63Conversation
bash5 on macOS via Brew w/ no auto-update
|
I don't understand where the conflict come from is this pull request? As you know, I'm a hacker, and obviously the repository has plenty of hack 😉, especially to help my mac user. (2 up to 4 I guess 😋 ) So spending time on hack is more fun than swearing against bash 3 version and non-GNU binaries and such. This bash binary was a great hack I found not to not wait hours for the CI to finish on mac. Was more that 3 or 5 min for getting bash installed. The run link CI you gave above we are at 30s for bash + bats 😆 19s vs 1m50s (you understand of much love I put in my hack for mac! 😋 ) |
- per the deleted in-line comments, the reason it was installed as a static binary was because Brew's auto-update is slow - we can disable the auto-update though, so do that instead in order to install via Brew
1d73617 to
9f439b4
Compare
ah it was because these comments were deleted in this PR: #- if [[ "$RUNNER_OS" == "macOS" ]]; then brew update ; fi
#- if [[ "$RUNNER_OS" == "macOS" ]]; then brew install bash; fiIn #62, I had to change the var from Rebased and fixed the conflict now!
Yea Brew's auto-update is painfully slow... I think it took me like 30 min when I did it on a Mac I hadn't used in several months... So it's a general pain point of Mac users for sure, not just for CI testing 😕 At least there's a flag to disable it!
It is still slower since it has to download the newer Bash version. Now that I've rebased this on top of the CI change, can see the timings in this PR's checks (a bit faster this time around): And if you click into each run, you can get the detailed timing of each step: So, as you can see, GitHub's Mac hardware is significantly slower for every step, from setting up Go, installing, and testing. So it's not just downloading Bash 5 that's slower -- that actually doesn't add that much time -- the hardware itself being slower adds the most time. I.e. it seems to be CPU-bound, not I/O-bound (although the disk or network interface could be slower as well on the Mac hardware) |
|
Seems great. Lets merge that. |




Summary
Use
HOMEBREW_NO_AUTO_UPDATE=1 brew install bashto installbash5via Brew and skip Brew's slow auto-updateDetails
Slowly making things a bit less hacky!
Testing
Can see CI passing on my branch here (which is built on top of #62 for CI to exist)