-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Prebuild support #19
Prebuild support #19
Conversation
Thanks for setting this up! With the current script, is it going to try to upload to GitHub releases on every build? I'd like it to only do that for commits that bump the version number, similar to what I saw you opened an issue on that repo. Is that the reason that you're not using the module? If so, should we try to replicate a portion of that functionality here in order to avoid redundant uploads? |
It'll try and upload on every commit to master for that release. You're right, probably should use a build filter to only do that when a new tag is committed.
|
Yeah, maybe it'd be better to do an upload only if the current commit has a release tag using ( |
So just to give an update: tried to mess with using the Travis/AppVeyor deploy steps to only run prebuilds on a per-tag basis but they are proving to be uncooperative (Travis seems to lose the entire NPM installation and AppVeyor's docs regarding a Script deployer are not accurate). |
Well, I spoke too soon on Travis. Got it working. Now for AppVeyor |
@maxbrunsfeld ok, that latest commit should modify the CI configs to have a deploy step for prebuild that only runs on tags I had to add a small test command as CI won't run the deploy step when the test command fails. There's also a regex filter on the branches that should match tags. I made it super loose (as it'll technically match a branch like |
.travis.yml
Outdated
- /^v.*$/ | ||
|
||
script: | ||
- npm test |
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 thought script: npm test
would be the default since we have language: node_js
. Does it still work if you remove this?
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.
Uhh, I think Travis threw a script error
when that wasn't there. I don't remember if I had the actual test script in package.json
at the same time though. I'll test it later.
This looks great other than the one question. |
@maxbrunsfeld removed the test script section from the CI config. Seemed to still work |
Great! I’ll set up the token on Monday. |
This adds support to prebuild binaries via prebuild. This will prebuild binaries in Darwin, Linux, and Windows (32 and 64 bit) for all supported targets in the node-api project. You can see how the binaries end up being built/uploaded on my test release version v0.12.16.2.
I'm hoping the Travis Linux OS is enough to provide support for Linux electron builds. If additional binaries are required the TravisCI config might have to be modified to build under additional Linux targets.
prebuild-install is used to download the prebuilt binaries via a custom
install
script.Only configuration that is needed would be for you to add a Github Personal Access Token with the
repo
scope as a secure environment variable namedPREBUILD_UPLOAD
in both TravisCI and AppVeyor. See the prebuild docs as to why.This resolves #16