Skip to content

Add static pre-release job #9649

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 2 commits into from
Feb 3, 2024
Merged

Add static pre-release job #9649

merged 2 commits into from
Feb 3, 2024

Conversation

TeofilC
Copy link
Collaborator

@TeofilC TeofilC commented Jan 23, 2024

Add a job that builds a statically linked cabal-install executable, and make it available for pre-releases.

Resolves #9631.

Feedback is appreciated!
In particular, I'm not sure how we want to specify the GHC version we want for this job. I've used a singleton matrix but maybe something else is better.

I've chosen to use a standard alpine image and the haskell setup action rather than a pre-baked alpine image with GHC, since we need to install the latest version of cabal-install for the test suite anyway, and this keeps things similar to the other jobs.

@TeofilC TeofilC requested a review from ulysses4ever January 23, 2024 13:33
@Kleidukos
Copy link
Member

@TeofilC Thanks for this!

@TeofilC TeofilC force-pushed the wip/static-pre-releases branch 3 times, most recently from d8173dc to 9570602 Compare January 23, 2024 17:04
Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

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

Looks cool. Have you tried it on your fork by any chance? Should suffice to merge it into master there.

@TeofilC
Copy link
Collaborator Author

TeofilC commented Jan 23, 2024

Good point. I've done that now with this commit, so we can see what a merged pipeline looks like: TeofilC@831a98f

@TeofilC TeofilC force-pushed the wip/static-pre-releases branch from 9570602 to 360e539 Compare January 24, 2024 15:53
@ulysses4ever
Copy link
Collaborator

Looks like it works? I tried the binary (from here) on my NixOS and it looks fine.

Since you dived into the pre-release business a bit, could you also add some documentation (one paragraph could be enough but as you see fits...). How to get them is already mentioned in README, so that's covered. But I think a subsection in CONTRIBUTING.md about how they're implemented would be nice. This was mentioned on Matrix last week... Also, README has to be updated to mention the static binary.

Is it the case that we only want Linux? I personally think it's fine, but we should say something somewhere in the docs...

@TeofilC
Copy link
Collaborator Author

TeofilC commented Jan 25, 2024

Sweet! I'm glad its working.

I'll write up some documentation later today. I'll take this opportunity to document the workaround from #9632 somewhere.

For the bit in CONTRIBUTING.md, I'm thinking something that gives a high level overview for how pre-releases get generated (which jobs, etc), and mention how the static one works in particular. Is that what you had in mind?

@TeofilC
Copy link
Collaborator Author

TeofilC commented Jan 29, 2024

I've added a commit with some extra documentation. Let me know if that's what you had in mind @ulysses4ever or if you'd like something more/else.

Is it the case that we only want Linux? I personally think it's fine, but we should say something somewhere in the docs...

I would add non-Linux ones but I don't know how static linking works on non-linux. I've listed the configurations we have for preview releases in CONTRIBUTING.md now.

@TeofilC TeofilC force-pushed the wip/static-pre-releases branch from 7ec92da to 873f257 Compare January 31, 2024 15:36
@TeofilC
Copy link
Collaborator Author

TeofilC commented Jan 31, 2024

(the last force-push was just a rebase)

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

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

A little wordsmithing from me, but in general it's great!

@TeofilC TeofilC force-pushed the wip/static-pre-releases branch from b63e75e to cdcec19 Compare January 31, 2024 15:55
@TeofilC TeofilC added merge me Tell Mergify Bot to merge and removed merge me Tell Mergify Bot to merge labels Jan 31, 2024
@TeofilC TeofilC force-pushed the wip/static-pre-releases branch from cdcec19 to 9460f17 Compare January 31, 2024 16:08
@TeofilC
Copy link
Collaborator Author

TeofilC commented Jan 31, 2024

I just realised I actually forgot to mention the workaround from #9632 so I've actually added that now to the README.md file 😅

@TeofilC TeofilC force-pushed the wip/static-pre-releases branch 2 times, most recently from e0fa858 to c40031d Compare January 31, 2024 16:21
@TeofilC TeofilC added the merge me Tell Mergify Bot to merge label Feb 1, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Feb 3, 2024
TeofilC and others added 2 commits February 3, 2024 10:18
Add a job that builds a statically linked cabal-install executable, and
make it available for pre-releases.

Resolves #9631.
@Mikolaj Mikolaj force-pushed the wip/static-pre-releases branch from c40031d to fa333bb Compare February 3, 2024 10:18
@mergify mergify bot merged commit bd79171 into master Feb 3, 2024
@mergify mergify bot deleted the wip/static-pre-releases branch February 3, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide statically linked linux pre-releases
4 participants