Browse Source

Second build stage to make building libstorm more robust

tempestpy_adaptions
Matthias Volk 8 years ago
parent
commit
5bfc0f91c1
  1. 145
      .travis.yml
  2. 64
      travis/generate_travis.py
  3. 2
      travis/postsubmit.sh

145
.travis.yml

@ -28,7 +28,7 @@ jobs:
include:
###
# Stage: ('Build dependencies', 'BuildDep')
# Stage: Build dependencies
###
# ubuntu-16.10
@ -92,11 +92,11 @@ jobs:
travis/postsubmit.sh DefaultRelease BuildDep
###
# Stage: ('Build library', 'BuildLib')
# Stage: Build library 1
###
# ubuntu-16.10
- stage: Build library
- stage: Build library 1
os: linux
compiler: gcc
env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10
@ -106,7 +106,7 @@ jobs:
travis/postsubmit.sh DefaultDebug BuildLib
before_cache:
docker cp storm:/storm/. .
- stage: Build library
- stage: Build library 1
os: linux
compiler: gcc
env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10
@ -117,7 +117,7 @@ jobs:
before_cache:
docker cp storm:/storm/. .
# debian-9
- stage: Build library
- stage: Build library 1
os: linux
compiler: gcc
env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9
@ -127,7 +127,7 @@ jobs:
travis/postsubmit.sh DefaultDebug BuildLib
before_cache:
docker cp storm:/storm/. .
- stage: Build library
- stage: Build library 1
os: linux
compiler: gcc
env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9
@ -138,7 +138,7 @@ jobs:
before_cache:
docker cp storm:/storm/. .
# osx
- stage: Build library
- stage: Build library 1
os: osx
compiler: clang
env: BUILD=DefaultDebug COMPILER=clang-4.0 STL=libc++
@ -146,7 +146,7 @@ jobs:
travis/install_osx.sh
script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++';
travis/postsubmit.sh DefaultDebug BuildLib
- stage: Build library
- stage: Build library 1
os: osx
compiler: clang
env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++
@ -156,7 +156,71 @@ jobs:
travis/postsubmit.sh DefaultRelease BuildLib
###
# Stage: ('Build all', 'BuildAll')
# Stage: Build library 2
###
# ubuntu-16.10
- stage: Build library 2
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 2
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/. .
# debian-9
- stage: Build library 2
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 2
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/. .
# osx
- stage: Build library 2
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 2
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
###
# ubuntu-16.10
@ -220,7 +284,7 @@ jobs:
travis/postsubmit.sh DefaultRelease BuildAll
###
# Stage: ('Test all', 'TestAll')
# Stage: Test all
###
# ubuntu-16.10
@ -283,3 +347,64 @@ 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

64
travis/generate_travis.py

@ -20,10 +20,11 @@ build_types = [
# Stages in travis
stages = [
("Build dependencies", "BuildDep"),
("Build library", "BuildLib"),
("Build all", "BuildAll"),
("Test all", "TestAll"),
("Build dependencies", "BuildDep", False),
("Build library 1", "BuildLib", True),
("Build library 2", "BuildLib", False),
("Build all", "BuildAll", False),
("Test all", "TestAll", False),
]
@ -60,10 +61,11 @@ if __name__ == "__main__":
s += " include:\n"
# Generate all configurations
allowedFailures = ""
for stage in stages:
s += "\n"
s += " ###\n"
s += " # Stage: {}\n".format(stage)
s += " # Stage: {}\n".format(stage[0])
s += " ###\n"
s += "\n"
# Linux via Docker
@ -71,31 +73,47 @@ if __name__ == "__main__":
linux = config[0]
compiler = "{}{}".format(config[1], config[2])
s += " # {}\n".format(linux)
buildConfig = ""
for build in build_types:
s += " - stage: {}\n".format(stage[0])
s += " os: linux\n"
s += " compiler: {}\n".format(config[1])
s += " env: BUILD={} COMPILER={} LINUX={}\n".format(build, compiler, linux)
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 {} {}\n".format(build, stage[1])
s += " before_cache:\n"
s += " docker cp storm:/storm/. .\n"
buildConfig += " - stage: {}\n".format(stage[0])
buildConfig += " os: linux\n"
buildConfig += " compiler: {}\n".format(config[1])
buildConfig += " env: BUILD={} COMPILER={} LINUX={}\n".format(build, compiler, linux)
buildConfig += " install: export OS=linux; export COMPILER='{}'; export LINUX='{}';\n".format(compiler, linux)
buildConfig += " travis/install_linux.sh\n"
buildConfig += " script: export OS=linux; export COMPILER='{}'; export LINUX='{}';\n".format(compiler, linux)
buildConfig += " travis/postsubmit.sh {} {}\n".format(build, stage[1])
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:
osx = config[0]
compiler = "{}{}".format(config[1], config[2])
s += " # {}\n".format(osx)
buildConfig = ""
for build in build_types:
s += " - stage: {}\n".format(stage[0])
s += " os: osx\n"
s += " compiler: {}\n".format(config[1])
s += " env: BUILD={} COMPILER={} STL=libc++\n".format(build, compiler)
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 {} {}\n".format(build, stage[1])
buildConfig += " - stage: {}\n".format(stage[0])
buildConfig += " os: osx\n"
buildConfig += " compiler: {}\n".format(config[1])
buildConfig += " env: BUILD={} COMPILER={} STL=libc++\n".format(build, compiler)
buildConfig += " install: export OS=osx; export COMPILER='{}'; export STL='libc++';\n".format(compiler)
buildConfig += " travis/install_osx.sh\n"
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)

2
travis/postsubmit.sh

@ -4,7 +4,7 @@
set -e
: ${N_JOBS:=2}
: ${TIMEOUT:=2200}
: ${TIMEOUT:=2000}
if [ "$STL" != "" ]
then

Loading…
Cancel
Save