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

Binary deployment with node-pre-gyp #245

Merged
merged 4 commits into from
Jan 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 58 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,67 @@
language: node_js
language: cpp

node_js:
- "0.10"
- "0.8"
env:
matrix:
- export NODE_VERSION="0.8"
- export NODE_VERSION="0.10"
global:
- secure: QhuP5E/kYL1j1KDkHGJtk6DSJr1RH4DR/JrC62Viuf5Du8jE+i0kPWfF2MxtuEmKo35orhpu8t8mzKygWfuO63WPuuIE9qd/+V/y99Lqcj0tEN6wJ5RnywktbTJWg23zphjhmYq3Xj8DLVEikCZBwHtlbygkO9Q60cn1PK+bnPg=
- secure: HxCS2dQAWI0KmCFnFNNZoucG4FeAW+itG7+Hp0dNtwmxZzGOZYFO2bZcGvTAMNfVN++oqLxTebYQI1oB5yUl5mPJjrjthaGS6Zq3S6rfJcXiv+icYgEXlR6ejQ97dsHw1Jeg8nedCQlI4kHfvG6pgBLhq9hnugxH1Cjhdt14E9U=

before_install:
- sudo apt-get -qq update
# put node-pre-gyp on path
- export PATH=./node_modules/.bin/:$PATH
- echo $NODE_VERSION
- git clone https://github.com/creationix/nvm.git ../.nvm
- source ../.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- node --version
- npm --version
- npm install mocha
- platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")

install:
# test installing from a binary
- npm install
- npm install mocha
- npm test
# test installing from source
- npm install --build-from-source
- npm test

before_script:
- make clean
# test publishing
- echo $TRAVIS_BRANCH
- echo $TRAVIS_COMMIT
- echo `git describe --tags --always HEAD`
- PUBLISH=false
- 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

script:
# test source compile with internal libsqlite3
- npm install --stage
- npm test
- sudo apt-get -qq install libsqlite3-dev
- make clean
# test source compile against external libsqlite3
- npm install --build-from-source --sqlite=/usr
# output linking details for debugging
- ldd lib/binding/*/*/*node
- npm test
- make clean
# node v0.8 and above provide pre-built 32 bit and 64 bit linux binaries
# so here we use the 32 bit ones to also test 32 bit builds
- export NVER=`node -v`
- if [[ "$NVER" != v0.6* ]]; then wget http://nodejs.org/dist/${NVER}/node-${NVER}-linux-x86.tar.gz; fi
- if [[ "$NVER" != v0.6* ]]; then tar xf node-${NVER}-linux-x86.tar.gz; fi
- if [[ "$NVER" != v0.6* ]]; then export PATH=$(pwd)/node-${NVER}-linux-x86/bin:$PATH; fi
- if [[ "$NVER" != v0.6* ]]; then sudo apt-get -y install binutils:i386 cpp:i386 gcc-4.6:i386 g++-4.6:i386 libstdc++6-4.6-dev:i386 | true; fi
# test source compile in 32 bit mode with internal libsqlite3
- if [[ "$NVER" != v0.6* ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; fi
- if [[ "$NVER" != v0.6* ]]; then ldd lib/binding/*/*/*node; fi
- if [[ "$NVER" != v0.6* ]]; then npm test; fi
- if [[ "$NVER" != v0.6* ]]; then make clean; fi
- if [[ "$NVER" != v0.6* ]]; then sudo apt-get -y install libsqlite3-dev:i386; fi
# test source compile in 32 bit mode against external libsqlite3
- if [[ "$NVER" != v0.6* ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; fi
- if [[ "$NVER" != v0.6* ]]; then ldd lib/binding/*/*/*node; fi
- if [[ "$NVER" != v0.6* ]]; then npm test; fi
# test install from published binary
- make clean
- npm install
- npm test
- make clean
# test source compile against system libsqlite3
- if [[ "$platform" == 'linux' ]]; then sudo apt-get -qq update; sudo apt-get -qq install libsqlite3-dev; fi
- make clean
- npm install --build-from-source --sqlite=/usr
- npm test
- 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
- NVER=`node -v`
- wget http://nodejs.org/dist/${NVER}/node-${NVER}-${platform}-x86.tar.gz
- 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
- 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;
- 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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ After the `sqlite3` module is installed (according to the previous section), d

1. Install [`nw-gyp`](https://github.com/rogerwang/nw-gyp) globally: `npm install nw-gyp -g` *(unless already installed)*

2. Use `nw-gyp` to rebuild the module: `nw-gyp rebuild --target=0.6.2`
2. Use `nw-gyp` to rebuild the module:

```
NODE_WEBKIT_VERSION="0.8.4" # see latest version at https://github.com/rogerwang/node-webkit#downloads
nw-gyp rebuild --target=${NODE_WEBKIT_VERSION}
```

Remember the following:

Expand Down
96 changes: 0 additions & 96 deletions build-util/crosswalk-semver-to-module.js

This file was deleted.

34 changes: 0 additions & 34 deletions build-util/remake.sh

This file was deleted.

88 changes: 0 additions & 88 deletions build-util/tools.js

This file was deleted.

32 changes: 0 additions & 32 deletions build-util/upload.sh

This file was deleted.

Loading