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: build and publish binaries for 32-bit systems #980

Merged
merged 1 commit into from Apr 4, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 29 additions & 11 deletions .travis.yml
Expand Up @@ -13,12 +13,22 @@ sudo: false

env:
matrix:
- export NODE_VERSION="0.12"
- export NODE_VERSION="4.1"
- export NODE_VERSION="5.8"
- export NODE_VERSION="0.12" TARGET_ARCH="x64"
- export NODE_VERSION="4.1" TARGET_ARCH="x64"
- export NODE_VERSION="5.8" TARGET_ARCH="x64"

matrix:
fast_finish: true
include:
- os: linux
env: export NODE_VERSION="0.12" TARGET_ARCH="ia32"
sudo: required
- os: linux
env: export NODE_VERSION="4.1" TARGET_ARCH="ia32"
sudo: required
- os: linux
env: export NODE_VERSION="5.8" TARGET_ARCH="ia32"
sudo: required

git:
depth: 1
Expand All @@ -30,15 +40,19 @@ addons:
packages:
- build-essential
- libssl-dev
- gcc-4.9
- g++-4.9
- gcc-4.9-multilib
- g++-4.9-multilib
- lcov

before_install:
- export CC=clang
- export CXX=clang++
- export npm_config_clang=1

- if [ $TARGET_ARCH == "ia32" ]; then
sudo ln -s /usr/include/asm-generic /usr/include/asm;
fi

- if [ $TRAVIS_OS_NAME != "linux" ]; then
git clone https://github.com/creationix/nvm.git ./.nvm;
source ./.nvm/nvm.sh;
Expand Down Expand Up @@ -74,22 +88,26 @@ before_script:
- git config --global user.email johndoe@example.com

script:
- if [ -z "$TRAVIS_TAG" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "0.12" ]; then
npm test && npm run cov && npm run coveralls;
- if [ $TARGET_ARCH == "x64" ]; then
if [ -z "$TRAVIS_TAG" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "0.12" ]; then
npm test && npm run cov && npm run coveralls;
else
npm test;
fi
else
npm test;
echo "Not running tests because the binary is not built for 64-bit systems";
fi

after_success:
- if [ -n "$TRAVIS_TAG" ]; then
npm install -g node-pre-gyp;
npm install -g aws-sdk;
node lifecycleScripts/clean;
node-pre-gyp package;
node-pre-gyp publish;
node-pre-gyp package --target_arch=$TARGET_ARCH;
node-pre-gyp publish --target_arch=$TARGET_ARCH;
fi

- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "4.1" ]; then
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "4.1" ] && [ $TARGET_ARCH == "x64" ]; then
.travis/deploy-docs.sh;
fi

Expand Down
3 changes: 3 additions & 0 deletions lifecycleScripts/install.js
Expand Up @@ -81,6 +81,8 @@ function build() {
var builder = "node-gyp";
var debug = (process.env.BUILD_DEBUG ? "--debug" : "");
var target = "";
var arch = (process.env.TARGET_ARCH ?
"--arch=" + process.env.TARGET_ARCH : "");
var distUrl = "";
var runtime = "";

Expand Down Expand Up @@ -114,6 +116,7 @@ function build() {
"rebuild",
debug,
target,
arch,
distUrl,
runtime
]
Expand Down