From 02fd731fa25697a49128e91f955baa3554963beb Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 23 Jun 2017 10:20:32 +0200 Subject: [PATCH] Discared specialized travis stages and just use 4 iterations for building Storm --- .travis.yml | 104 +++++++++++++++++++------------------- travis/build.sh | 25 ++++----- travis/generate_travis.py | 8 +-- 3 files changed, 67 insertions(+), 70 deletions(-) diff --git a/.travis.yml b/.travis.yml index 488f541af..1b45b7f4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,258 +28,258 @@ jobs: include: ### - # Stage: Build dependencies + # Stage: Build (1st run) ### # osx - - stage: Build dependencies + - stage: Build (1st run) os: osx compiler: clang env: BUILD=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug BuildDep - - stage: Build dependencies + travis/build.sh DefaultDebug Build1 + - stage: Build (1st run) os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease BuildDep + travis/build.sh DefaultRelease Build1 # ubuntu-16.10 - - stage: Build dependencies + - stage: Build (1st run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug BuildDep + travis/build.sh DefaultDebug Build1 before_cache: docker cp storm:/storm/. . - - stage: Build dependencies + - stage: Build (1st run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease BuildDep + travis/build.sh DefaultRelease Build1 before_cache: docker cp storm:/storm/. . # debian-9 - - stage: Build dependencies + - stage: Build (1st run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug BuildDep + travis/build.sh DefaultDebug Build1 before_cache: docker cp storm:/storm/. . - - stage: Build dependencies + - stage: Build (1st run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease BuildDep + travis/build.sh DefaultRelease Build1 before_cache: docker cp storm:/storm/. . ### - # Stage: Build library (1st run) + # Stage: Build (2nd run) ### # osx - - stage: Build library (1st run) + - stage: Build (2nd run) os: osx compiler: clang env: BUILD=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug BuildLib1 - - stage: Build library (1st run) + travis/build.sh DefaultDebug Build2 + - stage: Build (2nd run) os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease BuildLib1 + travis/build.sh DefaultRelease Build2 # ubuntu-16.10 - - stage: Build library (1st run) + - stage: Build (2nd run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug BuildLib1 + travis/build.sh DefaultDebug Build2 before_cache: docker cp storm:/storm/. . - - stage: Build library (1st run) + - stage: Build (2nd run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease BuildLib1 + travis/build.sh DefaultRelease Build2 before_cache: docker cp storm:/storm/. . # debian-9 - - stage: Build library (1st run) + - stage: Build (2nd run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug BuildLib1 + travis/build.sh DefaultDebug Build2 before_cache: docker cp storm:/storm/. . - - stage: Build library (1st run) + - stage: Build (2nd run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease BuildLib1 + travis/build.sh DefaultRelease Build2 before_cache: docker cp storm:/storm/. . ### - # Stage: Build library (2nd run) + # Stage: Build (3rd run) ### # osx - - stage: Build library (2nd run) + - stage: Build (3rd run) os: osx compiler: clang env: BUILD=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug BuildLib - - stage: Build library (2nd run) + travis/build.sh DefaultDebug Build3 + - stage: Build (3rd run) os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease BuildLib + travis/build.sh DefaultRelease Build3 # ubuntu-16.10 - - stage: Build library (2nd run) + - stage: Build (3rd run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug BuildLib + travis/build.sh DefaultDebug Build3 before_cache: docker cp storm:/storm/. . - - stage: Build library (2nd run) + - stage: Build (3rd run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease BuildLib + travis/build.sh DefaultRelease Build3 before_cache: docker cp storm:/storm/. . # debian-9 - - stage: Build library (2nd run) + - stage: Build (3rd run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug BuildLib + travis/build.sh DefaultDebug Build3 before_cache: docker cp storm:/storm/. . - - stage: Build library (2nd run) + - stage: Build (3rd run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease BuildLib + travis/build.sh DefaultRelease Build3 before_cache: docker cp storm:/storm/. . ### - # Stage: Build all + # Stage: Build (4th run) ### # osx - - stage: Build all + - stage: Build (4th run) os: osx compiler: clang env: BUILD=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug BuildAll - - stage: Build all + travis/build.sh DefaultDebug Build4 + - stage: Build (4th run) os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease BuildAll + travis/build.sh DefaultRelease Build4 # ubuntu-16.10 - - stage: Build all + - stage: Build (4th run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug BuildAll + travis/build.sh DefaultDebug Build4 before_cache: docker cp storm:/storm/. . - - stage: Build all + - stage: Build (4th run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease BuildAll + travis/build.sh DefaultRelease Build4 before_cache: docker cp storm:/storm/. . # debian-9 - - stage: Build all + - stage: Build (4th run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug BuildAll + travis/build.sh DefaultDebug Build4 before_cache: docker cp storm:/storm/. . - - stage: Build all + - stage: Build (4th run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease BuildAll + travis/build.sh DefaultRelease Build4 before_cache: docker cp storm:/storm/. . diff --git a/travis/build.sh b/travis/build.sh index 238f113a9..abf611603 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -10,9 +10,11 @@ then STLARG="-stdlib=$STL" fi +EXITCODE=42 + case $OS in linux) - # Execute docker image on linux + # Execute docker image on Linux # Stop previous session docker rm -f storm &>/dev/null # Run container @@ -32,12 +34,6 @@ linux) cd storm; travis/build-helper.sh $1 $2" EXITCODE=$? - if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] - then - exit 0 - else - exit $EXITCODE - fi ;; osx) @@ -48,16 +44,17 @@ osx) export OS gtimeout $TIMEOUT_MAC travis/build-helper.sh "$1" "$2" EXITCODE=$? - if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] - then - exit 0 - else - exit $EXITCODE - fi ;; *) - # Other OS + # Unknown OS echo "Unsupported OS: $OS" exit 1 esac + +if [[ $EXITCODE == 124 ]] && [[ "$2" == Build* ]] && [[ "$2" != "Build4" ]] +then + exit 0 +else + exit $EXITCODE +fi diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 202ef19ac..7e1ab7735 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -20,10 +20,10 @@ build_types = [ # Stages in travis stages = [ - ("Build dependencies", "BuildDep"), - ("Build library (1st run)", "BuildLib1"), - ("Build library (2nd run)", "BuildLib"), - ("Build all", "BuildAll"), + ("Build (1st run)", "Build1"), + ("Build (2nd run)", "Build2"), + ("Build (3rd run)", "Build3"), + ("Build (4th run)", "Build4"), ("Test all", "TestAll"), ]