Skip to content

Build and utilize pre-compiled binaries #4

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

Merged
merged 10 commits into from
Dec 9, 2022
Merged

Build and utilize pre-compiled binaries #4

merged 10 commits into from
Dec 9, 2022

Conversation

pbrisbin
Copy link
Member

@pbrisbin pbrisbin commented Dec 7, 2022

Making users wait for a stack install weeder is an unnecessary tax on
every CI run that lacks a complete cache. Instead, this PR adds an
"Binaries" action that builds binaries across a runner/GHC matrix and
stores them on a Release for use by the action. The Binaries action is
idempotent and has been run and added all the binaries already, which
our own CI uses successfully.

I made binaries for Linux and Mac and GHCs 8.8.1 to 9.2.5. Windows may
be possible, but the prep step needs to be rewritten for that
platform. These are all the GHC versions for which a released version of
weeder exists, so it should cover all users.

Arguably, these binaries should be released by the weeder project
itself. I may open an Issue soon to see if they'd be open to upstreaming
something like tooling I have here, which is pretty non-standard due to
the need to version by GHC and not by weeder.

@pbrisbin pbrisbin changed the title Make workflow to manage precompiled binaries Build and utilize pre-compiled binaries Dec 8, 2022
@pbrisbin pbrisbin marked this pull request as ready for review December 8, 2022 15:10
@pbrisbin pbrisbin requested review from a team and z0isch and removed request for a team December 8, 2022 15:20
@pbrisbin pbrisbin enabled auto-merge (squash) December 8, 2022 15:22
@pbrisbin pbrisbin requested review from a team, StevenXL and eborden and removed request for z0isch, a team and StevenXL December 8, 2022 16:12
@pbrisbin pbrisbin disabled auto-merge December 8, 2022 17:15
@pbrisbin pbrisbin marked this pull request as draft December 8, 2022 17:16
Comment on lines +11 to +29
GHCs = %W[
9.2.5
9.2.4
9.2.3
9.2.2
9.0.2
9.0.1
8.10.7
8.10.6
8.10.5
8.10.4
8.10.3
8.10.2
8.10.1
8.8.4
8.8.3
8.8.2
8.8.1
]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side quest, would it make sense to contribute this matrix to weeder itself and pull binaries from that project?

https://github.com/ocharles/weeder/releases

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocharles is using nix, which makes binary caching easy, but I'm not sure the current state of multi GHC builds in that ecosystem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was indeed surprised when I found they weren't there. It's possible needing to have a binary built against the GHC of your project was enough complexity that they punted -- or maybe there's an Actual Reason they'd not want it. I'll probably open an Issue to ask at some point.

Making users wait for a `stack install weeder` is an unnecessary tax on
every CI run that lacks a complete cache. Instead, this PR adds an
"Binaries" action that builds binaries across a runner/GHC matrix and
stores them on a Release for use by the action. The Binaries action is
idempotent and has been run and added all the binaries already, which
our own CI uses successfully.

I made binaries for Linux and Mac and GHCs 8.8.1 to 9.2.5. Windows may
be possible, but the `prep` step needs to be rewritten for that
platform. These are all the GHC versions for which a released version of
`weeder` exists, so it should cover all users.

Arguably, these binaries should be released by the weeder project
itself. I may open an Issue soon to see if they'd be open to upstreaming
something like tooling I have here, which is pretty non-standard due to
the need to version by GHC and not by weeder.
@pbrisbin pbrisbin marked this pull request as ready for review December 8, 2022 20:12
@pbrisbin pbrisbin requested a review from eborden December 8, 2022 20:12
@pbrisbin

This comment was marked as resolved.

Copy link

@eborden eborden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dope

@pbrisbin pbrisbin merged commit 1acc1f8 into main Dec 9, 2022
@pbrisbin pbrisbin deleted the pb/binaries branch December 9, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants