.travis.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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/10
  16. - NODEJS_VERSION=node/12
  17. - NODEJS_VERSION=node/14
  18. - NODEJS_VERSION=nightly
  19. matrix:
  20. fast_finish: true
  21. allow_failures:
  22. - env: NODEJS_VERSION=nightly
  23. sudo: false
  24. cache:
  25. directories:
  26. - node_modules
  27. - $HOME/.npm
  28. addons:
  29. apt:
  30. sources:
  31. - ubuntu-toolchain-r-test
  32. packages:
  33. - g++-4.9
  34. before_install:
  35. # coveralls
  36. - pip2 install --user cpp-coveralls
  37. # compilers
  38. - 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
  39. - if [ "$CXX" = "clang++" ]; then export NPMOPT=--clang=1 ; fi
  40. - export CFLAGS="$CFLAGS -O3 --coverage" LDFLAGS="$LDFLAGS --coverage"
  41. - echo "CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
  42. # nvs
  43. - git clone --branch v$NVS_VERSION --depth 1 https://github.com/jasongin/nvs ~/.nvs
  44. - . ~/.nvs/nvs.sh
  45. - nvs --version
  46. # node.js
  47. - nvs add $NODEJS_VERSION
  48. - nvs use $NODEJS_VERSION
  49. - node --version
  50. - npm --version
  51. install:
  52. - npm install $NPMOPT
  53. script:
  54. # Travis CI sets NVM_NODEJS_ORG_MIRROR, but it makes node-gyp fail to download headers for nightly builds.
  55. - unset NVM_NODEJS_ORG_MIRROR
  56. - npm test
  57. after_success:
  58. - cpp-coveralls --gcov-options '\-lp' --build-root test/build --exclude test