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

Build node-sqlite3 for node-webkit on Travis CI #252

Merged
merged 29 commits into from Feb 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a9555b4
Travis CI: non-empty NODE_WEBKIT="0.8.3" is set for Node v0.10
Mithgol Feb 6, 2014
31a11de
install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty
Mithgol Feb 6, 2014
6903cde
Travis CI: rebuild for the node-webkit (version `$NODE_WEBKIT`)
Mithgol Feb 6, 2014
20ed666
build for node-webkit 64bit on Linux (uninstall nw-gyp later)
Mithgol Feb 6, 2014
c894e47
attempt a build for node-webkit 0.8.4 (instead of 0.8.3)
Mithgol Feb 6, 2014
4f6db19
do not uninstall nw-gyp on 64 bit Linux
Mithgol Feb 6, 2014
5992e97
node-pre-gyp package testpackage (if NODE_WEBKIT is not empty)
Mithgol Feb 6, 2014
e3324ce
added `--runtime=node-webkit --overwrite` twice
Mithgol Feb 13, 2014
ff08389
oops, the previous commit requires node-pre-gyp v0.4.2 or newer
Mithgol Feb 13, 2014
7dc529b
use the tarball version of node-pre-gyp v0.4.2
Mithgol Feb 13, 2014
b580a1d
use `https` (instead of `http`) in the value of `remote_uri`
Mithgol Feb 13, 2014
738aaf6
try node-webkit's filename fix
Mithgol Feb 13, 2014
6655d7c
update node-pre-gyp's source branch
Mithgol Feb 13, 2014
a86e300
on Linux 64 bit: download, unpack, use and erase node-webkit
Mithgol Feb 13, 2014
6fc9166
for testing node-webkit, launch a virtual display
Mithgol Feb 13, 2014
65280f0
on Linux 32 bit: download, unpack, use and erase node-webkit
Mithgol Feb 13, 2014
65be174
also install libx11-6
Mithgol Feb 13, 2014
ccf56f4
try installing libx11-dev
Mithgol Feb 13, 2014
05d7f8c
sudo apt-get update --fix-missing
Mithgol Feb 13, 2014
fcdc43a
save and restore PATH
Mithgol Feb 13, 2014
e370b9c
attempt ldd
Mithgol Feb 13, 2014
54f460b
use the primary node-pre-gyp's repository
Mithgol Feb 13, 2014
8b83d45
on Linux 64 bit: also `ldd nw`
Mithgol Feb 13, 2014
6dbb9d9
install libx11-6:i386
Mithgol Feb 13, 2014
0713dce
install ia32-libs
Mithgol Feb 13, 2014
354766a
install 32 bit stuff necessary for node-webkit 32 bit
Mithgol Feb 13, 2014
469d879
also install `libudev0:i386`
Mithgol Feb 13, 2014
9c555c3
do not install `libpangocairo:i386` and `libpango:i386`
Mithgol Feb 13, 2014
e367dac
remove `sleep 3`
Mithgol Feb 13, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 53 additions & 2 deletions .travis.yml
Expand Up @@ -3,7 +3,7 @@ language: cpp
env:
matrix:
- export NODE_VERSION="0.8"
- export NODE_VERSION="0.10"
- export NODE_VERSION="0.10" NODE_WEBKIT="0.8.4"
global:
- secure: QhuP5E/kYL1j1KDkHGJtk6DSJr1RH4DR/JrC62Viuf5Du8jE+i0kPWfF2MxtuEmKo35orhpu8t8mzKygWfuO63WPuuIE9qd/+V/y99Lqcj0tEN6wJ5RnywktbTJWg23zphjhmYq3Xj8DLVEikCZBwHtlbygkO9Q60cn1PK+bnPg=
- secure: HxCS2dQAWI0KmCFnFNNZoucG4FeAW+itG7+Hp0dNtwmxZzGOZYFO2bZcGvTAMNfVN++oqLxTebYQI1oB5yUl5mPJjrjthaGS6Zq3S6rfJcXiv+icYgEXlR6ejQ97dsHw1Jeg8nedCQlI4kHfvG6pgBLhq9hnugxH1Cjhdt14E9U=
Expand Down Expand Up @@ -35,6 +35,9 @@ before_script:
- if [ "[publish]" = `git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n'` ]; then echo yes;PUBLISH=true; fi;
- if [[ `git describe --contains $( git rev-parse HEAD )` ]]; then echo yes;PUBLISH=true; fi;
- if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi
# for testing node-webkit, launch a virtual display
- if [ "$NODE_WEBKIT" != "" ]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi
# note: `sleep 3` gives xvfb some time to start

