.travis-build.sh 780 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. set -e
  3. set -x
  4. if grep -nr '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .travis* dist/*.desktop \
  5. dist/*.svg dist/*.xml; then
  6. echo Trailing whitespace found, aborting
  7. exit 1
  8. fi
  9. #if OS is linux or is not set
  10. if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
  11. export CC=gcc-6
  12. export CXX=g++-6
  13. export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
  14. mkdir build && cd build
  15. cmake ..
  16. make -j4
  17. ctest -VV -C Release
  18. elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
  19. set -o pipefail
  20. export MACOSX_DEPLOYMENT_TARGET=10.9
  21. export Qt5_DIR=$(brew --prefix)/opt/qt5
  22. mkdir build && cd build
  23. cmake .. -GXcode
  24. xcodebuild -configuration Release
  25. ctest -VV -C Release
  26. fi