-
Notifications
You must be signed in to change notification settings - Fork 69
Create a plan and design (ADR) for ruby builds at runtime #48
Comments
I think we should have a ruby-builder repo and a setup-ruby repo (exists). That keeps the concerns separate. Note we use tags and branches to version actions The builder repos can produce a github release in that repo per immutable ruby released version. Similar to the pattern used in the runner. https://github.com/actions/runner/releases/tag/v2.164.0 (it contains a zip for a single version times n platforms supported) This allows the setup-ruby task to query the releases api of the installer repo when resolving the semver specified in the workflow. It also allows each release to contain that version X platforms (instead of a full explosion every build). This is also consistent with other actions like setup-node where there's a global distribution point that's queryable and the setup action accepts semvers and resolves to download. Finally, instead of iterating with discussions in multiple issues, I think we should write up an ADR document. It's the process we follow regardless of whether we're developing or it's a contribution. I'll start an ADR document |
I updated the title since we need to write up an ADR before we get started doing anything. This issue will track that work. |
Right, I think this would be cleaner.
That would work, but I think that's a lot of extra work. In summary I think that strategy involves a lot of extra manual steps (or a lot more work to get things automated) and will slow us down significantly. |
I think there's a fairly straight forward ways to complete automate it with a single workflow. The discrete versions are much cleaner, offer the use of a real api and allow for scenarios such as advertising expectations (the pre-release bit). The other option is universal packages in GPR. I'll update the ADR to cover that option. It might be more work, but if we're going to do this in the actions org, we want the right pattern. It should be queryable releases and/or GPR. |
Closing this so discussions can happen in the ADR PR (we do that at GitHub so the history and design considerations are captured). |
@bryanmacfarlane @eileencodes
cc @MSP-Greg
In #44 we agreed on prebuilding Rubies in this repository.
Here I detail some steps to get started with supporting prebuilt Rubies, based on my work in https://github.com/eregon/ruby-install-builder
To get started, we need a few things to be done by the owners of this repo:
all-builds
orbuilds-for-v2
. The commit it points can be anything, I'd suggest the initial commit of this repository (58d0881).builder
. The commit used for the branch's head doesn't matter, but I would also use the initial commit of this repository (58d0881).Then I can add a workflow (via a PR) to the
builder
branch that builds Rubies and add them to that release. We can trigger builds just by pushing/PR a new commit to that branch. Changes on that branch should not directly affect users of this action, so I think it's best to be separate frommaster
(we would not want to trigger it for every commit to master). Having a dedicated branch for this makes it easy to trigger builds manually (by merging a PR to that branch, or pushing to it).Once that's done, we can start by building the stable releases (also for JRuby and TruffleRuby). That's easy, as shown by https://github.com/eregon/ruby-install-builder/blob/5f9e3c5e756846ee3df7af7883e136d4466fb144/.github/workflows/build.yml which does exactly that. I'll make a PR for that once the 3 items above are done.
Later on, we can then expand to eventually cover all Ruby versions.
As soon as we have some builds on that release, we can start integrating logic from https://github.com/eregon/use-ruby-action to use the prebuilt Rubies.
We'll probably want to maintain an explicit list of available Rubies in the action for nice error messages and being able to handle things like
2.4
=>2.4.9
.We might want at some point to use another tag/release for builds if we change significantly how Rubies are built. We could also reuse the same release, but currently https://github.com/actions/upload-release-asset does not allow to update an existing asset.
There are other concerns about building Rubies, but I'd rather discuss them on a PR to that
builder
branch to keep this issue focused.I'm happy to make PRs for getting all this started and working, based on my experience in this area, as long as the feedback cycle is not too slow.
The text was updated successfully, but these errors were encountered: