.travis.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #os:
  2. # - windows
  3. # - linux
  4. language: cpp
  5. matrix:
  6. include:
  7. - os: linux
  8. env:
  9. - OS="$TRAVIS_OS_NAME"
  10. - LUACC=./luac.cross
  11. - os: windows
  12. env:
  13. - MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
  14. - OS="$TRAVIS_OS_NAME"
  15. - LUACC=msvc/luac-cross/x64/Debug/luac.cross.exe
  16. addons:
  17. apt:
  18. packages:
  19. - python-serial
  20. - srecord
  21. - luarocks
  22. cache:
  23. - directories:
  24. - cache
  25. script:
  26. - echo OS is $OS $TRAVIS_OS_NAME
  27. # http://docs.travis-ci.com/user/environment-variables/#Convenience-Variables
  28. - if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/ci-build-linux.sh; fi
  29. - if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/ci-build-windows-ms.sh; fi
  30. - if [ "$OS" = "linux" -a "$TRAVIS_PULL_REQUEST" != "false" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/pr-build.sh; fi
  31. - cd "$TRAVIS_BUILD_DIR"
  32. - echo "checking:"
  33. - find lua_modules lua_examples tests/NTest* -iname "*.lua" -print0 | xargs -0 echo
  34. - find lua_modules lua_examples tests/NTest* -iname "*.lua" -print0 | xargs -0 $LUACC -p
  35. - cd tests/NTest
  36. - if [ "$OS" = "linux" ]; then ../../$LUACC -e ../NTest/NTest_NTest.lua; fi
  37. - cd "$TRAVIS_BUILD_DIR"
  38. - if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-linux.sh; fi
  39. - if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-windows.sh; fi