.travis-build.sh 729 B

1234567891011121314151617181920212223242526
  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-4.9
  12. export CXX=g++-4.9
  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. elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
  18. export Qt5_DIR=$(brew --prefix)/opt/qt5
  19. mkdir build && cd build
  20. cmake .. -GXcode
  21. xcodebuild -configuration Release | xcpretty -c && exit ${PIPESTATUS[0]}
  22. fi