From 987a53dfd1b31e55010e7817142330a536317ffa Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 15:22:40 +0200 Subject: [PATCH] Two tries for building libstorm --- .travis.yml | 73 +++---------------------------------- travis/generate_travis.py | 23 +++--------- travis/postsubmit-helper.sh | 8 ++++ travis/postsubmit.sh | 11 +++++- 4 files changed, 28 insertions(+), 87 deletions(-) diff --git a/.travis.yml b/.travis.yml index 27a52383c..dc984b8d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,7 +103,7 @@ jobs: 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/postsubmit.sh DefaultDebug BuildLib + travis/postsubmit.sh DefaultDebug BuildLib1 before_cache: docker cp storm:/storm/. . - stage: Build library 1 @@ -113,7 +113,7 @@ jobs: 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/postsubmit.sh DefaultRelease BuildLib + travis/postsubmit.sh DefaultRelease BuildLib1 before_cache: docker cp storm:/storm/. . # debian-9 @@ -124,7 +124,7 @@ jobs: 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/postsubmit.sh DefaultDebug BuildLib + travis/postsubmit.sh DefaultDebug BuildLib1 before_cache: docker cp storm:/storm/. . - stage: Build library 1 @@ -134,7 +134,7 @@ jobs: 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/postsubmit.sh DefaultRelease BuildLib + travis/postsubmit.sh DefaultRelease BuildLib1 before_cache: docker cp storm:/storm/. . # osx @@ -145,7 +145,7 @@ jobs: 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/postsubmit.sh DefaultDebug BuildLib + travis/postsubmit.sh DefaultDebug BuildLib1 - stage: Build library 1 os: osx compiler: clang @@ -153,7 +153,7 @@ jobs: 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/postsubmit.sh DefaultRelease BuildLib + travis/postsubmit.sh DefaultRelease BuildLib1 ### # Stage: Build library 2 @@ -347,64 +347,3 @@ jobs: script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/postsubmit.sh DefaultRelease TestAll - # - # Allowed failures - # - allow_failures: - - stage: Build library 1 - 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/postsubmit.sh DefaultDebug BuildLib - before_cache: - docker cp storm:/storm/. . - - stage: Build library 1 - 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/postsubmit.sh DefaultRelease BuildLib - before_cache: - docker cp storm:/storm/. . - - stage: Build library 1 - 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/postsubmit.sh DefaultDebug BuildLib - before_cache: - docker cp storm:/storm/. . - - stage: Build library 1 - 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/postsubmit.sh DefaultRelease BuildLib - before_cache: - docker cp storm:/storm/. . - - stage: Build library 1 - 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/postsubmit.sh DefaultDebug BuildLib - - stage: Build library 1 - 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/postsubmit.sh DefaultRelease BuildLib - diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 46418a5d9..f1bb22e53 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -20,11 +20,11 @@ build_types = [ # Stages in travis stages = [ - ("Build dependencies", "BuildDep", False), - ("Build library 1", "BuildLib", True), - ("Build library 2", "BuildLib", False), - ("Build all", "BuildAll", False), - ("Test all", "TestAll", False), + ("Build dependencies", "BuildDep"), + ("Build library 1", "BuildLib1"), + ("Build library 2", "BuildLib"), + ("Build all", "BuildAll"), + ("Test all", "TestAll"), ] @@ -61,7 +61,6 @@ if __name__ == "__main__": s += " include:\n" # Generate all configurations - allowedFailures = "" for stage in stages: s += "\n" s += " ###\n" @@ -86,8 +85,6 @@ if __name__ == "__main__": buildConfig += " before_cache:\n" buildConfig += " docker cp storm:/storm/. .\n" s += buildConfig - if stage[2]: - allowedFailures += buildConfig # Mac OS X for config in configs_mac: @@ -105,15 +102,5 @@ if __name__ == "__main__": buildConfig += " script: export OS=osx; export COMPILER='{}'; export STL='libc++';\n".format(compiler) buildConfig += " travis/postsubmit.sh {} {}\n".format(build, stage[1]) s += buildConfig - if stage[2]: - allowedFailures += buildConfig - - # Allow failures - s += "\n" - s += " #\n" - s += " # Allowed failures\n" - s += " #\n" - s += " allow_failures:\n" - s += allowedFailures print(s) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 3d7383c89..39d5d0a2a 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -37,6 +37,14 @@ run() { travis_fold end make_dep ;; + BuildLib1) + # Make libstorm (first try) + travis_fold start make_lib + cd build + make storm -j$N_JOBS + travis_fold end make_lib + ;; + BuildLib) # Make libstorm travis_fold start make_lib diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 0c4e93603..a594faeb1 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -11,6 +11,13 @@ then STLARG="-stdlib=$STL" fi +if [ "$2$ = "BuildLib1"] +then + TIMEARG="--preserve-status" +else + TIMEARG="" +fi + case $OS in linux) # Execute docker image on linux @@ -23,7 +30,7 @@ linux) docker cp . storm:/storm # Execute main process - timeout $TIMEOUT docker exec storm bash -c " + timeout $TIMEOUT $TIMEARG docker exec storm bash -c " export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; export STLARG=$STLARG; @@ -39,7 +46,7 @@ osx) export N_JOBS export STLARG export OS - gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" + gtimeout $TIMEOUT $TIMEARG travis/postsubmit-helper.sh "$1" "$2" exit $? ;;