-
Notifications
You must be signed in to change notification settings - Fork 116
Create prebuilt binaries using prebuild
#47
Conversation
Oh, this also includes a pretty comprehensive testing matrix for once we actually have tests that are okay for CI. In the meantime, this matrix just ensures that everything at least compiles on all the various platforms, architectures, and a few versions of Node. |
@lange You should be able to simplify the Travis CI config by by switching to an Ubuntu 14.04 image and removing the manual |
@lovell Good call! I've gone ahead and made that simplification. I'm not very knowledgable on C/C++ in general, but I think I did the correct thing by leaving the |
Thanks for the contribution @lange 鉂わ笍 Merged via b49c568 馃殌 First set of built binaries on a tagged release here, https://github.com/MadLittleMods/node-usb-detection/releases/tag/v1.4.1 馃槑 We should add some documentation to the README around our new binary builds and how to use them. Is there a popular pattern for downloading, requiring and using prebuilt binaries? (best way to skip native addon compilation for that particular dependency and download/unzip the binary in the right place instead) |
@MadLittleMods All the installation is handled automatically by |
@lange 馃槷 Fancy! I'm noticing that the install just hangs after it prints the
|
@MadLittleMods Oh, you're right. That can't be good. At this time I'm unsure what the cause of this could be |
Got it, the problem is that this module doesn't let the node process exit by default, and |
@lange Ahh, nice catch! We would need to shove a Because of the side-effects of the module currently when required, I think we should perhaps make a v2 with |
@MadLittleMods I agree, that seems like the fastest way forward and a reasonable approach. |
Though actually we don't need to make a new |
@lange and I chatted a bit more here, 鈽濓笍 November 11, 2017 11:25 PM
|
Closes #40.
This PR should provide almost everything needed to immediately start getting pre-built binaries automatically created and uploaded to GitHub for the following platforms:
Before merging, you'll want to set up this project on both AppVeyor and TravisCI. This should be just a few mouse clicks, all you're doing is telling these services that yes, you would like to build this project. You don't need to do any configuration at this time.
Once that's done, you'll need to replace my encrypted GitHub token (the
prebuild_upload
environment variable) with your own:Follow the steps outlined in the prebuild docs for creating a GitHub token with the appropriate scope permissions.
Use the AppVeyor "Encrypt Data" page to encrypt your token. Then, paste it over my encrypted token in line 4 of
appveyor.yml
.Install the TravisCI CLI.
From your local
node-usb-detection
directory, run the following command to get your encryptedprebuild_upload
env var with your token:Copy the resulting output and paste it over mine in line 22 of
.travis.yml
.Commit/push your changes, then merge this PR! 馃帀 If I've done everything right, tagged commits will trigger a build, and automatically publish their artifacts to the GitHub release. The release will also be created if it does not already exist.
Caveats:
Credits:
node-serialport
as a base. I made very few modifications to them.