homebrew-portable-ruby
homebrew-portable-ruby copied to clipboard
Improve bottling workflow
We have lots of great automation in this repository now 🎉
One thing slowing things down, though, is if we want to build a new Ruby we end up building it (at least) 3 times:
- in the PR getting it 🟢
- on
masterafter the PR is merged to get it 🟢 - in the release workflow to get it 🟢 and uploaded to the release
Ideally the bottles would be built once (maybe twice) and not all three times.
Relatedly: portable-ruby used to have a bottle block and, if it did again, it could likely solve a bunch of these problems.
2. on
masterafter the PR is merged to get it 🟢
This was fixed months ago: we don't do this anymore - only a syntax check.
Relatedly:
portable-rubyused to have abottleblock
Note that a PR version bump to portable-ruby isn't the same as a release. We've on various occasions in the past updated Portable Ruby and then merged some dependency updates before tagging.
To achieve a bottle block prior to a release, we would need to block any portable-ruby PRs until after all other PRs are merged and then have CI force a rebase.
The historical bottle block was actually attached to the release workflow which is why it was ditched as adding an extra commit at that point is useless as we have git tags.
A possible optimisation if we want is maybe finding the last PR merged and taking the artifact from that (if not too old). A bit messy but theoretically possible.
This was fixed months ago: we don't do this anymore - only a syntax check.
Yup, sorry, missed that, nice work.
To achieve a bottle block prior to a release, we would need to block any portable-ruby PRs until after all other PRs are merged and then have CI force a rebase.
That seems reasonable. Don't need a rebase, though, we can just enable the "branch must be up to date" branch protection.
It seems like there's no real need in the case of the last two releases to rebuild Ruby again in this case when it could have used the existing build here.
A possible optimisation if we want is maybe finding the last PR merged and taking the artifact from that (if not too old). A bit messy but theoretically possible.
Yes, I think this would make a lot of sense.
Not what you were asking here, but you may also like: https://github.com/Homebrew/brew/issues/17400. This should somewhat diminish the effect of any slowdown as you can then hit release and not worry how long it takes as the PR will be ready to merge when it is done rather than needing manual steps.