-
Notifications
You must be signed in to change notification settings - Fork 3k
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
gh: Upload Windows build zip to GitHub releases #8787
Conversation
CT Test Results 3 files 143 suites 50m 17s ⏱️ Results for commit 80992c6. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
Great! Would it be too much to ask if you could move the trigger for new releases from the sync-github-releases script to instead trigger on gh release edit events? We can keep the manual trigger for old releases, but for new ones I would prefer if it triggered on release edit. |
Not at all, I'm on it! Something like this right? on:
release:
types: [edited] Just double-checking, when this event is trigger, would we already have the .exe installers on the release or do I need to download them from somewhere else like erlang.org just in case? |
Yes, something like that. When the event is triggered you would need to check if there is a .exe but no .zip, then you create the .zip. Think about it a bit more, I hope that updating a release within an action triggered on update release does not end up creating an infinite loop... |
Gotcha, that makes sense. I'll do some testing and let you know when it's ready! |
@garazdawi unfortunately I don't see a GitHub workflow being triggered when a release asset is uploaded. I had a: on:
release: and nothing. I determined that updating the release description does trigger the event so that can be used as a workaround. Other than that I suppose we're in polling territory. Do you have any preferences or other ideas to try? |
Sigh. Since we already do polling in sync-github-release I guess that is where this has to land. I had hoped that was not the case. That script is far from simple, but all the data to sync old releases should already be there, it is just a matter of correctly triggering the correct action when it is missing. I pushed an attempt to your branch to make it work. Could you please have a look and see if you agree and also add so that the sha of the installer is part of the .zip so that we can have some traceability. |
Don't we need some instructions in the some README somewhere, What the install.exe does so the user can choose to run it or not. (that pokes the registry, points out erlang icons and install paths). |
@garazdawi your changes are looking good to me. I added a installer.sha256 file at the root of the zip and uploaded it to my test release https://github.com/wojtekmach/otp/releases/tag/OTP-27.0.1. |
Add a README.txt or INSTALL.txt to the zip file along the I.e. Difference between the running the Maybe you could put the orig instruction file in |
@dgud good call, will do! |
Btw does it even make sense to ship Install.exe? The current directory is already a valid installation. We can't install to another directory:
My understanding is all the win32 registry writing is done from NSIS-based installer anyway. So perhaps there's no need for Install.exe and Uninstall.exe in the zip? Btw, at the moment the zip is around 130MB:
the vc_redist.x64.exe is 25M:
Should we ship it inside the zip? I didn't do that because I think it's fine for users to do it themselves, especially once documented in Install.txt or similar, however I thought I'd ask explicitly. I think the benefit of doing that would be such otp_win64_VSN.zip would be self-contained, holds everything required to install OTP offline. |
Oh I thought that Install.exe wrote registry stuff as well, but I might remember it wrong. It just creates the erl.ini which we don't want and thus erlang can't be used with sasl enabled then, So maybe we should remove the Install.exe and Uninstall.exe, the Uninstall.exe is the Nsis created uninstall right? vc_redist could be kept inside the zip as well so we get the correct one, there has been problems on windows when you installed |
Ok, I uploaded the latest test release: https://github.com/wojtekmach/otp/releases/download/OTP-27.0.1/otp_win64_27.0.1.zip We have INSTALL.txt, installer.sha256, and vc_redist.exe. Install.exe, Install.ini, Uninstall.exe, and bin/erl.ini are removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with these changes. If @dgud is as well, feel free to polish the git history if you want to and I'll merge when done.
Looks good to me. |
Rebased and squashed. I also changed base branch to |
Please place it on master, as that is where workflow_dispatch workflows run. |
Ah of course, one moment. |
Opened erlang/erlang-org#153 to show these zip archives on erlang.org |
@garazdawi apologies if this is too presumptuous and/or obvious but if this is accepted and you'd like to backfill this to, say, OTP 25, I came up with this list of releases:
and you can trigger the workflow like this:
|
Merged! Thanks! The github-actions-sync script should backfill all releases that have installers automatically. So all releases after and including 23 will be updated. |
Oh, amazing! |
@garazdawi i think I know what that HTTP 422 is, I think inputs should be under "inputs" key in request body json. I’ll send a patch in a minute. |
Done: #8807 |
https://github.com/erlang/otp/releases/tag/OTP-21.0 first .zip archive uploaded! |
It will only update 10 releases per hour, so it will take a while for it to finish.... :) |
All good, thank you so much for working on this. |
Follow-up on #8729
The workflow can be triggered like this:
Here's an example workflow run: https://github.com/wojtekmach/otp/actions/runs/10738249662
This command can be used to attach zips to already existing releases.
There is one caveat with these zip builds. They have a runtime dependency on vc_redist.exe (#8531). This is not a problem for Windows exe installers as they ship with that and run it as part of the installation. In my personal opinion this is not a deal breaker for Windows zip builds, whoever ends up using them just needs to be aware of this (and/or #8531 is addressed). The tool I'd like to use these Windows zip builds for, https://elixir-install.org, handles that, for example.