The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

84 lines
1.8 KiB

2 months ago
  1. #!/bin/bash -x
  2. # Helper for travis folding
  3. travis_fold() {
  4. local action=$1
  5. local name=$2
  6. echo -en "travis_fold:${action}:${name}\r"
  7. }
  8. N_JOBS=2
  9. OS=$TRAVIS_OS_NAME
  10. # Use CLN?
  11. BUILD_CARL_CLN=FALSE
  12. if [[ "$CONFIG" == *Cln* ]]
  13. then
  14. BUILD_CARL_CLN=TRUE
  15. fi
  16. # Use carlparser?
  17. BUILD_CARL_PARSER=FALSE
  18. if [[ "$CONFIG" == *Parser* ]]
  19. then
  20. BUILD_CARL_PARSER=TRUE
  21. fi
  22. case $OS in
  23. linux)
  24. # Execute docker image on Linux
  25. # Stop previous session
  26. docker rm -f pycarl &>/dev/null
  27. # Run container
  28. set -e
  29. docker run -d -it --name pycarl --privileged movesrwth/storm-basesystem:$LINUX
  30. # Copy local content into container
  31. docker exec pycarl mkdir /opt/pycarl
  32. docker cp . pycarl:/opt/pycarl
  33. travis_fold start install_dependencies
  34. docker exec pycarl apt-get update
  35. # Install virtualenv
  36. docker exec pycarl apt-get install -qq -y libeigen3-dev python3 python3-venv
  37. # Install dependencies for carl-parser
  38. if [[ "$BUILD_CARL_PARSER" == TRUE ]]
  39. then
  40. docker exec pycarl apt-get install -qq -y maven uuid-dev
  41. fi
  42. travis_fold end install_dependencies
  43. set +e
  44. # Execute main process
  45. docker exec pycarl bash -c "
  46. export TASK=$TASK;
  47. export PYTHON=$PYTHON;
  48. export CONFIG=$CONFIG;
  49. export COMPILER=$COMPILER;
  50. export N_JOBS=$N_JOBS;
  51. export STLARG=;
  52. export OS=$OS;
  53. export BUILD_CARL_CLN=$BUILD_CARL_CLN;
  54. export BUILD_CARL_PARSER=$BUILD_CARL_PARSER;
  55. cd /opt/pycarl;
  56. travis/build-helper.sh"
  57. exit $?
  58. ;;
  59. osx)
  60. # Mac OSX
  61. STLARG="-stdlib=libc++"
  62. export N_JOBS
  63. export STLARG
  64. export OS
  65. export BUILD_CARL_CLN
  66. export BUILD_CARL_PARSER
  67. travis/build-helper.sh
  68. exit $?
  69. ;;
  70. *)
  71. # Unknown OS
  72. echo "Unsupported OS: $OS"
  73. exit 1
  74. esac