Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[node] Run rendering tests on Bitrise OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Apr 1, 2016
1 parent aef1f81 commit 08c9406
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"devDependencies": {
"aws-sdk": "^2.2.21",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#fc3f2302bfc50ac5c779d4685d3353ee4a388eb1",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#1e0d988e187a6c9a7a74fa8d7feb9c66c2258123",
"node-gyp": "^3.2.1",
"request": "^2.67.0",
"tape": "^4.2.2"
Expand Down
1 change: 0 additions & 1 deletion platform/default/headless_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ HeadlessDisplay::HeadlessDisplay() {
CGLPixelFormatAttribute attributes[] = {
kCGLPFAOpenGLProfile,
static_cast<CGLPixelFormatAttribute>(kCGLOGLPVersion_Legacy),
kCGLPFAAccelerated,
static_cast<CGLPixelFormatAttribute>(0)
};

Expand Down
5 changes: 1 addition & 4 deletions platform/node/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ workflows:
inputs:
- content: |-
#!/bin/bash
set -e
set -o pipefail
export TRAVIS_OS_NAME=osx
export TRAVIS_TAG=$BITRISE_GIT_TAG
export TRAVIS_JOB_NUMBER=$BITRISE_BUILD_NUMBER
export NODE_VERSION=4
export CXX=clang++
export CC=clang
source ./scripts/set_compiler.sh
./platform/node/scripts/install.sh
if command -v ccache >/dev/null 2>&1; then ccache --zero-stats ; fi
./platform/node/scripts/run.sh
if command -v ccache >/dev/null 2>&1; then ccache --show-stats ; fi
./platform/node/scripts/after_script.sh
- slack:
title: Post to Slack
Expand Down
16 changes: 9 additions & 7 deletions platform/node/scripts/after_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ if [[ ${TRAVIS_TAG} == node-v${PACKAGE_JSON_VERSION} ]]; then
fi
fi

if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then
# Install and add awscli to PATH for uploading the results
pip install --user awscli
export PATH="`python -m site --user-base`/bin:${PATH}"
if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then
if [[ ${TRAVIS_OS_NAME} == "linux" ]] ; then
pip install --user awscli
export PATH="`python -m site --user-base`/bin:${PATH}"
else
brew install awscli
fi

REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
gzip --stdout node_modules/mapbox-gl-test-suite/render-tests/index.html | \
aws s3 cp --acl public-read --content-encoding gzip --content-type text/html \
- s3://mapbox/$REPO_NAME/render-tests/$TRAVIS_JOB_NUMBER/index.html
- s3://mapbox/mapbox-gl-native/render-tests/$TRAVIS_JOB_NUMBER/index.html

echo http://mapbox.s3.amazonaws.com/$REPO_NAME/render-tests/$TRAVIS_JOB_NUMBER/index.html
echo http://mapbox.s3.amazonaws.com/mapbox-gl-native/render-tests/$TRAVIS_JOB_NUMBER/index.html
fi
15 changes: 2 additions & 13 deletions platform/node/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,9 @@ source ./platform/${TRAVIS_OS_NAME}/scripts/setup.sh

BUILDTYPE=${BUILDTYPE:-Release}

################################################################################
# Build
################################################################################

source ~/.nvm/nvm.sh
nvm use $NODE_VERSION
npm install --build-from-source

################################################################################
# Test
################################################################################

# https://github.com/mapbox/mapbox-gl-native/issues/2150
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
npm test
npm run test-suite
fi
npm test
npm run test-suite

0 comments on commit 08c9406

Please sign in to comment.