diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2015-08-25 17:07:19 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2015-08-25 17:07:19 -0400 |
commit | a622bb47564b7cb6b37a6a1e2387816da3137af1 (patch) | |
tree | 3d5b52ac8d48969bb0ef6b80c26c4fa876c23f13 | |
parent | 96d59900892cb7cc4ec23121b231514da910d8eb (diff) | |
download | qtlocation-mapboxgl-a622bb47564b7cb6b37a6a1e2387816da3137af1.tar.gz |
add FLAVOR=node to build matrix
-rw-r--r-- | .travis.yml | 27 | ||||
-rwxr-xr-x | scripts/node/after_script.sh (renamed from platform/node/scripts/travis_publish.sh) | 3 | ||||
-rw-r--r-- | scripts/node/install.sh | 22 | ||||
-rw-r--r-- | scripts/node/run.sh | 31 |
4 files changed, 82 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 9c65614df5..8127ae4618 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,33 @@ matrix: addons: apt: packages: [ 'lib32stdc++6' ] + - os: linux + env: FLAVOR=node CXX=clang++-3.5 BUILDTYPE=Release NODE_EXE=iojs NODE_VERSION=2.0.1 + addons: + apt: + sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] + packages: [ 'gdb', 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] + - os: linux + env: FLAVOR=node CXX=clang++-3.5 BUILDTYPE=Release NODE_EXE=node NODE_VERSION=0.12.0 + addons: + apt: + sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] + packages: [ 'gdb', 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] + - os: linux + env: FLAVOR=node CXX=clang++-3.5 BUILDTYPE=Release NODE_EXE=node NODE_VERSION=0.10.36 + addons: + apt: + sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] + packages: [ 'gdb', 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] + - os: osx + compiler: clang + env: FLAVOR=node NODE_EXE=iojs NODE_VERSION=2.0.1 + - os: osx + compiler: clang + env: FLAVOR=node NODE_EXE=node NODE_VERSION=0.12.0 + - os: osx + compiler: clang + env: FLAVOR=node NODE_EXE=node NODE_VERSION=0.10.36 env: global: diff --git a/platform/node/scripts/travis_publish.sh b/scripts/node/after_script.sh index d06a2a8a30..c757a1b8ca 100755 --- a/platform/node/scripts/travis_publish.sh +++ b/scripts/node/after_script.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +set -o pipefail # Inspect binary. if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then @@ -11,7 +12,7 @@ fi COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n') -if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE" && [[ $CXX =~ ^clang* ]]; then +if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then npm install aws-sdk ./node_modules/.bin/node-pre-gyp package diff --git a/scripts/node/install.sh b/scripts/node/install.sh new file mode 100644 index 0000000000..e804d47fa0 --- /dev/null +++ b/scripts/node/install.sh @@ -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 diff --git a/scripts/node/run.sh b/scripts/node/run.sh new file mode 100644 index 0000000000..f36ea02a12 --- /dev/null +++ b/scripts/node/run.sh @@ -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 |