From dcedea5a086e29264112e668cac8e4b126c1a996 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 15:59:01 +0200 Subject: [PATCH] Caching from docker as well --- .travis.yml | 6 ++++-- travis/dockerfiles/common_install.sh | 1 + travis/postsubmit.sh | 9 +++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7cec6968b..13ab99a3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,9 @@ matrix: travis/install_linux.sh os: linux script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - timeout 2400 travis/postsubmit.sh DebugPlain + travis/postsubmit.sh DebugPlain + before_cache: + docker cp storm:/storm . # - compiler: gcc # env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain # install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh @@ -58,7 +60,7 @@ matrix: os: osx osx_image: xcode8 script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - gtimeout 2400 travis/postsubmit.sh DebugPlain + travis/postsubmit.sh DebugPlain # - compiler: clang # env: COMPILER=clang-default STL=libc++ TEST=DebugPlain # install: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; diff --git a/travis/dockerfiles/common_install.sh b/travis/dockerfiles/common_install.sh index 588e56a56..9a40c7168 100644 --- a/travis/dockerfiles/common_install.sh +++ b/travis/dockerfiles/common_install.sh @@ -5,6 +5,7 @@ set -e apt-get update -qq apt-get install -y --no-install-recommends \ + build-essential \ ruby \ git \ cmake \ diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index f875ce86f..dc3ab9ce8 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -4,6 +4,7 @@ set -e : ${N_JOBS:=2} +: ${TIMEOUT:=400} if [ "$STL" != "" ] then @@ -13,12 +14,16 @@ fi case $OS in linux) # Execute docker image on linux + # Stop previous session docker rm -f storm &>/dev/null || true + # Run container docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX + # Copy local content into container docker exec storm mkdir storm docker cp . storm:/storm - docker exec storm bash -c " + # Execute main process + timeout $TIMEOUT docker exec storm bash -c " export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; export STLARG=$STLARG; @@ -34,7 +39,7 @@ osx) export N_JOBS export STLARG export OS - travis/postsubmit-helper.sh "$1" + gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" exit $? ;;