-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Introduce prebuildify #2368
Introduce prebuildify #2368
Conversation
This looks really good. It would be nice to see if we could add a Musl option into the Linux build too, I think there are a few alpine users who would appreciate that :-) |
This should be possible using https://github.com/node-usb/node-usb/blob/master/package.json#L54 However, my experiments threw up errors: @serialport/bindings: IOError: [Errno 2] No such file or directory: './build/../../../input/node_modules/node-addon-api/nothing.target.mk' see: https://github.com/thegecko/node-serialport/runs/4508679497?check_suite_focus=true This would require further investigation, perhaps as a follow-up PR? |
I suggest to use the approach used by leveldown: Them are using prebuildify-cross too |
This is what I did for |
@thegecko Ok so what about using same approach here? |
I did, see above for the error and suggestion this is investigated and brought in a separate PR to unblock progress |
Apologies if my comments above didn't make sense. Using @serialport/bindings: IOError: [Errno 2] No such file or directory: './build/../../../input/node_modules/node-addon-api/nothing.target.mk' Any pointers as to why this is happening would help with a fix as I don't know enough about When fixed, this will produce a wider array of linux-based binaries. Until then, this PR should bring parity with the existing releases (64 bit Linux/Windows/MacOS) which could optionally be merged. A local build would still be triggered on installation for other architectures. |
Success! I found the issue with using
Sample CI run here: https://github.com/thegecko/node-serialport/actions/runs/1598927595 |
This is fantastic work A few thoughts;
|
There is an engine restriction in the
While prebuildify doesn't download from GitHub (it includes the binaries in the release), I can see two benefits for keeping the binaries in the release:
I'm not aware of your release process, but if it's a manual step, (e.g. using lerna to run |
* Add prebuildify-cross cwd * Tidy syntax * More tidy
Ahh that makes sense. |
Lets do all the things;
|
I've got a broken build in a new repo https://github.com/serialport/bindings-cpp/actions/runs/1647155559 python 3 doesn't exist on all the docker images and we seem to need it for some reason |
I opened an issue for it serialport/bindings-cpp#1 |
Building on the great work porting to N-API, this PR introduces prebuildify along with CI steps to create prebuilt binaries for:
A sample run can be seen here:
https://github.com/thegecko/node-serialport/actions/runs/1573801837
The release check looking for
refs/tags/@serialport/bindings@
should pick up the artifacts created and add them to the release.The
prepublishOnly
script should download the prebuilds for distribution prior to publishing.Note: I've also restricted the Node engine versions to only support NAPI version 6 due to v6 API calls being used