forked from nodegit/nodegit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
127 lines (108 loc) · 5.48 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
branches:
only:
- master
- /^v\d+\.\d+\.\d+$/
compiler: clang
os:
- linux
- osx
sudo: false
env:
matrix:
- export NODE_VERSION="0.12" TARGET_ARCH="x64"
- export NODE_VERSION="4.1" TARGET_ARCH="x64"
- export NODE_VERSION="5.8" TARGET_ARCH="x64"
- export NODE_VERSION="6" 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
- os: linux
env: export NODE_VERSION="6" TARGET_ARCH="ia32"
sudo: required
git:
depth: 1
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- libssl-dev
- 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;
fi
- nvm install $NODE_VERSION
- if [ -z "$TRAVIS_TAG" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "0.12" ]; then
export GYP_DEFINES="coverage=1 use_obsolete_asm=true";
export JOBS=4;
export CC=/usr/bin/gcc-4.9;
export CXX=/usr/bin/g++-4.9;
export npm_config_clang=0;
wget http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz;
tar xvfz lcov-1.10.tar.gz;
else
export GYP_DEFINES="use_obsolete_asm=true";
export JOBS=4;
fi
install:
- BUILD_ONLY=true npm install
# This is a random private key used purely for testing.
before_script:
- echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- echo -e "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkTcgXnHuqR0gbwegnr9Zxz4hTkjjV/SpgJNPJz7mo/HKNbx0rqjj1P0yGR053R9GSFFim2ut4NK9DPPUkQdyucw+DoLkYRHJmlJ4BNa9NTCD0sl+eSXO2969kZojCYSOgbmkCJx8mdgTwhzdgE/jhBrsY0hPE6pRTlU+H68/zeNdJUAIJf0LLXOm3hpTKLA19VICltl/j9VvBJpgRHdBylXEyL8HokYpjkQQk1ZXj3m7Nlo8yDdg4VcljOJWC+Xh8kxRMfK5x/VRVsYKCQXN5QlzKeqf7USRDUS/7mFoPUBW+d4kwKtGxRsWuIL2yeqzifZUTOgsh9+ZWAWxWffQZ [email protected]" > ~/.ssh/id_rsa.pub
- echo -e "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA5E3IF5x7qkdIG8HoJ6/Wcc+IU5I41f0qYCTTyc+5qPxyjW8d\nK6o49T9MhkdOd0fRkhRYptrreDSvQzz1JEHcrnMPg6C5GERyZpSeATWvTUwg9LJf\nnklztvevZGaIwmEjoG5pAicfJnYE8Ic3YBP44Qa7GNITxOqUU5VPh+vP83jXSVAC\nCX9Cy1zpt4aUyiwNfVSApbZf4/VbwSaYER3QcpVxMi/B6JGKY5EEJNWV495uzZaP\nMg3YOFXJYziVgvl4fJMUTHyucf1UVbGCgkFzeUJcynqn+1EkQ1Ev+5haD1AVvneJ\nMCrRsUbFriC9snqs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v3XJJQqtlQiDq8U8x1aQFXJ9C4EoLR\nzhKrKsECgYBtU/TSF/TATZY5XtrN9O+HX1Fbz70Ci8XgvioheVI2fezOcXPRzDcC\nOYPaCMNKA5E8gHdg4s0TN7uDvKTJ+KhSg2V7gZ39A28dHrJaRX7Nz4k6t2uEBjX9\na1JidpAIbJ+3w7+hj6L299tVZvS+Y/6Dz/uuEQGXfJg/l/5CCvQPsA==\n-----END RSA PRIVATE KEY-----" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa*
- eval `ssh-agent -s`
- ssh-add ~/.ssh/id_rsa
- git config --global user.name "John Doe"
- git config --global user.email [email protected]
script:
- 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
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 --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" ] && [ $TARGET_ARCH == "x64" ]; then
.travis/deploy-docs.sh;
fi
notifications:
slack:
secure: KglNSqZiid9YudCwkPFDh+sZfW5BwFlM70y67E4peHwwlbbV1sSBPHcs74ZHP/lqgEZ4hMv4N2NI58oYFD5/1a+tKIQP1TkdIMuq4j2LXheuirA2HDcydOVrsC8kRx5XFGKdVRg/uyX2dlRHcOWFhxrS6yc6IxtxYWlRTD2SmEc=
webhooks:
urls:
- https://webhooks.gitter.im/e/cbafdb27ad32ba746a73
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false