From 120bf729d4e112e690d80ea685746b8f355853da Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 16:36:41 +0200 Subject: [PATCH] Fixed parsing issue --- .travis.yml | 107 ++++++++++++++++++++++++-------------- travis/generate_travis.py | 35 ++++++++++++- 2 files changed, 101 insertions(+), 41 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f8ebd6b9..2ebd611c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ -# # This file was inspired from https://github.com/google/fruit + +# +# General config # branches: only: @@ -7,14 +9,30 @@ branches: dist: trusty language: cpp +# Enable caching +cache: + timeout: 600 + directories: + - build + - travis/mtime_cache + +# Enable docker support +services: +- docker +sudo: required + +# +# Configurations +# matrix: fast_finish: true include: ### - # Ubuntu 16.10 + # ubuntu-16.10 ### + - stage: Build dependencies os: linux compiler: gcc @@ -22,7 +40,8 @@ matrix: 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 BuildDep before_cache: + travis/postsubmit.sh DefaultDebug BuildDep + before_cache: docker cp storm:/storm/. . - stage: Build library os: linux @@ -31,7 +50,8 @@ matrix: 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: + travis/postsubmit.sh DefaultDebug BuildLib + before_cache: docker cp storm:/storm/. . - stage: Build all os: linux @@ -40,7 +60,8 @@ matrix: 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 BuildAll before_cache: + travis/postsubmit.sh DefaultDebug BuildAll + before_cache: docker cp storm:/storm/. . - stage: Test all os: linux @@ -49,7 +70,8 @@ matrix: 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 TestAll before_cache: + travis/postsubmit.sh DefaultDebug TestAll + before_cache: docker cp storm:/storm/. . - stage: Build dependencies os: linux @@ -58,7 +80,8 @@ matrix: 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 BuildDep before_cache: + travis/postsubmit.sh DefaultRelease BuildDep + before_cache: docker cp storm:/storm/. . - stage: Build library os: linux @@ -67,7 +90,8 @@ matrix: 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: + travis/postsubmit.sh DefaultRelease BuildLib + before_cache: docker cp storm:/storm/. . - stage: Build all os: linux @@ -76,7 +100,8 @@ matrix: 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 BuildAll before_cache: + travis/postsubmit.sh DefaultRelease BuildAll + before_cache: docker cp storm:/storm/. . - stage: Test all os: linux @@ -85,11 +110,12 @@ matrix: 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 TestAll before_cache: + travis/postsubmit.sh DefaultRelease TestAll + before_cache: docker cp storm:/storm/. . ### - # Debian 9 + # debian-9 ### - stage: Build dependencies @@ -99,7 +125,8 @@ matrix: 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 BuildDep before_cache: + travis/postsubmit.sh DefaultDebug BuildDep + before_cache: docker cp storm:/storm/. . - stage: Build library os: linux @@ -108,7 +135,8 @@ matrix: 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: + travis/postsubmit.sh DefaultDebug BuildLib + before_cache: docker cp storm:/storm/. . - stage: Build all os: linux @@ -117,7 +145,8 @@ matrix: 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 BuildAll before_cache: + travis/postsubmit.sh DefaultDebug BuildAll + before_cache: docker cp storm:/storm/. . - stage: Test all os: linux @@ -126,7 +155,8 @@ matrix: 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 TestAll before_cache: + travis/postsubmit.sh DefaultDebug TestAll + before_cache: docker cp storm:/storm/. . - stage: Build dependencies os: linux @@ -135,7 +165,8 @@ matrix: 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 BuildDep before_cache: + travis/postsubmit.sh DefaultRelease BuildDep + before_cache: docker cp storm:/storm/. . - stage: Build library os: linux @@ -144,7 +175,8 @@ matrix: 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: + travis/postsubmit.sh DefaultRelease BuildLib + before_cache: docker cp storm:/storm/. . - stage: Build all os: linux @@ -153,7 +185,8 @@ matrix: 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 BuildAll before_cache: + travis/postsubmit.sh DefaultRelease BuildAll + before_cache: docker cp storm:/storm/. . - stage: Test all os: linux @@ -162,11 +195,12 @@ matrix: 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 TestAll before_cache: + travis/postsubmit.sh DefaultRelease TestAll + before_cache: docker cp storm:/storm/. . ### - # Mac OS X + # osx ### - stage: Build dependencies @@ -176,49 +210,56 @@ matrix: 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 BuildDep - stage: Build library + travis/postsubmit.sh DefaultDebug BuildDep + - stage: Build library 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 all + travis/postsubmit.sh DefaultDebug BuildLib + - stage: Build all 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 BuildAll - stage: Test all + travis/postsubmit.sh DefaultDebug BuildAll + - stage: Test all 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 TestAll - stage: Build dependencies + travis/postsubmit.sh DefaultDebug TestAll + - stage: Build dependencies 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 BuildDep - stage: Build library + travis/postsubmit.sh DefaultRelease BuildDep + - stage: Build library 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 - stage: Build all + travis/postsubmit.sh DefaultRelease BuildLib + - stage: Build all 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 BuildAll - stage: Test all + travis/postsubmit.sh DefaultRelease BuildAll + - stage: Test all os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ @@ -227,15 +268,3 @@ matrix: script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++' travis/postsubmit.sh DefaultRelease TestAll - -# Enable caching -cache: - timeout: 600 - directories: - - build - - travis/mtime_cache - -# Enable docker support -services: -- docker -sudo: required diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 3940d5916..6c9ee4d13 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -29,6 +29,37 @@ stages = [ if __name__ == "__main__": s = "" + # Initial config + s += "# This file was inspired from https://github.com/google/fruit\n" + s += "\n" + s += "#\n" + s += "# General config\n" + s += "#\n" + s += "branches:\n" + s += " only:\n" + s += " - master\n" + s += "dist: trusty\n" + s += "language: cpp\n" + s += "\n" + s += "# Enable caching\n" + s += "cache:\n" + s += " timeout: 600\n" + s += " directories:\n" + s += " - build\n" + s += " - travis/mtime_cache\n" + s += "\n" + s += "# Enable docker support\n" + s += "services:\n" + s += "- docker\n" + s += "sudo: required\n" + s += "\n" + s += "#\n" + s += "# Configurations\n" + s += "#\n" + s += "matrix:\n" + s += " fast_finish: true\n" + s += "\n" + s += " include:\n" # Generate all configurations # Linux via Docker @@ -49,7 +80,7 @@ if __name__ == "__main__": s += " install: export OS=linux; export COMPILER='{}'; export LINUX='{}'\n".format(compiler, linux) s += " travis/install_linux.sh\n" s += " script: export OS=linux; export COMPILER='{}'; export LINUX='{}'\n".format(compiler, linux) - s += " travis/postsubmit.sh {} {}".format(build, stage[1]) + s += " travis/postsubmit.sh {} {}\n".format(build, stage[1]) s += " before_cache:\n" s += " docker cp storm:/storm/. .\n" @@ -71,6 +102,6 @@ if __name__ == "__main__": s += " install: export OS=osx; export COMPILER='{}'; export STL='libc++'\n".format(compiler) s += " travis/install_osx.sh\n" s += " script: export OS=osx; export COMPILER='{}'; export STL='libc++'\n".format(compiler) - s += " travis/postsubmit.sh {} {}".format(build, stage[1]) + s += " travis/postsubmit.sh {} {}\n".format(build, stage[1]) print(s)