add FLAVOR=node to build matrix
This commit is contained in:
32
scripts/node/after_script.sh
Executable file
32
scripts/node/after_script.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Inspect binary.
|
||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||
ldd ./lib/mapbox-gl-native.node
|
||||
else
|
||||
otool -L ./lib/mapbox-gl-native.node
|
||||
fi
|
||||
|
||||
COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
|
||||
|
||||
if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
|
||||
npm install aws-sdk
|
||||
|
||||
./node_modules/.bin/node-pre-gyp package
|
||||
|
||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||
./node_modules/.bin/node-pre-gyp testpackage
|
||||
fi
|
||||
|
||||
./node_modules/.bin/node-pre-gyp publish info
|
||||
|
||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||
rm -rf build
|
||||
rm -rf lib
|
||||
npm install --fallback-to-build=false
|
||||
npm test
|
||||
fi
|
||||
fi
|
||||
22
scripts/node/install.sh
Normal file
22
scripts/node/install.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
mapbox_time "checkout_mason" \
|
||||
git submodule update --init .mason
|
||||
|
||||
PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" \
|
||||
|
||||
if [ ${TRAVIS_OS_NAME} == "linux" ]; then
|
||||
mapbox_time "install_mesa" \
|
||||
mason install mesa 10.4.3
|
||||
fi
|
||||
|
||||
mapbox_time $NODE_EXE \
|
||||
mason install $NODE_EXE $NODE_VERSION
|
||||
|
||||
export PATH="`mason prefix $NODE_EXE $NODE_VERSION`/bin":"$PATH"
|
||||
|
||||
$NODE_EXE --version
|
||||
npm --version
|
||||
31
scripts/node/run.sh
Normal file
31
scripts/node/run.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
source ./scripts/${TRAVIS_OS_NAME}/setup.sh
|
||||
|
||||
BUILDTYPE=${BUILDTYPE:-Release}
|
||||
|
||||
################################################################################
|
||||
# Build
|
||||
################################################################################
|
||||
|
||||
mapbox_time "checkout_styles" \
|
||||
git submodule update --init styles
|
||||
|
||||
mapbox_time "compile_program" \
|
||||
cd platform/node && BUILDTYPE=${BUILDTYPE} npm install --build-from-source
|
||||
|
||||
################################################################################
|
||||
# Test
|
||||
################################################################################
|
||||
|
||||
mapbox_time "checkout_test_suite" \
|
||||
git submodule update --init test/suite
|
||||
|
||||
mapbox_time "run_tests" \
|
||||
npm test
|
||||
|
||||
mapbox_time "run_render_tests" \
|
||||
npm run test-suite
|
||||
Reference in New Issue
Block a user