You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.1 KiB

  1. #!/bin/bash
  2. set -e
  3. # Helper for travis folding
  4. travis_fold() {
  5. local action=$1
  6. local name=$2
  7. echo -en "travis_fold:${action}:${name}\r"
  8. }
  9. # Helper for building and testing
  10. run() {
  11. # Create virtual environment
  12. virtualenv --python=$PYTHON stormpy-env
  13. source stormpy-env/bin/activate
  14. # Print version
  15. python --version
  16. # Build pycarl
  17. travis_fold start build_pycarl
  18. git clone https://github.com/moves-rwth/pycarl.git
  19. cd pycarl
  20. python setup.py build_ext -j 1 develop
  21. travis_fold end build_pycarl
  22. cd ..
  23. # Build stormpy
  24. travis_fold start build_stormpy
  25. python setup.py build_ext -j 1 develop
  26. travis_fold end build_stormpy
  27. # Perform task
  28. case $TASK in
  29. Test)
  30. # Run tests
  31. set +e
  32. python setup.py test
  33. ;;
  34. Documentation)
  35. # Generate documentation
  36. pip install sphinx
  37. cd doc
  38. make html
  39. touch build/html/.nojekyll
  40. rm -r build/html/_sources
  41. ;;
  42. *)
  43. echo "Unrecognized value of TASK: $TASK"
  44. exit 1
  45. esac
  46. }
  47. # This only exists in OS X, but it doesn't cause issues in Linux (the dir doesn't exist, so it's
  48. # ignored).
  49. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  50. run