Skip to content

Commit 1ed72db

Browse files
committed
Use nvm instead of travis node_js key
This fixes issues on container builds that would always use node 6 even when 4 was specified.
1 parent 6bdf95d commit 1ed72db

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ git:
77
sudo: required
88
dist: trusty
99

10-
nodejs:
10+
node_js:
1111
- "4"
12+
- "6"
1213

1314
notifications:
1415
email: false
@@ -37,6 +38,7 @@ env:
3738
- CCACHE_VERSION=3.3.1
3839
- CMAKE_VERSION=3.7.2
3940
- MASON="$(pwd)/scripts/mason.sh"
41+
- NODE="4"
4042

4143
matrix:
4244
fast_finish: true
@@ -142,7 +144,6 @@ matrix:
142144
sources: ['ubuntu-toolchain-r-test']
143145
packages: ['libstdc++-5-dev']
144146
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
145-
nodejs: "4"
146147
install:
147148
- pushd ${OSRM_BUILD_DIR}
148149
- |
@@ -166,7 +167,6 @@ matrix:
166167
sources: ['ubuntu-toolchain-r-test']
167168
packages: ['libstdc++-5-dev']
168169
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
169-
nodejs: "4"
170170
install:
171171
- pushd ${OSRM_BUILD_DIR}
172172
- |
@@ -189,8 +189,7 @@ matrix:
189189
apt:
190190
sources: ['ubuntu-toolchain-r-test']
191191
packages: ['libstdc++-5-dev']
192-
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
193-
nodejs: "6"
192+
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4 NODE="6"
194193
install:
195194
- pushd ${OSRM_BUILD_DIR}
196195
- |
@@ -213,8 +212,7 @@ matrix:
213212
apt:
214213
sources: ['ubuntu-toolchain-r-test']
215214
packages: ['libstdc++-5-dev']
216-
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4
217-
nodejs: "6"
215+
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4 NODE="6"
218216
install:
219217
- pushd ${OSRM_BUILD_DIR}
220218
- |
@@ -231,6 +229,9 @@ matrix:
231229
- ./scripts/travis/publish.sh
232230

233231
before_install:
232+
- source $NVM_DIR/nvm.sh
233+
- nvm use $NODE
234+
- node --version
234235
- if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi
235236
- |
236237
if [[ -z $JOBS ]]; then

0 commit comments

Comments
 (0)