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.

99 lines
2.7 KiB

3 months ago
  1. #!/usr/bin/env bash
  2. mkdir -p build || return 1
  3. cd build/ || return 1
  4. cmake -D DEVELOPER=ON -D THREAD_SAFE=ON -D USE_BLISS=ON -D USE_CLN_NUMBERS=ON -D USE_COCOA=ON -D USE_GINAC=ON ../ || return 1
  5. function keep_waiting() {
  6. while true; do
  7. echo -e "."
  8. sleep 60
  9. done
  10. }
  11. if [ -z "$MAKE_PARALLEL" ]; then
  12. MAKE_PARALLEL="-j2"
  13. fi
  14. if [[ ${TASK} == "dependencies" ]]; then
  15. keep_waiting &
  16. /usr/bin/time make ${MAKE_PARALLEL} resources || return 1
  17. kill $!
  18. elif [[ ${TASK} == "coverity" ]]; then
  19. keep_waiting &
  20. /usr/bin/time make ${MAKE_PARALLEL} lib_carl || return 1
  21. /usr/bin/time make ${MAKE_PARALLEL} || return 1
  22. kill $!
  23. elif [[ ${TASK} == "sonarcloud" ]]; then
  24. cmake -D COVERAGE=ON ../ || return 1
  25. WRAPPER="build-wrapper-linux-x86-64 --out-dir ../bw-output"
  26. $WRAPPER make ${MAKE_PARALLEL} lib_carl || return 1
  27. $WRAPPER make ${MAKE_PARALLEL} || return 1
  28. make coverage-collect
  29. cd ../ && sonar-scanner -X -Dproject.settings=build/sonarcloud.properties && cd build/
  30. elif [[ ${TASK} == "doxygen" ]]; then
  31. cmake -D DOCUMENTATION_CREATE_PDF=ON -D BUILD_DOXYGEN=ON ../
  32. make doc || return 1
  33. git config --global user.email "gereon.kremer@cs.rwth-aachen.de"
  34. git config --global user.name "Travis doxygen daemon"
  35. git clone https://${GH_TOKEN}@github.com/smtrat/smtrat.github.io.git
  36. cd smtrat.github.io/ || return 1
  37. git branch -m master old_master
  38. git checkout --orphan master
  39. # Update cloned copy
  40. cp -r ../doc/html/* carl/ || return 1
  41. cp ../doc/*.pdf . || return 1
  42. git add . || return 1
  43. # Commit and push
  44. git commit -q -m "Updated documentation for carl" || return 1
  45. git push -f origin master || return 1
  46. elif [[ ${TASK} == "pycarl" ]]; then
  47. # Create a python virtual environment for local installation
  48. virtualenv -p python3 pycarl-env
  49. source pycarl-env/bin/activate
  50. /usr/bin/time make ${MAKE_PARALLEL} lib_carl || return 1
  51. # Clone pycarl
  52. git clone https://github.com/moves-rwth/pycarl.git
  53. cd pycarl/ || return 1
  54. # Build bindings
  55. python setup.py build_ext -j 1 develop || return 1
  56. # Run tests
  57. python setup.py test || return 1
  58. elif [[ ${TASK} == "tidy" ]]; then
  59. /usr/bin/time make tidy || return 1
  60. elif [[ ${TASK} == "addons" ]]; then
  61. cmake -D BUILD_ADDONS=ON -D BUILD_ADDON_PARSER=ON -D BUILD_ADDON_PYCARL=ON -D DEVELOPER=ON -D USE_CLN_NUMBERS=ON -D USE_GINAC=ON -D USE_COCOA=ON ../ || return 1
  62. /usr/bin/time make ${MAKE_PARALLEL} lib_carl || return 1
  63. /usr/bin/time make ${MAKE_PARALLEL} || return 1
  64. /usr/bin/time make -j1 CTEST_OUTPUT_ON_FAILURE=1 test || return 1
  65. else
  66. /usr/bin/time make ${MAKE_PARALLEL} lib_carl || return 1
  67. /usr/bin/time make ${MAKE_PARALLEL} || return 1
  68. /usr/bin/time make -j1 CTEST_OUTPUT_ON_FAILURE=1 test || return 1
  69. fi
  70. cd ../