forked from serialport/node-serialport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (82 loc) · 2.53 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- g++-4.8-multilib
- gcc-multilib
# Build matrix
os:
- linux
- osx
env:
global:
- secure: "qEdwCY/ilHkqWkqasN5MgWCnzzop4lEYkbpxEiVMTZBY12p4uV6ysPQ+ZLZcx10Cg90RIQlsPeEANIhCzkWfnQi+ySmeiKY9JR2eSnb69wM7dBQ/uxv04eVChAlZSsDHwmTIIzIzZFsrWrcwwJaENGCJYKqZ9LKOiGFGQ8Is09A="
matrix:
- TRAVIS_NODE_VERSION="0.10"
- TRAVIS_NODE_VERSION="0.10" ARCH="x86"
- TRAVIS_NODE_VERSION="0.12"
- TRAVIS_NODE_VERSION="0.12" ARCH="x86"
- TRAVIS_NODE_VERSION="4"
- TRAVIS_NODE_VERSION="4" ARCH="x86"
- TRAVIS_NODE_VERSION="5"
- TRAVIS_NODE_VERSION="5" ARCH="x86"
- TRAVIS_NODE_VERSION="6"
- TRAVIS_NODE_VERSION="6" ARCH="x86"
matrix:
allow_failures:
- os: linux
env: TRAVIS_NODE_VERSION="6"
- os: linux
env: TRAVIS_NODE_VERSION="6" ARCH="x86"
- os: osx
env: TRAVIS_NODE_VERSION="6"
exclude:
- os: osx
env: TRAVIS_NODE_VERSION="0.10" ARCH="x86"
- os: osx
env: TRAVIS_NODE_VERSION="0.12" ARCH="x86"
- os: osx
env: TRAVIS_NODE_VERSION="4" ARCH="x86"
- os: osx
env: TRAVIS_NODE_VERSION="5" ARCH="x86"
- os: osx
env: TRAVIS_NODE_VERSION="6" ARCH="x86"
before_install:
# reinstall latest nvm
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh
- nvm install $TRAVIS_NODE_VERSION
- PATH=$PATH:`pwd`/node_modules/.bin
# print versions
- node --version
- npm --version
# use g++-4.8 on Linux
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
- $CXX --version
# figure out if we should publish
- PUBLISH_BINARY=false
# if we are building a tag then publish
- echo $TRAVIS_BRANCH
- echo `git describe --tags --always HEAD`
- if [[ $TRAVIS_BRANCH == `git describe --tags --always HEAD` ]]; then PUBLISH_BINARY=true; fi;
- echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY
# Set a test serialport for integration testing when we run our tests if we have one
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then export TEST_PORT='/dev/cu.serial1'; fi
install:
# ensure source install works
- npm install --build-from-source
script:
# test our module
- node ./
- npm test
# if publishing, do it
- if [[ $PUBLISH_BINARY == true ]]; then node-pre-gyp package; fi;
- if [[ $PUBLISH_BINARY == true ]]; then node-pre-gyp-github publish --release; fi;
# cleanup
- node-pre-gyp clean
# test binary exists
- if [[ $PUBLISH_BINARY == true ]]; then npm install --fallback-to-build=false; fi;