Use a matrix for library build in release workflow #1535
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm working on a Go application, using an M1 mac and an Alpine Linux container-based local development environment. I'd like to use Oso, but to do so I need linux arm64 support in the Go package. I've successfully spiked this locally, and started investigating how to bring it upstream.
In the process, I decided to take a stab at simplifying the current build by using a matrix of all the builds, and their shared/static library artifacts. This is intended to make it easier to see what targets are currently being built, and to simplify adding others in future.
It additionally introduces more parallelism, since each target will build in parallel vs. each OS before (and atm each OS has two builds). On the down side, it's not currently possible to depend on specific matrix job instances, so some jobs have to wait for additional builds. In theory, the parallelism should cancel this out, for a net win.
It's possible the naming conventions could be standardised such that the
shared
/static
fields could just beboolean
, but this way no changes are needed in the other jobs. Something to consider in future.I've been testing it in my fork but haven't achieved a fully green run yet. I'm not set up to for the m1 mac runner (are there any instructions for this?), and I'm seeing missing Python 3.6 on Windows, plus a number of seemingly spurious errors. Not sure if any of these are known issues?
I see there's some activity around this already (e.g. #1529 and #808 (comment)), so hopefully this doesn't interfere with any WIP.