-
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
Move prebuilds to GitHub Actions #1568
Conversation
4780ec7
to
e679ddb
Compare
All three platforms working! I set this to basically be manually triggered (pushes to master that change Example output from my fork: https://github.com/zbjornson/node-canvas/releases/tag/untagged-f98836e32200015876d6 Edit derp, no. Linux is missing all the libraries in the tarball 🤔 |
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 part I like most is the stuff you didn't copy - the build.sh
, exec_with_msys.bat
, all become unnecessary with GitHub Actions. Will be super nice to have this in! I only see a "Test" workflow but after I can look at the output, and pending a few comments, I would say it looks good.
One thing to think about: say we merge this and release prebuilds for node 14, but people ask for 2.6.0 node 14 prebuilds, and 2.5.0, and so on... we will have to keep amending the file to trigger those builds, then put it back to 2.6.1 again, which would be a lot of force-pushes to It looks like you might be able to trigger events manually using a personal access token. There's a ton of other events on that page we might consider. |
Another option would be to also allow builds from branches, not just master. You could also allow builds from branches of the form |
I was thinking about that too, but the downside is we'd have a bunch of branches with commits that aren't really useful after the build happens. |
I can make the As far as triggers, another option is a single "deploy trigger" branch where we just make commits to trigger deploys.
Another issue ... 2.6.0 as published to NPM uses node-gfx/node-canvas-prebuilt for its tarballs, so we need to manually upload artifacts there, or temporarily tinker with this GitHub Action to publish the artifacts there instead of here, or say "Node 14 requires 2.6.1 or later." NAPI would alleviate this. |
Summary of changes in last force-push:
As far as strategy for dealing with releases that were published pointing to node-gfx/node-canvas-prebuilt, I don't mind manually copying the build artifacts for the last several releases. Logs: https://github.com/zbjornson/node-canvas/runs/641647766?check_suite_focus=true |
Manually copying to node-gfx is definitely the way to go. The tag matrix is a good idea except I think it will still be noisy (you have to reset the version array to 1 element after building them all). Were you thinking of still having a trigger branch? One thing that's very important to remember is that the There is one other big-ish thing I should comment on: the build matrix normally iterates the operating system. That has obvious deduplication upsides. It doesn't seem impossible to do, but there might be some potholes along the way. Thoughts? |
Some more observations after trying to make prebuilds for Node.js v14 and older Canvas versions:
For now I think we should keep prebuild triggering isolated in a separate branch until we get a rhythm down, and can move toward automatic triggers when releases are made. I'm inclined to not release prebuilds for older versions of canvas, but we could allow the tests to fail if we decide to do it.
Because the Linux build uses a container, this isn't possible. macOS and Windows could run together (that's why I previously had Summary proposal:
Thoughts? |
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.
Ah, checking out the git tag works for versioned gyp files.
Building some old canvas versions is impossible because the tests fail, now that this runs the full suite
At least that shouldn't be possible from here on out, since the full suite is run before releasing.
For now I think we should keep prebuild triggering isolated in a separate branch until we get a rhythm down, and can move toward automatic triggers when releases are made.
Sounds good 👍
I'm inclined to not release prebuilds for older versions of canvas, but we could allow the tests to fail if we decide to do it.
We will probably get issues about it, but upgrading from v2.6.0 should be non-breaking. So yeah.
[OS in build matrix] isn't possible
I'm not even worried about that, just had to mention it. This PR is already a huge improvement.
Summary proposal
Sounds like a plan. Only thing blocking automatic builds is how stable it turns out to be. I hope more stable than AppVeyor and Travis were. Small changes to their containers and changes to pip
/msys
packages often caused me to have to intervene. OTOH some of the scripts are more robust to that kind of thing now.
@LinusU any thoughts?
Sounds good to me 👍 If we see that this works reliably I guess that we could do |
@LinusU yeah, I believe that is exactly the plan. Once we get this merged I'll probably bring over the Dockerfile, then move some of the PRs/issues from node-canvas-prebuilt to here. Some work has been done towards MUSL (node-gfx/node-canvas-prebuilt#116) and maybe someone can do ARM because I don't think I'm going to. I'm hoping that having everything centralized will make it easier for others to contribute! |
Looks like we're all in agreement, so merging! Huge thanks again to @zbjornson! |
@chearon this basically copies your
ci/
folder intoprebuild/
, and ports the travis config +install.sh
to GitHub actions. I haven't started Windows yet (and I've never used msys, but was reading through actions/runner-images#30 and it looks definitely possible).There's no manual trigger for GitHub actions yet, but hopefully builds are reliable enough that doing this on release creation, or at least push, is viable.