-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
56 lines (49 loc) · 2.28 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
language: objective-c
compiler:
- gcc
- clang
env:
matrix:
- NODE_NVM_VERSION="0.10"
- NODE_NVM_VERSION="0.8"
global:
- secure: hBUfRqVPovL7PVOJONI8sakIUtggpM74qMPdi5zaMpJhuV/QWfROOVc05ULEr1P0Fra2WpQ62mp8lfa1NbB6sQfT/8Y6u0lucf9SsIUBJzDrSmfXv2NDgpJn9RQmfsZgLfDuTwRLVROkNSTowUq3tnhDIzX/NyB7uOp1TZNEJ8A=
- secure: xWyq1Ys9lpMUVCh73q5YDDfC4nLeeydqIS4S+lJ/t/jUCNHDwe1x5XrxRIALi74qNmHg6eTcOeEW5iot/sf1oUJIA1oPt9iMIMolg9iYWJKWN4E6gWcIigYu9ZDl3GJsHyiNs/dVlZjzY1YKzyvgZ2MRfy4l0rPShCxROoCiCIM=
before_install:
- COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
- export PATH=`pwd`/node_modules/.bin:$PATH
# here we set up the node version on the fly based on the matrix value.
# This is done manually so that it is easy to flip the 'language' to
# objective-c in another branch (to run the same travis.yml on OS X)
- git clone https://github.com/creationix/nvm.git ../.nvm
- source ../.nvm/nvm.sh
- nvm install $NODE_NVM_VERSION
- nvm use $NODE_NVM_VERSION
- node --version
- npm --version
- npm install mocha
- npm install aws-sdk
- platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")
- if [[ "$platform" == 'linux' ]]; then sudo apt-get -qq update; fi;
install:
# test building from source
- npm install --build-from-source
- npm test
- node-pre-gyp package testpackage
- npm test
before_script:
# test publishing and installing from remote if
# [publish binary] is present in commit message
- PUBLISH_BINARY=false
- if [[ ${CXX} == "g++" ]] && test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then echo yes;PUBLISH_BINARY=true; fi;
- if [[ $PUBLISH_BINARY == true ]]; then node-pre-gyp publish info; rm -rf {build,lib/binding}; npm install --fallback-to-build=false; npm test; fi
- node-pre-gyp clean
script:
# test building with against shared libzip
- make clean
- if [[ "$platform" == 'linux' ]]; then sudo apt-get -qq install libzip-dev; npm install --build-from-source --shared_libzip; fi
- if [[ "$platform" == 'darwin' ]]; then brew install libzip; npm install --build-from-source --shared_libzip --shared_libzip_includes=`brew --prefix`/include --shared_libzip_libpath=`brew --prefix`/lib; fi
- npm test
after_success:
# if success then query and display all published binaries
- node-pre-gyp info