.travis-build.sh 774 B

123456789101112131415161718192021222324252627282930313233
  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-5
  12. export CXX=g++-5
  13. export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
  14. mkdir build && cd build
  15. cmake -DCITRA_FORCE_QT4=ON ..
  16. make -j4
  17. ctest -VV -C Release
  18. elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
  19. set -o pipefail
  20. export Qt5_DIR=$(brew --prefix)/opt/qt5
  21. mkdir build && cd build
  22. cmake .. -GXcode
  23. xcodebuild -configuration Release | xcpretty -c
  24. ctest -VV -C Release
  25. fi