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.

45 lines
817 B

  1. #!/bin/bash
  2. # Inspired by https://github.com/google/fruit
  3. set -e
  4. : ${N_JOBS:=2}
  5. if [ "$STL" != "" ]
  6. then
  7. STLARG="-stdlib=$STL"
  8. fi
  9. case $OS in
  10. linux)
  11. # Execute docker image on linux
  12. docker rm -f storm &>/dev/null || true
  13. docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX
  14. docker exec storm mkdir storm
  15. docker cp . storm:/storm
  16. docker exec storm bash -c "
  17. export COMPILER=$COMPILER;
  18. export N_JOBS=$N_JOBS;
  19. export STLARG=$STLARG;
  20. export OS=$OS;
  21. cd storm;
  22. travis/postsubmit-helper.sh $1"
  23. exit $?
  24. ;;
  25. osx)
  26. # Mac OSX
  27. export COMPILER
  28. export N_JOBS
  29. export STLARG
  30. export OS
  31. travis/postsubmit-helper.sh "$1"
  32. exit $?
  33. ;;
  34. *)
  35. # Other OS
  36. echo "Unsupported OS: $OS"
  37. exit 1
  38. esac