Skip to content

Commit 6027bc2

Browse files
authored
Merge pull request #62 from mapbox/node-10-builds
Add Node.js 10.x builds
2 parents 83ccb52 + a0871bd commit 6027bc2

4 files changed

Lines changed: 28 additions & 9 deletions

File tree

.travis.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ addons:
1111
packages: [ 'libstdc++-4.9-dev', 'clang-4.0' ]
1212

1313
install:
14-
- npm install
14+
- mkdir -p ./third_party/mason
15+
- curl -sSfL https://github.com/mapbox/mason/archive/v0.19.0.tar.gz | tar --gunzip --extract --strip-components=1 --directory=./third_party/mason
16+
- npm install --build-from-source
1517

1618
script:
1719
- npm test
@@ -31,6 +33,10 @@ matrix:
3133
node_js: 8
3234
sudo: false
3335
env: CC='clang-4.0' CXX='clang++-4.0'
36+
- os: linux
37+
node_js: 10
38+
sudo: false
39+
env: CC='clang-4.0' CXX='clang++-4.0'
3440
- os: osx
3541
osx_image: xcode8.2
3642
node_js: 4
@@ -40,3 +46,6 @@ matrix:
4046
- os: osx
4147
osx_image: xcode8.2
4248
node_js: 8
49+
- os: osx
50+
osx_image: xcode8.2
51+
node_js: 10

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"test": "tap -Rspec test/*.js"
2222
},
2323
"dependencies": {
24-
"nan": "^2.6",
24+
"nan": "^2.11.1",
2525
"node-pre-gyp": "^0.10.1"
2626
},
2727
"devDependencies": {

scripts/install-deps.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
set -eu
44
set -o pipefail
55

6-
# Point to or-tools upstream mason package commit until we have a
7-
# new mason release. See https://github.com/mapbox/mason/pull/426
8-
MASON_RELEASE="ca9b4cb"
6+
MASON_RELEASE="v0.19.0"
97
SPARSEHASH_RELEASE="2.0.2"
108
ORTOOLS_RELEASE="6.0"
119
PROTOBUF_RELEASE="3.0.0"
@@ -17,8 +15,10 @@ if [[ ! -d ./third_party/mason ]]; then
1715
mkdir -p ./third_party/mason
1816
echo "Downloading Mason @${MASON_RELEASE}"
1917
curl -sSfL https://github.com/mapbox/mason/archive/${MASON_RELEASE}.tar.gz | tar --gunzip --extract --strip-components=1 --directory=./third_party/mason
18+
echo "Mason @${MASON_RELEASE} unpacked to ./third_party/mason"
2019
fi
2120

21+
echo "Installing and linking Mason deps"
2222
./third_party/mason/mason install protobuf ${PROTOBUF_RELEASE}
2323
./third_party/mason/mason link protobuf ${PROTOBUF_RELEASE}
2424
./third_party/mason/mason install sparsehash ${SPARSEHASH_RELEASE}
@@ -27,8 +27,18 @@ fi
2727
./third_party/mason/mason link gflags ${GFLAGS_RELEASE}
2828
./third_party/mason/mason install or-tools ${ORTOOLS_RELEASE}
2929
./third_party/mason/mason link or-tools ${ORTOOLS_RELEASE}
30+
echo "Done installing and linking Mason deps"
3031

3132

3233
# We ship debug binaries with mason but for production builds we just strip debug symbols out.
3334
# In case you need debug symbols just comment out the following line and `npm --build-from-source`.
34-
find mason_packages/ -type f -name 'libortools.*' -exec strip --strip-unneeded {} \;
35+
if [ "$(uname -s)" == 'Darwin' ]; then
36+
STRIP_CMD="strip -x"
37+
else
38+
STRIP_CMD="strip --strip-unneeded"
39+
fi
40+
41+
for path in $(find $(pwd)/mason_packages -type f -name 'libortools.*'); do
42+
echo "stripping debug symbols from ${path}"
43+
$STRIP_CMD $path
44+
done

0 commit comments

Comments
 (0)