script:
# test install from published binary
Expand All @@ -47,6 +50,20 @@ script:
- make clean
- npm install --build-from-source --sqlite=/usr
- npm test
# on Linux 64 bit: install nw-gyp if NODE_WEBKIT is not empty
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi
# on Linux 64 bit: rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty)
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; fi
# on Linux 64 bit: download and unpack node-webkit, add it to PATH
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64:$PATH; fi; fi
# on Linux 64 bit: ldd nw
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then ldd $(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64/nw; fi; fi
# on Linux 64 bit: attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty)
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; fi
# on Linux 64 bit: erase used node-webkit, restore PATH
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH="$prenwpath"; rm -rf node-webkit-v${NODE_WEBKIT}-linux-x64; fi; fi
- make clean
# node v0.8 and above provide pre-built 32 bit and 64 bit binaries
# so here we use the 32 bit ones to also test 32 bit builds
Expand All @@ -55,13 +72,47 @@ script:
- tar xf node-${NVER}-${platform}-x86.tar.gz
# enable 32 bit node
- export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH
# install 32 bit compiler toolchain
# install 32 bit compiler toolchain and X11
- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; fi
# test source compile in 32 bit mode with internal libsqlite3
- if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi
- npm test
# publish 32 bit build
- if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi;
# install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty (but on Linux it's installed earlier on 64 bit)
- if [ "$platform" != 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi
# rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty)
- if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi;
# on Linux 32 bit: install 32 bit stuff necessary for node-webkit 32 bit
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libx11-6:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libglib2.0-0:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgtk2.0-0:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libatk1.0-0:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgdk-pixbuf2.0-0:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libcairo2:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libfreetype6:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libfontconfig1:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxcomposite1:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libasound2:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxdamage1:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxext6:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxfixes3:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libnss3:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libnspr4:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgconf-2-4:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libexpat1:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libdbus-1-3:i386; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libudev0:i386; fi; fi
# on Linux 32 bit: download and unpack node-webkit, add it to PATH
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH; fi; fi
# on Linux 32 bit: ldd nw
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then ldd $(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32/nw; fi; fi
# attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty)
- if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi;
# on Linux 32 bit: erase used node-webkit, restore PATH
- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH="$prenwpath"; rm -rf node-webkit-v${NODE_WEBKIT}-linux-ia32; fi; fi
- make clean
# test source compile in 32 bit mode against external libsqlite3
- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -10,7 +10,7 @@
"binary": {
"module_name": "node_sqlite3",
"module_path": "./lib/binding/",
"remote_uri": "http://node-sqlite3.s3.amazonaws.com",
"remote_uri": "https://node-sqlite3.s3.amazonaws.com",
"template": "{configuration}/{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz"
},
"contributors": [
Expand All @@ -35,7 +35,7 @@
"url": "git://github.com/mapbox/node-sqlite3.git"
},
"dependencies": {
"node-pre-gyp": "~0.3.0"
"node-pre-gyp": "https://github.com/springmeyer/node-pre-gyp/tarball/015208540bb0febe92c3cac03ece6621fd532b9b"
},
"bundledDependencies": [
"node-pre-gyp"
Expand All @@ -54,4 +54,4 @@
}
],
"main": "./lib/sqlite3"
}
}