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
Build node-sqlite3 for node-webkit on Travis CI #252
Conversation
There's currently no API to determine the most recent version of node-webkit over the Web.
Note: `make clean` happens after `npm install nw-gyp -g` because we intend to use `nw-gyp` later to rebuild the existing build of node-sqlite3.
Release notes https://groups.google.com/d/msg/node-webkit/bPjur7aFaQc/4TP6o3SM-8sJ say that 0.8.4 fix improves the behaviour on OS X.
It seems (in installation logs) that nw-gyp does not contain any binary (i.e. compiled) addons. Thus it's fine if nw-gyp survives 64bit→32bit switch of our Node.js environment on Linux.
This commit does also prepend `on Linux 64 bit:` to some comments (making it easier to understand what subplatform is targeted). On Linux nw-gyp is installed earlier (in 64 bit mode) and thus we can refrain from its reinstallation for 32 bit, speeding things up.
Try a feature originally introduced in node-pre-gyp v0.4.2 commit mapbox/node-pre-gyp@370024a for mapbox/node-pre-gyp#14.
Working around a temporal inavailability of node-pre-gyp v0.4.2. See mapbox/node-pre-gyp#35 for details.
Line 1700 of a Travis CI log indicates that Otherwise it runs |
I've opened a pull request (mapbox/node-pre-gyp#36) to add |
A pull request (mapbox/node-pre-gyp#36) is opened to land a partial fix for node-pre-gyp's validation process. This commit uses a source branch of that pull request. After this commit, node-pre-gyp's validator is expected to launch `nw` instead of `node-webkit` on Travis CI's Linux. A former ENOENT error is expected to be replaced by a node-webkit's error when the engine realises it's given a node-sqlite3 module's JavaScript instead of some HTML5 application.
Commit Mithgol/node-pre-gyp@eaea6e1 is now included in the node-pre-gyp's source used here.
The 6655d7c's resulting Travis CI log shows that, while mapbox/node-pre-gyp#36 seems okay (i.e.
The former of those two obstacles is to be solved by downloading and unpacking of the corresponding (i.e. platform-dependent) node-webkit engine. (This feature can be done in commits here, but should later be transferred to node-pre-gyp.) The latter of those two obstacles is to be solved by adding some HTML5 tester to node-pre-gyp (a mere |
The a86e300's resulting Travis CI log is worse than I imagined. It seems that Linux 64bit node-webkit can't run on Travis (lines 1271—1273):
|
Of course, there must be a way to trick Gtk into believing it has a display. But that's totally outside of my area of knowledge, at least currently. |
Read nwjs/nw.js#769 and understood that it's possible to start Made a new commit to test if setting |
Got |
Yet another unexpected obstacle:
Why node-webkit for Linux 32 bit expects |
Great progress and really valuable learning. The testing of binaries is a hard problem in general let along on a headless server with a GUI browser. The most important thing to me is to have builds automated, so I'm not burdened with this when releasing a new version. The big gap here is windows. Want to put thought into that. Really wish Travis supported windows, what alternatives do we have? |
This commit also erases `sudo apt-get update --fix-missing` introduced in one of the previous commits, because it didn't help.
First thing that comes to mind is that Travis CI admins at travis-ci/travis-ci#216 said “we hope to have some news to announce in the coming weeks” but it's been ≈7 months since that comment. |
To make Travis CI build and test GEOS for Windows it was suggested to use Wine. |
Follow the following suggestion: http://askubuntu.com/questions/363878/how-to-install-32-bit-matlab-in-ubuntu-64-bit/363879#363879
Used “Search the contents of packages” at http://packages.ubuntu.com/
Found in “Search the contents of packages” at http://packages.ubuntu.com/ using “lucid” distribution (instead of default “saucy”). This commit runs one `sudo apt-get -y install` for every package; otherwise each failure stops the whole installation process, but that makes the debugging painful (a test takes 13 minutes to run).
Two packages not found → removing.
The following `npm install` takes more than 3 seconds anyway; `xvfb` would already start before it becomes necessary for node-webkit.
**Achievement unlocked: ** 64bit and 32bit node-webkit can coexist on the same Travis CI Linux box within the same building&testing job. |
@springmeyer You can land all of the above. There's still some room for improvement ( |
Okay, excellent work, thank you! Would you mind if I merged manually? I'd like to take a shot at now at moving the script out of the travis.yml and into separate scripts. As far as the testing, I found that on OS X at least running |
I'd recommend merging this automatically and then starting to build a less monolithic approach:
|
Opening There should be a real node-webkit-based application (as a part of node-pre-gyp) that would at least attempt to |
okay, sounds good on merging as is and next actions: 1) breaking travis.yml apart into managable parts, and 2) actually testing node-webkit application rather than |
Build node-sqlite3 for node-webkit on Travis CI
AppVeyor CI 2.0 beta testing was announced on February 19. It says “Free plan with support of public repositories only”. |
@Mithgol nice find. looks promising! |
Created #261 to follow up the Windows issue on a separate page. |
Travis CI configuration changes proposed in #251.
node-pre-gyp package testpackage
Note: there's currently no API to determine the most recent version of node-webkit over the Web. And thus the desired node-webkit's version is given after Node's version in the matrix.
TODO: