[node] Build OS X on Bitrise

This commit is contained in:
John Firebaugh
2016-01-20 14:03:45 -08:00
parent 79069d13b4
commit 47ebf0fd59
4 changed files with 66 additions and 12 deletions

View File

@@ -10,10 +10,9 @@ else
otool -L ./lib/mapbox-gl-native.node
fi
COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
if [[ ${TRAVIS_TAG} == node-v${PACKAGE_JSON_VERSION} ]] || test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
if [[ ${TRAVIS_TAG} == node-v${PACKAGE_JSON_VERSION} ]]; then
source ~/.nvm/nvm.sh
nvm use $NODE_VERSION

View File

@@ -3,13 +3,11 @@
set -e
set -o pipefail
mapbox_time "checkout_mason" \
git submodule update --init .mason
export 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
@@ -19,9 +17,7 @@ fi
source ~/.nvm/nvm.sh
mapbox_time $NODE_VERSION \
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
node --version

View File

@@ -13,19 +13,14 @@ BUILDTYPE=${BUILDTYPE:-Release}
source ~/.nvm/nvm.sh
nvm use $NODE_VERSION
mapbox_time "compile_program" \
npm install --build-from-source
################################################################################
# Test
################################################################################
# Travis OS X has no GPU
# https://github.com/mapbox/mapbox-gl-native/issues/2150
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
mapbox_time "run_tests" \
npm test
mapbox_time "run_render_tests" \
npm run test-suite
fi