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.

75 lines
1.4 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. case "$CONFIG" in
  21. Debug*)
  22. python setup.py build_ext --debug -j 1 develop
  23. ;;
  24. *)
  25. python setup.py build_ext -j 1 develop
  26. ;;
  27. esac
  28. travis_fold end build_pycarl
  29. cd ..
  30. # Build stormpy
  31. travis_fold start build_stormpy
  32. case "$CONFIG" in
  33. Debug*)
  34. python setup.py build_ext --debug -j 1 develop
  35. ;;
  36. *)
  37. python setup.py build_ext -j 1 develop
  38. ;;
  39. esac
  40. travis_fold end build_stormpy
  41. # Perform task
  42. case $TASK in
  43. Test)
  44. # Run tests
  45. set +e
  46. python setup.py test
  47. ;;
  48. Documentation)
  49. # Generate documentation
  50. pip install sphinx sphinx_bootstrap_theme
  51. cd doc
  52. make html
  53. touch build/html/.nojekyll
  54. rm -r build/html/_sources
  55. ;;
  56. *)
  57. echo "Unrecognized value of TASK: $TASK"
  58. exit 1
  59. esac
  60. }
  61. # This only exists in OS X, but it doesn't cause issues in Linux (the dir doesn't exist, so it's
  62. # ignored).
  63. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  64. run