@@ -13,12 +13,22 @@ sudo: false
1313
1414env :
1515 matrix :
16- - export NODE_VERSION="0.12"
17- - export NODE_VERSION="4.1"
18- - export NODE_VERSION="5.8"
16+ - export NODE_VERSION="0.12" TARGET_ARCH="x64"
17+ - export NODE_VERSION="4.1" TARGET_ARCH="x64"
18+ - export NODE_VERSION="5.8" TARGET_ARCH="x64"
1919
2020matrix :
2121 fast_finish : true
22+ include :
23+ - os : linux
24+ env : export NODE_VERSION="0.12" TARGET_ARCH="ia32"
25+ sudo : required
26+ - os : linux
27+ env : export NODE_VERSION="4.1" TARGET_ARCH="ia32"
28+ sudo : required
29+ - os : linux
30+ env : export NODE_VERSION="5.8" TARGET_ARCH="ia32"
31+ sudo : required
2232
2333git :
2434 depth : 1
@@ -30,15 +40,19 @@ addons:
3040 packages :
3141 - build-essential
3242 - libssl-dev
33- - gcc-4.9
34- - g++-4.9
43+ - gcc-4.9-multilib
44+ - g++-4.9-multilib
3545 - lcov
3646
3747before_install :
3848 - export CC=clang
3949 - export CXX=clang++
4050 - export npm_config_clang=1
4151
52+ - if [ $TARGET_ARCH == "ia32" ]; then
53+ sudo ln -s /usr/include/asm-generic /usr/include/asm;
54+ fi
55+
4256 - if [ $TRAVIS_OS_NAME != "linux" ]; then
4357 git clone https://github.com/creationix/nvm.git ./.nvm;
4458 source ./.nvm/nvm.sh;
@@ -74,22 +88,26 @@ before_script:
7488 - git config --global user.email johndoe@example.com
7589
7690script :
77- - if [ -z "$TRAVIS_TAG" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "0.12" ]; then
78- npm test && npm run cov && npm run coveralls;
91+ - if [ $TARGET_ARCH == "x64" ]; then
92+ if [ -z "$TRAVIS_TAG" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "0.12" ]; then
93+ npm test && npm run cov && npm run coveralls;
94+ else
95+ npm test;
96+ fi
7997 else
80- npm test ;
98+ echo "Not running tests because the binary is not built for 64-bit systems" ;
8199 fi
82100
83101after_success :
84102 - if [ -n "$TRAVIS_TAG" ]; then
85103 npm install -g node-pre-gyp;
86104 npm install -g aws-sdk;
87105 node lifecycleScripts/clean;
88- node-pre-gyp package;
89- node-pre-gyp publish;
106+ node-pre-gyp package --target_arch=$TARGET_ARCH ;
107+ node-pre-gyp publish --target_arch=$TARGET_ARCH ;
90108 fi
91109
92- - if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "4.1" ]; then
110+ - if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "4.1" ] && [ $TARGET_ARCH == "x64" ] ; then
93111 .travis/deploy-docs.sh;
94112 fi
95113
0 commit comments