forked from galkahana/HummusJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (104 loc) · 4.74 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
language: cpp
compiler:
- gcc
os:
- linux
- osx
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- libgconf-2-4
services:
- docker
- xvfb
env:
matrix:
- NODE_NVM_VERSION="6.14.1"
- NODE_NVM_VERSION="7.10.1"
- NODE_NVM_VERSION="8.11.1"
- NODE_NVM_VERSION="9.11.1"
- NODE_NVM_VERSION="10.8.0"
- NODE_NVM_VERSION="11.2.0"
- NODE_NVM_VERSION="12.0.0"
- ELECTRON_VERSION="1.8.7" ELECTRON_MOCHA=true
- ELECTRON_VERSION="2.0.7" ELECTRON_MOCHA=true
- ELECTRON_VERSION="3.0.10" ELECTRON_MOCHA=true
- ELECTRON_VERSION="3.1.11" ELECTRON_MOCHA=true
- ELECTRON_VERSION="4.0.8" ELECTRON_MOCHA=true
- ELECTRON_VERSION="4.1.5" ELECTRON_MOCHA=true
- ELECTRON_VERSION="4.2.8" ELECTRON_MOCHA=true
- ELECTRON_VERSION="5.0.9" ELECTRON_MOCHA=true
- ELECTRON_VERSION="6.0.2" ELECTRON_MOCHA=true
- MUSL=true NODE_NVM_VERSION="9.11.1"
- MUSL=true NODE_NVM_VERSION="10.8.0"
- MUSL=true NODE_NVM_VERSION="11.2.0"
- MUSL=true NODE_NVM_VERSION="12.0.0"
matrix:
exclude:
- os: osx
env: MUSL=true NODE_NVM_VERSION="9.11.1"
- os: osx
env: MUSL=true NODE_NVM_VERSION="10.8.0"
- os: osx
env: MUSL=true NODE_NVM_VERSION="11.2.0"
- os: linux
env: ELECTRON_VERSION="2.0.7" ELECTRON_MOCHA=true
global:
- secure: UwtG8rFAF8+tDmifVecoT9vm1ya/3iTK+pYSs0Qolo6Th6oMWv1pK/yE32iK4J0P4mRCE0OEV1FjhYpBp1zug6GaREV7cCaIexqY5m02AXsQ7jmNVRe4bQedaLYkJQP6xPCx26/Pu1ZHi+x6v8mDyqY9nSdlP7CL23iVobuw53Am/ZR5BK4bKB19HJiX2N1gqHHhzV1gFQxZBwxeLm55K7Fu+YbmUrPMMmR42alpiCSSyWJPhijDrVWdCA7ess73Hfu9vrrSEpRHgG+d2LXErTy1InRibmxwhEELgZMUmADMIyLk5YceoRNmESsWOfXUOrQGN5qjnomdd9+y7u2jXxaSnAPAlEcbZsMX7emVdsUlzacSEi/pMEVtSAgF6vCHFpkTMr+XtKUwJwu+c76kxAdfOSu1pY4Z6QsDvvfOF1OhBYiLM4ph7QfqEK0eS6lh6vJF6F1iwZ4BfEYcu7a8ANqv6d4odqLnGtMNJoJ7ijbDkxVoRP+pmh4tBNXMd23bpECR3U8iuWHPkWiMmXtIrgy7WzRqxomCrtuxO/ZetLm0ctsihsN7Z1Sgb3/hJiGO7oEZZBSzdF02/Q1umPz6xvqbvQJp+VA/CqSq0+fx+DGacxOOQar87N268d0Y62q1i02eyvzBgY8X9awN4EvIp16yRCJCNart7T4dIkurSwE=
- secure: OFo+Aqvq/FJLey1wXN8IrRw42aoccTIX90d9DFrpIieJ436WDpBdl3QgzPuCrJiBW9VxCdgzF1xvkFm1+VwzqvqXgAZfTJeJ2AhDjltzHtN+QzJx7SwQcsMAEbSgdLbboGJuyf1yeCs5x95792U+CXm3xy+zLkKw9XO9682WaO6uAp6mVX0wD7Z6u8qLbwMI6YXcY99rptiEtQ4TzKWHQI4m5dSHkCISmNGtBOuOZEF8v3FJ8TzEmjEJ1FNRrjAcwFcTgIwoHudmrs/GGaWBpwyq24XmBG8cavDeKaezmL80vBbGJaOR9IdVwYKNaeslNZBCxGoq3Cy1ReB2cECPw2yhFUktlHqr4SzzCt8JgMgtH8dLajQTdpznJssJesGfz4kwBu+IKGxrIqkh6/YEtYJFEUaaVBjyt7uyuXefZpoz19E63ZzqtrtHRFhdru4aEaUk6CibfljMMaLnxnvdkhQljz5SAhgh55aAUCejh1mgFIR5O3W4AD/3zrIL6HDOLEbYmFbDAsYIoPqp5g+9oiJ6sPyO75wtlFo4ciaw5K7o1y4NTh9BCB7j0P3FYAMqf2Z/wT2kU6W0MKFyo6AmOL4w7uwT/OAgYbWn1hgG2toAtatFrXnUu5CQTBwxel4uTiLkJIa1Zoy53BJxzDUVGgDvs/+sjV3lIr5J09B2kmA=
before_install:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
- if [[ $ELECTRON_VERSION ]]; then
export npm_config_target=$ELECTRON_VERSION;
export npm_config_target_arch=x64;
export npm_config_disturl=https://atom.io/download/electron;
export npm_config_runtime=electron;
fi
- COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
- PUBLISH_BINARY=false
- if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE" && test "${TRAVIS_BRANCH}"
== "master" && test "${TRAVIS_PULL_REQUEST}" == "false"; then PUBLISH_BINARY=true;
fi;
- if [[ $MUSL ]]; then
EXTRA_NODE_PRE_GYP_FLAGS="--target_libc=musl";
fi;
- git clone https://github.com/creationix/nvm.git ../.nvm && source ../.nvm/nvm.sh
- NODE_NVM_VERSION="${NODE_NVM_VERSION:=11.2.0}"
- nvm install $NODE_NVM_VERSION
- nvm use $NODE_NVM_VERSION
- echo $PUBLISH_BINARY
- node --version
- npm --version
- $CXX --version
install:
- if [[ $MUSL ]]; then
scripts/alpine-build.sh;
else
npm install --build-from-source;
fi
before_script:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0; fi
script:
- if [[ $MUSL ]]; then
scripts/alpine-test.sh ./node_modules/.bin/node-pre-gyp package testpackage $EXTRA_NODE_PRE_GYP_FLAGS;
elif [[ $ELECTRON_MOCHA ]]; then
scripts/electron-mocha-test.sh ./node_modules/.bin/node-pre-gyp package testpackage $EXTRA_NODE_PRE_GYP_FLAGS;
else
./node_modules/.bin/node-pre-gyp package testpackage $EXTRA_NODE_PRE_GYP_FLAGS;
npm test;
fi
- if [[ "${PUBLISH_BINARY}" == "true" ]]; then
./node_modules/.bin/node-pre-gyp unpublish publish $EXTRA_NODE_PRE_GYP_FLAGS;
rm -rf {build,binding};
fi
- if [[ "${PUBLISH_BINARY}" == "true" && "{$MUSL}" == "true" ]]; then
./scripts/alpine-test.sh ./node_modules/.bin/node-pre-gyp install $EXTRA_NODE_PRE_GYP_FLAGS;
fi
- if [[ "{PUBLISH_BINARY}" == "true" && "${MUSL}" != "true" ]]; then
./node_modules/.bin/node-pre-gyp install $EXTRA_NODE_PRE_GYP_FLAGS;
npm test;
fi