Skip to content
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

Closed
wants to merge 19 commits into from
Closed

Enable prebuilds #179

wants to merge 19 commits into from

Conversation

amejia1
Copy link
Contributor

@amejia1 amejia1 commented Apr 1, 2018

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.

Copy link
Member

@Tyriar Tyriar left a 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
Copy link
Member

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

Copy link
Contributor Author

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",
Copy link
Member

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",
Copy link
Member

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?

Copy link
Contributor Author

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';
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@Tyriar Tyriar added this to the 0.8.0 milestone Apr 4, 2018
@amejia1
Copy link
Contributor Author

amejia1 commented Apr 4, 2018

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.

@amejia1
Copy link
Contributor Author

amejia1 commented Apr 4, 2018

@Tyriar All fixed.

@amejia1
Copy link
Contributor Author

amejia1 commented Apr 5, 2018

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.

@Tyriar
Copy link
Member

Tyriar commented Apr 5, 2018

I triggered a rebuild

@@ -1,17 +1,21 @@
language: node_js
os:
- linux
- osx
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tyriar You can see here that the builds with OSX last about 15 minutes. Not only that, the OSX builds are all faster than the Linux builds.

@Tyriar Tyriar mentioned this pull request Apr 8, 2018
@amejia1
Copy link
Contributor Author

amejia1 commented Apr 14, 2018

@Tyriar I believe I've addressed or answered all concerns that were raised. Is there some other concern with this PR?

@Tyriar
Copy link
Member

Tyriar commented Apr 23, 2018

@amejia1 sorry, just haven't had a chance to get to this. I plan on merging this before releasing the next version 👍

@Tyriar
Copy link
Member

Tyriar commented May 4, 2018

I've been thinking about this a bit recently and don't want to proceed for the following reasons:

  • N-API should fix the majority of the issues with prebuilds, once Electron reaches node 10 we can start publishing single binaries per platform to GitHub releases or something with much more ease
  • Builds will take much longer when targeting so many platforms
  • I just moved the project over to the VSTS public projects preview which renders a bunch of this PR invalid
  • prebuild and prebuild-install are non-dev dependencies (ew)

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.

@Tyriar Tyriar closed this May 4, 2018
@Tyriar Tyriar mentioned this pull request May 4, 2018
@Tyriar Tyriar removed this from the 0.8.0 milestone May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prebuilt binaries
2 participants