From 6c2213b9a1069ea22b1748afe0bcfc3dac08f7d0 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:24:25 +0200 Subject: [PATCH] Remove build directory in first stage of travis --- .travis.yml | 166 ++++++++++++++++++++------------------ travis/build-helper.sh | 2 - travis/generate_travis.py | 14 ++-- 3 files changed, 95 insertions(+), 87 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58ccf03e5..bb8727e75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,10 @@ jobs: compiler: clang env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - rm -rf build + - travis/install_osx.sh script: - travis/build.sh Build1 + - travis/build.sh Build1 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (1st run) @@ -47,9 +48,10 @@ jobs: compiler: clang env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - rm -rf build + - travis/install_osx.sh script: - travis/build.sh Build1 + - travis/build.sh Build1 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 @@ -58,11 +60,12 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - rm -rf build + - travis/install_linux.sh script: - travis/build.sh Build1 + - travis/build.sh Build1 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (1st run) @@ -70,11 +73,12 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - rm -rf build + - travis/install_linux.sh script: - travis/build.sh Build1 + - travis/build.sh Build1 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 @@ -83,11 +87,12 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - rm -rf build + - travis/install_linux.sh script: - travis/build.sh Build1 + - travis/build.sh Build1 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (1st run) @@ -95,11 +100,12 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - rm -rf build + - travis/install_linux.sh script: - travis/build.sh Build1 + - travis/build.sh Build1 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; @@ -113,9 +119,9 @@ jobs: compiler: clang env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh Build2 + - travis/build.sh Build2 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (2nd run) @@ -123,9 +129,9 @@ jobs: compiler: clang env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh Build2 + - travis/build.sh Build2 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 @@ -134,11 +140,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build2 + - travis/build.sh Build2 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (2nd run) @@ -146,11 +152,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build2 + - travis/build.sh Build2 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 @@ -159,11 +165,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build2 + - travis/build.sh Build2 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (2nd run) @@ -171,11 +177,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build2 + - travis/build.sh Build2 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; @@ -189,9 +195,9 @@ jobs: compiler: clang env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh Build3 + - travis/build.sh Build3 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (3rd run) @@ -199,9 +205,9 @@ jobs: compiler: clang env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh Build3 + - travis/build.sh Build3 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 @@ -210,11 +216,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build3 + - travis/build.sh Build3 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (3rd run) @@ -222,11 +228,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build3 + - travis/build.sh Build3 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 @@ -235,11 +241,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build3 + - travis/build.sh Build3 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (3rd run) @@ -247,11 +253,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build3 + - travis/build.sh Build3 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; @@ -265,9 +271,9 @@ jobs: compiler: clang env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh Build4 + - travis/build.sh Build4 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (4th run) @@ -275,9 +281,9 @@ jobs: compiler: clang env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh Build4 + - travis/build.sh Build4 after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 @@ -286,11 +292,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build4 + - travis/build.sh Build4 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (4th run) @@ -298,11 +304,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build4 + - travis/build.sh Build4 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 @@ -311,11 +317,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build4 + - travis/build.sh Build4 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (4th run) @@ -323,11 +329,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh Build4 + - travis/build.sh Build4 before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; @@ -341,9 +347,9 @@ jobs: compiler: clang env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh TestAll + - travis/build.sh TestAll after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Test all @@ -351,9 +357,9 @@ jobs: compiler: clang env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: - travis/install_osx.sh + - travis/install_osx.sh script: - travis/build.sh TestAll + - travis/build.sh TestAll after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 @@ -362,11 +368,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh TestAll + - travis/build.sh TestAll before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Test all @@ -374,11 +380,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh TestAll + - travis/build.sh TestAll before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 @@ -387,11 +393,11 @@ jobs: compiler: gcc env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh TestAll + - travis/build.sh TestAll before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Test all @@ -399,11 +405,11 @@ jobs: compiler: gcc env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 install: - travis/install_linux.sh + - travis/install_linux.sh script: - travis/build.sh TestAll + - travis/build.sh TestAll before_cache: - docker cp storm:/storm/. . + - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 72e377617..835da8dc3 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -15,8 +15,6 @@ run() { case "$1" in Build1) travis_fold start cmake - # Remove old build folder - rm -rf build # CMake mkdir build cd build diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 59dcd0aac..c54e947fe 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -79,9 +79,11 @@ if __name__ == "__main__": buildConfig += " compiler: {}\n".format(config[1]) buildConfig += " env: CONFIG={} COMPILER={} STL=libc++\n".format(build, compiler) buildConfig += " install:\n" - buildConfig += " travis/install_osx.sh\n" + if stage[1] == "Build1": + buildConfig += " - rm -rf build\n" + buildConfig += " - travis/install_osx.sh\n" buildConfig += " script:\n" - buildConfig += " travis/build.sh {}\n".format(stage[1]) + buildConfig += " - travis/build.sh {}\n".format(stage[1]) buildConfig += " after_failure:\n" buildConfig += " - find build -iname '*err*.log' -type f -print -exec cat {} \;\n" s += buildConfig @@ -98,11 +100,13 @@ if __name__ == "__main__": buildConfig += " compiler: {}\n".format(config[1]) buildConfig += " env: CONFIG={} LINUX={} COMPILER={}\n".format(build, linux, compiler) buildConfig += " install:\n" - buildConfig += " travis/install_linux.sh\n" + if stage[1] == "Build1": + buildConfig += " - rm -rf build\n" + buildConfig += " - travis/install_linux.sh\n" buildConfig += " script:\n" - buildConfig += " travis/build.sh {}\n".format(stage[1]) + buildConfig += " - travis/build.sh {}\n".format(stage[1]) buildConfig += " before_cache:\n" - buildConfig += " docker cp storm:/storm/. .\n" + buildConfig += " - docker cp storm:/storm/. .\n" buildConfig += " after_failure:\n" buildConfig += " - find build -iname '*err*.log' -type f -print -exec cat {} \;\n" s += buildConfig