-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
159 lines (147 loc) · 5.03 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Much of this is borrowed from node-sqlite3.
sudo: false
language: cpp
git:
depth: 10
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5-multilib
- g++-5-multilib
- libc6-dev:i386
## don't re-build for tags so that [publish binary] is not re-run
## https://github.com/travis-ci/travis-ci/issues/1532
#branches:
# except:
# - /^[0-9]+[.][0-9]+[.][0-9]+/
matrix:
include:
# Linux
- os: linux
env: NODE_VERSION="node" PUBLISHABLE=false # latest
- os: linux
compiler: clang
env: NODE_VERSION="6.2.2" # node abi 48
- os: linux
compiler: clang
env: NODE_VERSION="5.11.1" # node abi 47
- os: linux
env: NODE_VERSION="4.4.5" BUILD_X86=true # node abi 46
- os: linux
compiler: clang
env: NODE_VERSION="4.0.0" PUBLISHABLE=false
- os: linux
env: NODE_VERSION="iojs-3.3.1" BUILD_X86=true # node abi 45
- os: linux
compiler: clang
env: NODE_VERSION="iojs-3.1.0" PUBLISHABLE=false
- os: linux
compiler: clang
env: NODE_VERSION="iojs-2.4.0" PUBLISHABLE=false
- os: linux
env: NODE_VERSION="iojs-2.4.0" BUILD_X86=true # node abi 44
- os: linux
compiler: clang
env: NODE_VERSION="iojs-1.8.4" PUBLISHABLE=false
- os: linux
env: NODE_VERSION="iojs-1.8.4" BUILD_X86=true # node abi 43
- os: linux
env: NODE_VERSION="0.12.7" BUILD_X86=true # node abi 14
- os: linux
env: NODE_VERSION="0.10.40" BUILD_X86=true # node abi 11
- os: linux
env: NODE_VERSION="0.8.28" # node abi 1
# test building against external libicu
- os: linux
env: NODE_VERSION="0.10.40" EXTERNAL_LIBICU=true PUBLISHABLE=false
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test', 'libicu-dev:i386' ]
packages: [ 'gcc-5-multilib', 'g++-5-multilib', 'libicu-dev' ]
# OS X
- os: osx
compiler: clang
env: NODE_VERSION="6.2.2" # node abi 48
- os: osx
compiler: clang
env: NODE_VERSION="5.11.1" # node abi 47
- os: osx
compiler: clang
env: NODE_VERSION="4.4.5" # node abi 46
- os: osx
compiler: clang
env: NODE_VERSION="iojs-3.3.1" # node abi 45
- os: osx
compiler: clang
env: NODE_VERSION="iojs-2.4.0" # node abi 44
- os: osx
compiler: clang
env: NODE_VERSION="iojs-1.8.4" # node abi 43
- os: osx
compiler: clang
env: NODE_VERSION="0.12.7" # node abi 14
- os: osx
compiler: clang
env: NODE_VERSION="0.10.40" # node abi 11
- os: osx
compiler: clang
env: NODE_VERSION="0.8.28" # node abi 1
env:
global:
- LLVM_VERSION=3.8.0
- LLVM_SHORT_VERSION=3.8
- secure: "p/3rptxI8KJGhU1omrUu2WRClXhVwbRoWC3YfjaQr6rDMUMkmARc4tWT1UnL6e7bKAG2vKO9ko1d3meT6rHZL8ma/I5z9tvm3gefxLdIeV1I93JNX3nCLNkCDdIOcHEFibr1R8qsrcLqTaVoLMBhnNxFEvUFLbebD3ArFBy0zxY="
cache:
directories:
- llvm-3.8.0
before_install:
- export PUBLISHABLE=${PUBLISHABLE:-true}
- if test "$TRAVIS_OS_NAME $CC" = "linux clang" ; then
if [ -z "$(ls -A llvm-$LLVM_VERSION)" ]; then
wget -O llvm-$LLVM_VERSION.tar.xz http://llvm.org/releases/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-14.04.tar.xz;
mkdir llvm-$LLVM_VERSION;
xzcat llvm-$LLVM_VERSION.tar.xz | tar -xvf - --strip 1 -C llvm-$LLVM_VERSION;
fi;
export LLVM_CONFIG="$(pwd)/llvm-$LLVM_VERSION/bin/llvm-config";
export PATH=$(pwd)/llvm-$LLVM_VERSION/bin:$PATH;
llvm-config --version;
clang --version;
export CXX="clang++" ;
export CC="clang" ;
fi
- if test "$TRAVIS_OS_NAME $CC" = "linux gcc" ; then
export CXX="g++-5" ;
export CC="gcc-5" ;
fi
# check if tag exists and matches package.json
- scripts/validate_tag.sh
- echo $NODE_VERSION
- rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
- source ~/.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- if test "$NODE_VERSION" = "0.8.28" ; then npm install -g npm@1.4.28 ; fi
#- npm config set spin=false
#- npm config set loglevel=http
- node --version
- npm --version
install:
# put node-pre-gyp on path
- export PATH=./node_modules/.bin/:$PATH
before_script:
# get commit message
- export COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
script:
- node --version
- npm --version
- if test -z "$EXTERNAL_LIBICU" ; then npm install --build-from-source ; else npm install --build-from-source --libicu=external ; fi
- node-pre-gyp package testpackage
- npm test
- export PUBLISH=false
# Normal case: tagged builds trigger 32-bit and 64-bit x86 builds
- if scripts/validate_tag.sh --check ; then PUBLISH=true; fi
# Workaround to trigger a manual x86 build
- if test "$TRAVIS_BRANCH" == "x86" -a "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH=true; fi
- if test "$PUBLISH,$PUBLISHABLE" = "true,true"; then npm test && npm install core-js@1.1.4 && npm install request@2.64.0 && npm run gh-publish && if test -n "$BUILD_X86"; then scripts/publish_x86.sh ; fi ; fi