-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
nightly: Use GitHub Actions for scheduled builds #3334
Conversation
Hi, I am not very familiar with GitHub Actions.
I am concerned that this great project remains as easy to access as possible, and that there is nothing off-putting to new users:
Hopefully we can get over this bump in the road, and continue enjoying Micro. Kind Regards Gavin Holt |
Yes, but here we're discussing the nightlies, not the releases.
Maybe they're harder to find for people expecting them under "releases" resp. https://github.com/zyedidia/micro/releases?q=nightlies.
From my perspective it still works, because it points to the last available release, which currently is the
Yes, indeed this will introduce some inconsistency where new nightlies can be found, but unfortunately we don't have access to every single bit of
Yes, see above, because it's the last real release.
That is indeed a valid point. Only the "real" release artifacts can be accessed without login. :( |
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.
The README (under eget
) is using nightly tag. We should put a warning above it
Could we also mention this in README so that people know where to go?
@@ -0,0 +1,36 @@ | |||
name: Nightly builds | |||
on: | |||
schedule: |
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.
schedule: | |
workflow_dispatch: # Allows manual trigger | |
push: | |
branches: | |
- master |
I feel like triggering every night is a bit too much, and it spams the Actions page
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.
Look here how the actions log is already "spammed" by every automated "Build and Test" trigger for approved (for building) PR.
In my opinion one build per day more doesn't make the difference here.
Wikipedia supports my understanding of what a nightly is used for. 😉
Does a nightly really need to be started manually? We should keep it simple and trigger it once a day for the actual present HEAD
of the master
.
The nightly
tag could become handy in the moment we like to go the way to create a kind of nightly "release" to publish it globally (no GitHub account needed for the download). But then the nightly
tag must be set automatically and a third party action must be used for the release handling.
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 don't mind either way, it's just a suggestion and how I normally do it.
010b2f2
to
6c571b1
Compare
Should we try to use github action to modify the release page? https://github.com/marketplace/actions/automatic-releases |
Hi Firstly, apologies for confusing Secondly, apologies but I can't find any new binaries in the I am keen to try a windows binary from the current master branch - incorporating all the hard work merged in since April. Any guidance? Kind Regards Gavin Holt |
They will be available first in the moment the PR and thus |
We could, but I've doubts that this will work, since it requires the |
I am inclined to try it. You can read more about it here As for permissions, the release page falls under contents category from the PAT/API access which github action does seem to have write permission by default. See here I don't think it will hurt anything giving it a try. If it works, it will solve the long-standing "we can't create releases" issue and don't require people to go to the action page (and have github account) to get the binaries. If it doesn't, we can just go back to the plan discussed in this PR. |
Ok, I see. Thank you for the poke into the docs. In case everything goes fine we can try to move the release creation into a manual and/or release tag ( |
6c571b1
to
b9269a2
Compare
In my fork it was already working, but I had to activate Edit: |
@JoeKar |
I wrote Zachary a direct mail. Maybe he can support here short noticed. |
b9269a2
to
eb3ede6
Compare
Thanks for looking into this. The permissions are already set to read/write under "Workflow permissions." Is there something that is not currently working for the actions? |
To be honest, we didn't try so far, since we wouldn't push stuff were we're unsure if it works or not. But this information is awesome, because then we're able to leave this task up to cyclic Actions and we can plan to do the releases on a similar way (just add tags and let react accordingly).
I though about this as well, but couldn't find an "official" convention for the SHA-# file extension. I decided to go with the old-school 3-digit and common extension name, because it doesn't make a difference when we use something >SHA-256 in the future. This... shasum -c *.sha ...will check whatever it's in no matter if SHA-1, 3, 256, 512 etc.pp and no one needs to care about it (we don't have to use |
Ah indeed, good point. |
cp assets/packaging/micro.1 micro-$1 | ||
cp assets/packaging/micro.desktop micro-$1 | ||
cp assets/micro-logo-mark.svg micro-$1/micro.svg | ||
#!/bin/sh |
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.
Maybe it's a good idea to use #!/bin/sh -e
? Any of the commands in this script may potentially fails, so we'd better not ignore such failures silently?
What do these github actions do if the command (cross-compile.sh
in this case) exits with a non-zero status? I hope they abort the action and log the stderr output?
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.
set -e
added. The action will stop at the first error and not proceed the upcoming steps. As far as I've seen while testing in my fork it prints the error which appeared.
1. doesn't need a given parameter to set the VERSION, since it is determined itself 2. moves the *.deb only in case package-deb.sh succeeded 3. rename *.tar.gz to *.tgz shorten the extension to... 4. add SHA256 sums per artifact
eb3ede6
to
c701ba6
Compare
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.
Let's try it.
Hi, I waited up 'til 1 AM (BST), like an expectant father, but no new bouncing baby binary! Happy Fathers Day Gavin Holt C:\Users\PC\Downloads>micro -version |
@Gavin-Holt: Edit: As expected (with /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master* |
😊 I have it now. Many thanks to all those who made this delivery possible. Kind Regards Gavin Holt |
Hi The
but the displayed information does not match.
Is it very difficult to make the Sorry I have no clue myself, but thought I should highlight the inconsistencies. Kind Regards Gavin Holt |
This is partly caused by the old builds (micro-2.0.14-dev.181-*) which are still generated by the old nightly approach triggered by @zyedidia. These builds can now be disabled, but unfortunately we've no control over them. |
Did it today. |
Thanks for setting up GitHub Actions to release nightly builds! I have disabled the old method. |
tar -czf micro-$VERSION-$1.tgz micro-$VERSION | ||
sha256sum micro-$VERSION-$1.tgz > micro-$VERSION-$1.tgz.sha | ||
mv micro-$VERSION-$1.* binaries |
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 realized using $VERSION
within the archive resp. asset name is counterproductive when used for the nightly
upload, because the softprops/action-gh-release
will only delete and update assets with the same name present.
Having an updated from e.g. 2.0.14-dev.243
-> 2.0.14-dev.244
-> 2.0.14-dev.245
fills the nightly
"release" with all of the assets.
The correction of the nightlies currently needs manual adjustment to be cleaned up.
So I suggest to slightly adapt the tools/cross-compile.sh
again to allow a custom string as archive version, if given otherwise use the parsed version. The nightly
action then can use tools/cross-compile.sh nightly
to provide fixed asset names, which will be properly handled by the softprops/action-gh-release
action.
I wasn't able to find an option cleaning up all the assets present at one release.
Side note:
The SHA sum created for the nightlies is only valid till the next build will be done for the same version.
PR: #3418
Hopefully this is a more robust approach to schedule, build and upload the nightlies.
cross-compile.sh
improved for the GitHub Actioncross-compile.sh
includes MD5 sums for artifact verificationFixes #3332
@Neko-Box-Coder
Thank you for the input.