Repository navigation
CI: add automated GitHub prereleases - #8914
Conversation
Mikolaj
left a comment
There was a problem hiding this comment.
Let's see how it goes. We can add ghcup pre-releases as an addition or replacement afterwards, based on the experience with this one.
|
@Mikolaj thanks! Yes, creating a job for ghcup metadata channel would be even better, but I don’t think it necessarily makes this PR useless. I imagine that there would be people who find GitHub prerelease UX more convenient (Also, ghcup is not always applicable, e.g. it doesn’t work on NixOS). Also, it’s not exactly trivial to create a ghcup channel from scratch. It’s not hard either, but my hunch is that we may have to wait for a while until this happens… |
| fi | ||
| tar -cvf cabal-head.tar -C $(dirname "$CABAL_EXEC") $(basename "$CABAL_EXEC") | ||
| echo "CABAL_EXEC_TAR=cabal-head.tar" >> $GITHUB_ENV | ||
| export CABAL_EXEC_TAR="cabal-head-${{ runner.os }}-x86_64.tar" |
There was a problem hiding this comment.
Should it be .tar or .tar.gz (or .tar.whatever-else)?
There was a problem hiding this comment.
That's a good point. I just checked that .gz shrinks the size from 53M to 10M. There's a worry though that Windows users may not have a great support for .gz. (I'm not sure about .tar either). People used to create zips just based on this in my experience. And I don't know anything about Mac. So, I just left whatever was there before (which was a tar)... Maybe if we have tar, gz shouldn't be a big additional hurdle, and I should do it, thanks!
There was a problem hiding this comment.
It looks like tarring was added by @jneira who is also our main Windows expert. Javier, do you have any thoughts on gzipping the binary on top of tar?
There was a problem hiding this comment.
I thought the file was already gzipped, just with the wrong extension (below we use tar -xf …).
There was a problem hiding this comment.
tar -xf means "eXtract a tar File". In contrast, tar -xzf would mean "eXtract a gZipped tar file`.
Fun fact: last week I learned that you can omit - in tar -xf and alike. How cool is that?!...
There was a problem hiding this comment.
iirc there was not specific reason to not use gzip and windows support is similar between gz.tar and tar (nowadays people uses 7z which supports both)
There was a problem hiding this comment.
thanks! will update the pr
|
Let's wait a little bit and see if we hear from Javier about |
|
I recall when I distributed my stuff I had problems maintaining correct permissions with zip files.
|
* CI: add automated GitHub prereleases * CI: gzip binary artifacts (ffaf1's review) --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
As announced on the meeting, this PR adds an automated GitHub prerelease holding the
cabal-installbinaries in this repository. If you wanna taste what it looks like, you can head out to my fork: the Releases tab has thecabal-headprerelease with three binaries for the three main OSes in theAssetssection -- that's what you get with this PR.I add a note about it in the README but perhaps some more advertisement could be done (not sure how). Prereleases appear only on the Releases tab in GitHub UI, while proper releases are also featured on the index page of the repo. So, it's not very visible...
I'm not sure if
ghcupcan be used to easily get these. Suggestions are welcome. I don't thinkghcupcan add much on top of awgetfor the direct link (e.g.wget https://github.com/ulysses4ever/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar; well, you need to untar and put it in the right spot, I guess...). Again, if someone is willing to explore it, I can add instructions to the README.The artifacts that I put in the prerelease are built in the CI as usual, so they're debug builds with assertions enabled. It'd be more work to have actual release-mode binaries, and I didn't feel like it's worth it. Hopefully, after #8821, it's not as hard to use debug binaries. But if we get too much complains about failing assertions, we can consider going the full-blown release mode instead of debug mode.
Should close #8541, I think.
Please include the following checklist in your PR:
Patches conform to the coding conventions.Any changes that could be relevant to users have been recorded in the changelog.Include manual QA notes if your PR relates to cabal-install.