.travis.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. language: c++
  2. compiler:
  3. - clang
  4. - gcc
  5. # For Linux, use an Ubuntu 14 image
  6. dist: trusty
  7. os:
  8. - linux
  9. - osx
  10. env:
  11. global:
  12. # https://github.com/jasongin/nvs/blob/master/doc/CI.md
  13. - NVS_VERSION=1.4.2
  14. matrix:
  15. - NODEJS_VERSION=node/4
  16. - NODEJS_VERSION=node/6
  17. - NODEJS_VERSION=node/8
  18. - NODEJS_VERSION=node/9
  19. - NODEJS_VERSION=node/10
  20. - NODEJS_VERSION=chakracore/8
  21. - NODEJS_VERSION=chakracore/10
  22. - NODEJS_VERSION=nightly
  23. - NODEJS_VERSION=chakracore-nightly
  24. matrix:
  25. fast_finish: true
  26. allow_failures:
  27. - env: NODEJS_VERSION=nightly
  28. - env: NODEJS_VERSION=chakracore-nightly
  29. sudo: false
  30. cache:
  31. directories:
  32. - node_modules
  33. - $HOME/.npm
  34. addons:
  35. apt:
  36. sources:
  37. - ubuntu-toolchain-r-test
  38. packages:
  39. - g++-4.9
  40. before_install:
  41. # coveralls
  42. - pip2 install --user cpp-coveralls
  43. # compilers
  44. - if [ "$CXX" = "g++" -a "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9" AR="gcc-ar-4.9" RANLIB="gcc-ranlib-4.9" NM="gcc-nm-4.9" ; fi
  45. - if [ "$CXX" = "clang++" ]; then export NPMOPT=--clang=1 ; fi
  46. - export CFLAGS="$CFLAGS -O3 --coverage" LDFLAGS="$LDFLAGS --coverage"
  47. - echo "CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
  48. # nvs
  49. - git clone --branch v$NVS_VERSION --depth 1 https://github.com/jasongin/nvs ~/.nvs
  50. - . ~/.nvs/nvs.sh
  51. - nvs --version
  52. # node.js
  53. - nvs add $NODEJS_VERSION
  54. - nvs use $NODEJS_VERSION
  55. - node --version
  56. - npm --version
  57. install:
  58. - npm install $NPMOPT
  59. script:
  60. # Travis CI sets NVM_NODEJS_ORG_MIRROR, but it makes node-gyp fail to download headers for nightly builds.
  61. - unset NVM_NODEJS_ORG_MIRROR
  62. - npm test $NPMOPT
  63. after_success:
  64. - cpp-coveralls --gcov-options '\-lp' --build-root test/build --exclude test