-
Notifications
You must be signed in to change notification settings - Fork 233
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
Enable prebuilds #179
Enable prebuilds #179
Conversation
Github will delete them if they appear in public repositories.
Script will mainly be used to ensure prebuilt binaries are only built for releases.
Build for all supported targets in the current LTS release of Node.
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.
Thanks @amejia1. What's your confidence that this will work? Do you think we'll need a few test publishes to verify?
README.md
Outdated
@@ -51,6 +51,21 @@ ptyProcess.resize(100, 40); | |||
ptyProcess.write('ls\r'); | |||
``` | |||
|
|||
## Prebuilt 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 think the Building section should be above this one
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.
Ok, will change.
package.json
Outdated
@@ -4,7 +4,7 @@ | |||
"author": { | |||
"name": "Daniel Imms" | |||
}, | |||
"version": "0.7.3", | |||
"version": "0.8.0-0", |
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 make this -beta1 for testing
"prepublish": "npm run tsc" | ||
}, | ||
"dependencies": { | ||
"nan": "^2.6.2" | ||
"nan": "^2.6.2", | ||
"prebuild": "^7.4.0", |
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.
Are both of these dependencies or is one a dev dependency?
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.
Both need to be regular dependencies. The prebuild program is a fallback for those on some unsupported platform.
const regex = new RegExp('^\\d+\.\\d+\.\\d+$'); | ||
|
||
function spawnPrebuild(args) { | ||
let command = 'prebuild'; |
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.
Is importing the module and running like that an option? Doing this will prevent running via ./scripts/prebuild.js
since it's not on the $PATH
.
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.
This script should be run via npm which will set $PATH correctly.
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.
@amejia1 is it possible to require('prebuild')
and use it like that? That way the script should work both ways. Otherwise running 'node_modules/.bin/prebuild' would be preferable to this so it can be run without npm.
I verified this in my forked repo. It should work in the main repo once you setup an access token in you build settings for AppVeyor and TravisCI. |
@Tyriar All fixed. |
I think the test that failed is a one off. There was a problem finding the 'npm' command to install all dependencies however it worked fine before. |
I triggered a rebuild |
@@ -1,17 +1,21 @@ | |||
language: node_js | |||
os: | |||
- linux | |||
- osx |
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.
Do you know if there's a way to disable these selectively for PRs? On the free tier it takes OSX a long time to run which adds additional clicks to check whether something passed on Linux.
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.
Actually, OSX builds are now a lot faster as compared to earlier in the year. I don't know how to disable them selectively in any case.
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.
@Tyriar I believe I've addressed or answered all concerns that were raised. Is there some other concern with this PR? |
@amejia1 sorry, just haven't had a chance to get to this. I plan on merging this before releasing the next version 👍 |
I've been thinking about this a bit recently and don't want to proceed for the following reasons:
In the meantime I expect @daviwil's https://github.com/daviwil/node-pty-prebuilt to stay up to date with the very few node-pty releases that will go out. @amejia1 sorry about the hassle. |
This will enable prebuilds through the prebuild module. You can see what prebuilt binaries are generated here. This fixes #46 .
Note that uploads to the main git repo won't be enabled until the Travis CI and AppVeyor builds are adjusted to include the
prebuild_upload
environment variable with an appropriate access token.