diff options
-rw-r--r-- | .travis.yml | 28 | ||||
-rw-r--r-- | platform/node/bitrise.yml | 3 | ||||
-rwxr-xr-x | platform/node/scripts/after_script.sh | 19 | ||||
-rwxr-xr-x | platform/node/scripts/after_success.sh | 13 |
4 files changed, 42 insertions, 21 deletions
diff --git a/.travis.yml b/.travis.yml index a50d265cd5..1a39e20761 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,26 +54,42 @@ after_success: matrix: include: - # Clang 3.8 - Debug - Node + # OSMesa - Node - Clang 3.8 - Debug - os: linux sudo: required dist: trusty language: node - compiler: "node4-clang38-debug" - env: _CXX=clang++-3.8 _CC=clang-3.8 WITH_OSMESA=1 + compiler: "osmesa-node4-clang38-debug" + env: BUILDTYPE=Debug _CXX=clang++-3.8 _CC=clang-3.8 WITH_OSMESA=1 + addons: *clang38 + script: + - nvm install 4 + - nvm use 4 + - make node + - make test-node + after_script: + - ccache --show-stats + - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER} + + # GLX - Node - Clang 3.8 - Release + - os: linux + sudo: required + dist: trusty + language: node + compiler: "glx-node4-clang38-release" + env: BUILDTYPE=Release _CXX=clang++-3.8 _CC=clang-3.8 RUN_XVFB=1 addons: *clang38 before_script: - export PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)") - export PUBLISH=$([[ "${TRAVIS_TAG:-}" == "node-v${PACKAGE_JSON_VERSION}" ]] && echo true) - - export BUILDTYPE=$([[ -n ${PUBLISH:-} ]] && echo "Release" || echo "Debug") script: - nvm install 4 - nvm use 4 - make node - - if [[ -z ${PUBLISH} ]]; then make test-node; fi after_script: - ccache --show-stats - - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER} + after_success: + - ./platform/node/scripts/after_success.sh # GCC 5 - Debug - Coverage # FIXME: https://github.com/mapbox/mapbox-gl-native/issues/6918 diff --git a/platform/node/bitrise.yml b/platform/node/bitrise.yml index af22fe65ea..23158eb60c 100644 --- a/platform/node/bitrise.yml +++ b/platform/node/bitrise.yml @@ -56,6 +56,7 @@ workflows: #!/bin/bash set -eu -o pipefail make test-node || envman add --key RESULT --value $? + ./platform/node/scripts/after_script.sh ${BITRISE_BUILD_NUMBER} - script: title: Run publish script run_if: '{{enveq "SKIPCI" "false"}}' @@ -63,7 +64,7 @@ workflows: - content: |- #!/bin/bash set -eu -o pipefail - ./platform/node/scripts/after_script.sh ${BITRISE_BUILD_NUMBER} + ./platform/node/scripts/after_success.sh exit ${RESULT:-0} - slack: title: Post to Slack diff --git a/platform/node/scripts/after_script.sh b/platform/node/scripts/after_script.sh index c805e453a2..4228d13dfe 100755 --- a/platform/node/scripts/after_script.sh +++ b/platform/node/scripts/after_script.sh @@ -5,19 +5,10 @@ set -o pipefail JOB=$1 -if [[ -n ${PUBLISH:-} ]]; then - if [[ "${BUILDTYPE}" == "Debug" ]]; then - echo "Please run this script in release mode (BUILDTYPE=Release)." - exit 1 - else - ./node_modules/.bin/node-pre-gyp package publish info - fi -else - if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then - 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/mapbox-gl-native/render-tests/$JOB/index.html +if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then + 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/mapbox-gl-native/render-tests/$JOB/index.html - echo http://mapbox.s3.amazonaws.com/mapbox-gl-native/render-tests/$JOB/index.html - fi + echo http://mapbox.s3.amazonaws.com/mapbox-gl-native/render-tests/$JOB/index.html fi diff --git a/platform/node/scripts/after_success.sh b/platform/node/scripts/after_success.sh new file mode 100755 index 0000000000..7ef8f53545 --- /dev/null +++ b/platform/node/scripts/after_success.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e +set -o pipefail + +if [[ -n ${PUBLISH:-} ]]; then + if [[ "${BUILDTYPE}" == "Debug" ]]; then + echo "Please run this script in release mode (BUILDTYPE=Release)." + exit 1 + else + ./node_modules/.bin/node-pre-gyp package publish info + fi +fi |