Skip to content
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

Make CI package the linux build as tar.gz right away #4126

Open
vadosnaprimer opened this issue Nov 26, 2024 · 8 comments
Open

Make CI package the linux build as tar.gz right away #4126

vadosnaprimer opened this issue Nov 26, 2024 · 8 comments
Labels
Enhancement For feature requests or possible improvements Meta Relating to code organisation or to things that aren't code

Comments

@vadosnaprimer
Copy link
Contributor

vadosnaprimer commented Nov 26, 2024

https://github.com/TASEmulators/BizHawk/wiki/Release-checklist

recompress the Linux release as .tar.gz

This requirement makes no sense because it means someone without a Linux environment can't make a proper release, since linux file perms are not a thing on windows, and maybe other problems. GitHub Actions should be able to do it automatically. (And GitLab CI should give a .tar.gz instead of a .tar.zip.)

@YoshiRulz YoshiRulz added Enhancement For feature requests or possible improvements Meta Relating to code organisation or to things that aren't code labels Nov 26, 2024
@Morilli
Copy link
Collaborator

Morilli commented Nov 26, 2024

GitHub CI currently just uses upload-artifact, which just takes a folder and creates a zip. upload-artifact does not support any other archive type besides zip, so we can't use that to create a tar.gz. However considering those are developer builds I think it's perfectly fine to provide a zip only for both linux and windows (unless there are actual issues with the zip for linux? But I'm not aware of that).

The best way I see would be to make a CI action for release artifacts specifically that can only be manually ran. That would then take care of creating the proper file type, set the DeveloperBuild thing, and whatever else we need for "full" release builds.

@YoshiRulz
Copy link
Member

As I said on Discord, the point of .tar.gz is to have correct file perms (and it's a slightly higher compression ratio on average).

The current dev build Workflow creates an archive without a top-level dir, a.k.a. a tarbomb.

@CasualPokePlayer
Copy link
Member

someone without a Linux environment

WSL2 exists

@vadosnaprimer
Copy link
Contributor Author

However considering those are developer builds I think it's perfectly fine to provide a zip only for both linux and windows.

It's for release builds (which is why I linked docs on how to release).

GitHub CI currently just uses upload-artifact, which just takes a folder and creates a zip. upload-artifact does not support any other archive type besides zip, so we can't use that to create a tar.gz.

Can we tell CI to create tar.gz and then ship that in a zip if it really wants? Someone releasing from Windows would just unzip it and it'd be perfectly ready to go.

The best way I see would be to make a CI action for release artifacts specifically that can only be manually ran. That would then take care of creating the proper file type, set the DeveloperBuild thing, and whatever else we need for "full" release builds.

Does this solve CI's inability to package them into tar.gz?

tarbomb.

Is it mentioned in the docs that it needs to be inside a folder?

WSL2 exists

If a problem is lack of Linux environment, getting a Linux environment clearly does solve it. I have it in a VM. My Win10 is too old for WSL2 and too finetuned to simply update it. I'm talking about a potential dev without a linux environment at hand.

And as mentioned above, one needs to understand how to handle permissions properly when a Linux environment already exists.

All of this could have been covered in the docs, for example a set of commands that do it all properly.

@YoshiRulz
Copy link
Member

The release checklist was written around GitLab CI, which would cover most of that.

@Morilli
Copy link
Collaborator

Morilli commented Nov 27, 2024

the point of .tar.gz is to have correct file perms

And is that not possible with zip? From a quick google search it does seem to be fully supported.

@YoshiRulz
Copy link
Member

It has r/w/x, but only for files, and not user/group. That's probably sufficient, but I still think we should use .tar.gz for Linux.

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Dec 13, 2024

.zips do have permissions, but the way to do that isn't something entirely standardized per se. As such, GitHub Actions' automatic zipping will not preserve these permissions, although if you manually .zip within the action it would preserve these permissions (although of course that'll be a double .zip, and at that point you could just put a .tar.gz in that .zip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For feature requests or possible improvements Meta Relating to code organisation or to things that aren't code
Projects
None yet
Development

No branches or pull requests

4 participants