From 9b7517d8bca41a558cbe379f67d555a4ce0e8fbf Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 4 May 2017 17:14:41 +0200 Subject: [PATCH 001/110] Started working on travis support --- .travis.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..d1e3c94ce --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +sudo: required +language: cpp + +matrix: + include: + - compiler: clang + os: osx + osx_image: xcode8 + + +before_install: + - brew update + - brew install cln ginac autoconf cmake doxygen + - brew install boost --c++11 + - brew install gmp --c++11 + - brew tap homebrew/science + - brew install homebrew/science/glpk + - brew install homebrew/science/hwloc + +script: + - mkdir build + - cd build + - cmake .. + - make + +# Linux +#- sudo apt-get update -qq +#- sudo apt-get install -qq git cmake libboost-all-dev libcln-dev libgmp-dev libginac-dev automake doxygen libglpk-dev libhwloc-dev From 4f1c3d5a6dd04d80c669e2579eaa195cbffdb298 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 4 May 2017 17:53:24 +0200 Subject: [PATCH 002/110] Removed already installed packages --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d1e3c94ce..0f2d893d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,11 @@ matrix: before_install: - brew update - - brew install cln ginac autoconf cmake doxygen - - brew install boost --c++11 - brew install gmp --c++11 + - brew install cln + - brew install ginac + - brew install doxygen + - brew install boost --c++11 - brew tap homebrew/science - brew install homebrew/science/glpk - brew install homebrew/science/hwloc From bb5a363689cb9f011cf725388f4dbbe5387584a9 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 5 May 2017 13:37:02 +0200 Subject: [PATCH 003/110] Use scripts from https://github.com/google/fruit --- .travis.yml | 92 ++++++++++++++++++++++--------- travis/install_osx.sh | 52 ++++++++++++++++++ travis/postsubmit-helper.sh | 106 ++++++++++++++++++++++++++++++++++++ travis/postsubmit.sh | 45 +++++++++++++++ 4 files changed, 270 insertions(+), 25 deletions(-) create mode 100755 travis/install_osx.sh create mode 100755 travis/postsubmit-helper.sh create mode 100755 travis/postsubmit.sh diff --git a/.travis.yml b/.travis.yml index 0f2d893d2..b3785a8a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,72 @@ -sudo: required +# +# This file was inspired from https://github.com/google/fruit +# +branches: + only: + - master +dist: trusty language: cpp matrix: - include: - - compiler: clang - os: osx - osx_image: xcode8 - + fast_finish: true -before_install: - - brew update - - brew install gmp --c++11 - - brew install cln - - brew install ginac - - brew install doxygen - - brew install boost --c++11 - - brew tap homebrew/science - - brew install homebrew/science/glpk - - brew install homebrew/science/hwloc - -script: - - mkdir build - - cd build - - cmake .. - - make + include: +# - compiler: gcc +# env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugValgrind +# install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/postsubmit.sh +# DebugValgrind +# - compiler: gcc +# env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain +# install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/postsubmit.sh +# DebugPlain +# - compiler: gcc +# env: COMPILER=gcc-6 UBUNTU=17.04 TEST=ReleasePlain +# install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/postsubmit.sh +# ReleasePlain +# - compiler: clang +# env: COMPILER=clang-4.0 STL=libstdc++ UBUNTU=17.04 TEST=DebugPlain +# install: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; +# export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; +# export UBUNTU='17.04'; extras/scripts/postsubmit.sh DebugPlain +# - compiler: clang +# env: COMPILER=clang-4.0 STL=libstdc++ UBUNTU=17.04 TEST=ReleasePlain +# install: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; +# export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; +# export UBUNTU='17.04'; extras/scripts/postsubmit.sh ReleasePlain +# - compiler: gcc +# env: COMPILER=gcc-6 TEST=DebugPlain +# install: export OS=osx; export COMPILER='gcc-6'; export INSTALL_VALGRIND=1; extras/scripts/travis_ci_install_osx.sh +# os: osx +# osx_image: xcode8 +# script: export OS=osx; export COMPILER='gcc-6'; export INSTALL_VALGRIND=1; extras/scripts/postsubmit.sh +# DebugPlain + - compiler: clang + env: COMPILER=clang-4.0 STL=libc++ TEST=DebugPlain + install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; + travis/install_osx.sh + os: osx + osx_image: xcode8 + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; + travis/postsubmit.sh DebugPlain +# - compiler: clang +# env: COMPILER=clang-default STL=libc++ TEST=DebugPlain +# install: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; +# extras/scripts/travis_ci_install_osx.sh +# os: osx +# osx_image: xcode8.2 +# script: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; extras/scripts/postsubmit.sh +# DebugPlain -# Linux -#- sudo apt-get update -qq -#- sudo apt-get install -qq git cmake libboost-all-dev libcln-dev libgmp-dev libginac-dev automake doxygen libglpk-dev libhwloc-dev +services: +- docker +sudo: required diff --git a/travis/install_osx.sh b/travis/install_osx.sh new file mode 100755 index 000000000..27f192d24 --- /dev/null +++ b/travis/install_osx.sh @@ -0,0 +1,52 @@ +#!/bin/bash -x +# Script installing dependencies +# Inspired by https://github.com/google/fruit + +set -e + +# Helper for installing packages via homebrew +install_brew_package() { + if brew list -1 | grep -q "^$1\$"; then + # Package is installed, upgrade if needed + brew outdated "$1" || brew upgrade "$@" + else + # Package not installed yet, install. + # If there are conflicts, try overwriting the files (these are in /usr/local anyway so it should be ok). + brew install "$@" || brew link --overwrite gcc49 + fi +} + +# Update packages +brew update + +# For md5sum +install_brew_package md5sha1sum +# For `timeout' +install_brew_package coreutils + +which cmake &>/dev/null || install_brew_package cmake + +# Install compiler +case "${COMPILER}" in +gcc-4.8) install_brew_package gcc@4.8 ;; +gcc-4.9) install_brew_package gcc@4.9 ;; +gcc-5) install_brew_package gcc@5 ;; +gcc-6) install_brew_package gcc@6 ;; +clang-default) ;; +clang-3.7) install_brew_package llvm@3.7 --with-clang --with-libcxx;; +clang-3.8) install_brew_package llvm@3.8 --with-clang --with-libcxx;; +clang-3.9) install_brew_package llvm@3.9 --with-clang --with-libcxx;; +clang-4.0) install_brew_package llvm --with-clang --with-libcxx;; +*) echo "Compiler not supported: ${COMPILER}. See travis_ci_install_osx.sh"; exit 1 ;; +esac + + +# Install dependencies +install_brew_package gmp --c++11 +install_brew_package cln +install_brew_package ginac +install_brew_package doxygen +install_brew_package boost --c++11 +brew tap homebrew/science +install_brew_package homebrew/science/glpk +install_brew_package homebrew/science/hwloc diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh new file mode 100755 index 000000000..232001f53 --- /dev/null +++ b/travis/postsubmit-helper.sh @@ -0,0 +1,106 @@ +#!/bin/bash -x +# Inspired by https://github.com/google/fruit + +set -e + +# This only exists in OS X, but it doesn't cause issues in Linux (the dir doesn't exist, so it's +# ignored). +export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" + +case $COMPILER in +gcc-4.8) + export CC=gcc-4.8 + export CXX=g++-4.8 + ;; + +gcc-4.9) + export CC=gcc-4.9 + export CXX=g++-4.9 + ;; + +gcc-5) + export CC=gcc-5 + export CXX=g++-5 + ;; + +gcc-6) + export CC=gcc-6 + export CXX=g++-6 + ;; + +clang-3.5) + export CC=clang-3.5 + export CXX=clang++-3.5 + ;; + +clang-3.6) + export CC=clang-3.6 + export CXX=clang++-3.6 + ;; + +clang-3.7) + export CC=clang-3.7 + export CXX=clang++-3.7 + ;; + +clang-3.8) + export CC=clang-3.8 + export CXX=clang++-3.8 + ;; + +clang-3.9) + export CC=clang-3.9 + export CXX=clang++-3.9 + ;; + +clang-4.0) + case "$OS" in + linux) + export CC=clang-4.0 + export CXX=clang++-4.0 + ;; + osx) + export CC=/usr/local/opt/llvm/bin/clang-4.0 + export CXX=/usr/local/opt/llvm/bin/clang++ + ;; + *) echo "Error: unexpected OS: $OS"; exit 1 ;; + esac + ;; + +clang-default) + export CC=clang + export CXX=clang++ + ;; + +*) + echo "Unrecognized value of COMPILER: $COMPILER" + exit 1 +esac + +run_make() { + make -j$N_JOBS +} + +# Build +echo CXX version: $($CXX --version) +echo C++ Standard library location: $(echo '#include ' | $CXX -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1) +echo Normalized C++ Standard library location: $(readlink -f $(echo '#include ' | $CXX -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1)) + +case "$1" in +DebugPlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="$STLARG") ;; +ReleasePlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="$STLARG") ;; +*) echo "Error: you need to specify one of the supported postsubmit modes (see postsubmit.sh)."; exit 1 ;; +esac + +rm -rf build +mkdir build +cd build +cmake .. "${CMAKE_ARGS[@]}" +echo +echo "Content of CMakeFiles/CMakeError.log:" +if [ -f "CMakeFiles/CMakeError.log" ] +then + cat CMakeFiles/CMakeError.log +fi +echo +run_make diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh new file mode 100755 index 000000000..3f6da6ebb --- /dev/null +++ b/travis/postsubmit.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Inspired by https://github.com/google/fruit + +set -e + +: ${N_JOBS:=2} + +if [ "$STL" != "" ] +then + STLARG="-stdlib=$STL" +fi + +case $OS in +linux) + echo "Linux currently unsupported" + exit 2 +# docker rm -f fruit &>/dev/null || true +# docker run -d -it --name fruit --privileged polettimarco/fruit-basesystem:ubuntu-$UBUNTU +# docker exec fruit mkdir fruit +# docker cp . fruit:/fruit +# +# docker exec fruit bash -c " +# export COMPILER=$COMPILER; +# export N_JOBS=$N_JOBS; +# export STLARG=$STLARG; +# export ASAN_OPTIONS=$ASAN_OPTIONS; +# export OS=$OS; +# cd fruit; extras/scripts/postsubmit-helper.sh $1" +# exit $? + ;; + +osx) + export COMPILER + export N_JOBS + export STLARG + export ASAN_OPTIONS + export OS + extras/scripts/postsubmit-helper.sh "$@" + exit $? + ;; + +*) + echo "Unsupported OS: $OS" + exit 1 +esac From 50fc3b1922f55eb6cc67bc099cc34ef9de93a014 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 5 May 2017 13:46:27 +0200 Subject: [PATCH 004/110] Fixed path in travis helper script --- travis/postsubmit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 3f6da6ebb..0b3893ce9 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -25,7 +25,7 @@ linux) # export STLARG=$STLARG; # export ASAN_OPTIONS=$ASAN_OPTIONS; # export OS=$OS; -# cd fruit; extras/scripts/postsubmit-helper.sh $1" +# cd fruit; travis/postsubmit-helper.sh $1" # exit $? ;; @@ -35,7 +35,7 @@ osx) export STLARG export ASAN_OPTIONS export OS - extras/scripts/postsubmit-helper.sh "$@" + travis/postsubmit-helper.sh "$@" exit $? ;; From d54dd25a96c73f7c9b000d785f7485ccd30dd388 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 5 May 2017 15:47:46 +0200 Subject: [PATCH 005/110] Just compile libstorm --- travis/postsubmit-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 232001f53..a980d97ba 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -78,7 +78,7 @@ clang-default) esac run_make() { - make -j$N_JOBS + make storm -j$N_JOBS } # Build From 9aa7dd6b4dd13938d8729d4608570a93c5fbda8b Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 5 May 2017 17:48:14 +0200 Subject: [PATCH 006/110] Cache build directory --- .travis.yml | 4 ++++ travis/postsubmit-helper.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3785a8a0..32b9f9554 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,6 +67,10 @@ matrix: # script: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; extras/scripts/postsubmit.sh # DebugPlain +cache: + directories: + - build + services: - docker sudo: required diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index a980d97ba..247978a47 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -92,8 +92,8 @@ ReleasePlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=" *) echo "Error: you need to specify one of the supported postsubmit modes (see postsubmit.sh)."; exit 1 ;; esac -rm -rf build -mkdir build +#rm -rf build +mkdir -p build cd build cmake .. "${CMAKE_ARGS[@]}" echo From 9ebb2b916034ccaf3621c5e57b8a59ba00a84a90 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 8 May 2017 10:12:56 +0200 Subject: [PATCH 007/110] Try only building resources --- travis/postsubmit-helper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 247978a47..15e395bda 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -78,7 +78,8 @@ clang-default) esac run_make() { - make storm -j$N_JOBS +# make storm -j$N_JOBS + make resources -j$N_JOBS } # Build From 530802c179bc9edafedc0eec2bc0ce2f7dfc374b Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 8 May 2017 10:53:25 +0200 Subject: [PATCH 008/110] Try building storm with cached resources --- travis/postsubmit-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 15e395bda..89a756984 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -78,8 +78,8 @@ clang-default) esac run_make() { -# make storm -j$N_JOBS - make resources -j$N_JOBS + make storm -j$N_JOBS +# make resources -j$N_JOBS } # Build From 9f963a6aceae81af7e200c76c9b1f4bc60c9cf1a Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 8 May 2017 13:01:23 +0200 Subject: [PATCH 009/110] Added mtime_cache script --- .travis.yml | 1 + travis/mtime_cache/globs.txt | 1 + travis/mtime_cache/mtime_cache.rb | 178 ++++++++++++++++++++++++++++++ travis/postsubmit-helper.sh | 3 + 4 files changed, 183 insertions(+) create mode 100644 travis/mtime_cache/globs.txt create mode 100644 travis/mtime_cache/mtime_cache.rb diff --git a/.travis.yml b/.travis.yml index 32b9f9554..cbeec47ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,6 +70,7 @@ matrix: cache: directories: - build + - travis/mtime_cache services: - docker diff --git a/travis/mtime_cache/globs.txt b/travis/mtime_cache/globs.txt new file mode 100644 index 000000000..3b617ad21 --- /dev/null +++ b/travis/mtime_cache/globs.txt @@ -0,0 +1 @@ +src/**/*.{%{cpp}} diff --git a/travis/mtime_cache/mtime_cache.rb b/travis/mtime_cache/mtime_cache.rb new file mode 100644 index 000000000..299a1595e --- /dev/null +++ b/travis/mtime_cache/mtime_cache.rb @@ -0,0 +1,178 @@ +#!/usr/bin/env ruby + +# +# mtime_cache +# Copyright (c) 2016 Borislav Stanimirov +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +require 'digest/md5' +require 'json' +require 'fileutils' + +VERSION = "1.0.2" + +VERSION_TEXT = "mtime_cache v#{VERSION}" + +USAGE = <] [-g globfile] [-d] [-q|V] [-c cache] +ENDUSAGE + +HELP = < '.mtime_cache.json', :globs => [] } + +ARGV.each do |arg| + case arg + when '-g', '--globfile' then param_arg = :globfile + when '-h', '-?', '--help' then ARGS[:help] = true + when '-v', '--version' then ARGS[:ver] = true + when '-q', '--quiet' then ARGS[:quiet] = true + when '-V', '--verbose' then ARGS[:verbose] = true + when '-d', '--dryrun' then ARGS[:dry] = true + when '-c', '--cache' then param_arg = :cache + else + if param_arg + ARGS[param_arg] = arg + param_arg = nil + else + ARGS[:globs] << arg + end + end +end + +def log(text, level = 0) + return if ARGS[:quiet] + return if level > 0 && !ARGS[:verbose] + puts text +end + +if ARGS[:ver] || ARGS[:help] + log VERSION_TEXT + exit if ARGS[:ver] + log USAGE + log HELP + exit +end + +if ARGS[:globs].empty? && !ARGS[:globfile] + log 'Error: Missing globs' + log USAGE + exit 1 +end + +EXTENSION_PATTERNS = { + :cpp => "c,cc,cpp,cxx,h,hpp,hxx,inl,ipp,inc,ixx" +} + +cache_file = ARGS[:cache] + +cache = {} + +if File.file?(cache_file) + log "Found #{cache_file}" + cache = JSON.parse(File.read(cache_file)) + log "Read #{cache.length} entries" +else + log "#{cache_file} not found. A new one will be created" +end + +globs = ARGS[:globs].map { |g| g % EXTENSION_PATTERNS } + +globfile = ARGS[:globfile] +if globfile + File.open(globfile, 'r').each_line do |line| + line.strip! + next if line.empty? + globs << line % EXTENSION_PATTERNS + end +end + +if globs.empty? + log 'Error: No globs in globfile' + log USAGE + exit 1 +end + +files = {} +num_changed = 0 + +globs.each do |glob| + Dir[glob].each do |file| + next if !File.file?(file) + + mtime = File.mtime(file).to_i + hash = Digest::MD5.hexdigest(File.read(file)) + + cached = cache[file] + + if cached && cached['hash'] == hash && cached['mtime'] < mtime + mtime = cached['mtime'] + + log "mtime_cache: changing mtime of #{file} to #{mtime}", 1 + + File.utime(File.atime(file), Time.at(mtime), file) if !ARGS[:dry] + num_changed += 1 + else + log "mtime_cache: NOT changing mtime of #{file}", 1 + end + + files[file] = { 'mtime' => mtime, 'hash' => hash } + end +end + +log "Changed mtime of #{num_changed} of #{files.length} files" +log "Writing #{cache_file}" + +if !ARGS[:dry] + dirname = File.dirname(cache_file) + unless File.directory?(dirname) + FileUtils.mkdir_p(dirname) + end + File.open(cache_file, 'w').write(JSON.pretty_generate(files)) +end + diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 89a756984..b3bee12c2 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -93,6 +93,9 @@ ReleasePlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=" *) echo "Error: you need to specify one of the supported postsubmit modes (see postsubmit.sh)."; exit 1 ;; esac +# Restore timestamps of files +ruby travis/mtime_cache/mtime_cache.rb -g travis/mtime_cache/globs.txt -c travis/mtime_cache/cache.json + #rm -rf build mkdir -p build cd build From 2ff20b58ceaee6b826b4e522941af72e6c99e266 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 8 May 2017 17:31:38 +0200 Subject: [PATCH 010/110] More globs --- .gitignore | 2 ++ travis/mtime_cache/globs.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index a4327b775..27874b9d4 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ nbproject/ *.out # Python config stormpy/setup.cfg +# Travis helpers +travis/mtime_cache/cache.json diff --git a/travis/mtime_cache/globs.txt b/travis/mtime_cache/globs.txt index 3b617ad21..794ac4090 100644 --- a/travis/mtime_cache/globs.txt +++ b/travis/mtime_cache/globs.txt @@ -1 +1,3 @@ src/**/*.{%{cpp}} +src/**/CMakeLists.txt +resources/3rdparty/**/*.{%{cpp}} From e6af59c23fcfd3e3617c6dc781f33734b3bd5e47 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 9 May 2017 11:10:24 +0200 Subject: [PATCH 011/110] Make verbose --- travis/postsubmit-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index b3bee12c2..734cb09d4 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -78,7 +78,7 @@ clang-default) esac run_make() { - make storm -j$N_JOBS + VERBOSE=1 make storm -j$N_JOBS # make resources -j$N_JOBS } From d8cc0428f479665ea27643ba86c24264196dadc1 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 9 May 2017 17:37:48 +0200 Subject: [PATCH 012/110] Next test --- travis/postsubmit-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 734cb09d4..c521b23c9 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -78,8 +78,8 @@ clang-default) esac run_make() { - VERBOSE=1 make storm -j$N_JOBS -# make resources -j$N_JOBS +# VERBOSE=1 make storm -j$N_JOBS + make resources -j$N_JOBS } # Build From 7a3d9b32ed25f5a0a468dab1b8ee87e28a81bafb Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 9 May 2017 18:37:47 +0200 Subject: [PATCH 013/110] Folding in travis --- travis/install_osx.sh | 12 ++++++++++++ travis/postsubmit-helper.sh | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 27f192d24..2125d65cc 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -2,6 +2,12 @@ # Script installing dependencies # Inspired by https://github.com/google/fruit +travis_fold() { + local action=$1 + local name=$2 + echo -en "travis_fold:${action}:${name}\r" +} + set -e # Helper for installing packages via homebrew @@ -17,8 +23,11 @@ install_brew_package() { } # Update packages +travis_fold start brew_update brew update +travis_fold end brew_update +travis_fold start brew_install_util # For md5sum install_brew_package md5sha1sum # For `timeout' @@ -39,9 +48,11 @@ clang-3.9) install_brew_package llvm@3.9 --with-clang --with-libcxx;; clang-4.0) install_brew_package llvm --with-clang --with-libcxx;; *) echo "Compiler not supported: ${COMPILER}. See travis_ci_install_osx.sh"; exit 1 ;; esac +travis_fold end brew_install_util # Install dependencies +travis_fold start brew_install_dependencies install_brew_package gmp --c++11 install_brew_package cln install_brew_package ginac @@ -50,3 +61,4 @@ install_brew_package boost --c++11 brew tap homebrew/science install_brew_package homebrew/science/glpk install_brew_package homebrew/science/hwloc +travis_fold end brew_install_dependencies diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index c521b23c9..0514dfb31 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -77,9 +77,17 @@ clang-default) exit 1 esac +travis_fold() { + local action=$1 + local name=$2 + echo -en "travis_fold:${action}:${name}\r" +} + run_make() { + travis_fold start make # VERBOSE=1 make storm -j$N_JOBS make resources -j$N_JOBS + travis_fold end make } # Build @@ -94,8 +102,11 @@ ReleasePlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=" esac # Restore timestamps of files +travis_fold start mtime ruby travis/mtime_cache/mtime_cache.rb -g travis/mtime_cache/globs.txt -c travis/mtime_cache/cache.json +travis_fold end mtime +travis_fold start cmake #rm -rf build mkdir -p build cd build @@ -107,4 +118,5 @@ then cat CMakeFiles/CMakeError.log fi echo +travis_fold end cmake run_make From dc3634910a1b24f60a4f43fa5a7251388d5c6707 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 9 May 2017 19:41:28 +0200 Subject: [PATCH 014/110] Make aggain --- travis/postsubmit-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 0514dfb31..10064108d 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -85,8 +85,8 @@ travis_fold() { run_make() { travis_fold start make -# VERBOSE=1 make storm -j$N_JOBS - make resources -j$N_JOBS + make storm -j$N_JOBS + #make resources -j$N_JOBS travis_fold end make } From c2261d2185fb7af712765daf1ec73df4c0da4545 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 9 May 2017 21:43:25 +0200 Subject: [PATCH 015/110] Make all --- travis/postsubmit-helper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 10064108d..d783a96ad 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -85,8 +85,9 @@ travis_fold() { run_make() { travis_fold start make - make storm -j$N_JOBS + #make storm -j$N_JOBS #make resources -j$N_JOBS + make -j$N_JOBS travis_fold end make } From c2373a7cd4fb84e5ed40785105fd6061a5070934 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 10:03:09 +0200 Subject: [PATCH 016/110] Test timeout --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cbeec47ad..755c85527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ matrix: os: osx osx_image: xcode8 script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/postsubmit.sh DebugPlain + gtimeout 400 travis/postsubmit.sh DebugPlain # - compiler: clang # env: COMPILER=clang-default STL=libc++ TEST=DebugPlain # install: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; From b7e64cb1914848892d04d0cb584c79b3f83e0ba8 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 10:38:09 +0200 Subject: [PATCH 017/110] Increased timeout --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 755c85527..dbe768ca8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ matrix: os: osx osx_image: xcode8 script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - gtimeout 400 travis/postsubmit.sh DebugPlain + gtimeout 2400 travis/postsubmit.sh DebugPlain # - compiler: clang # env: COMPILER=clang-default STL=libc++ TEST=DebugPlain # install: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; From 453e31ef67d7b638f99e540209dfaf6b88266cb7 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 11:27:47 +0200 Subject: [PATCH 018/110] First try on docker for Ubuntu 16.10 --- travis/dockerfiles/Dockerfile.ubuntu-16.10 | 6 ++++++ travis/dockerfiles/common_install.sh | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 travis/dockerfiles/Dockerfile.ubuntu-16.10 create mode 100644 travis/dockerfiles/common_install.sh diff --git a/travis/dockerfiles/Dockerfile.ubuntu-16.10 b/travis/dockerfiles/Dockerfile.ubuntu-16.10 new file mode 100644 index 000000000..94e5bb5dd --- /dev/null +++ b/travis/dockerfiles/Dockerfile.ubuntu-16.10 @@ -0,0 +1,6 @@ +FROM ubuntu:16.10 +MAINTAINER Matthias Volk + +COPY common_install.sh / + +RUN bash -x /common_install.sh diff --git a/travis/dockerfiles/common_install.sh b/travis/dockerfiles/common_install.sh new file mode 100644 index 000000000..bd9358bdb --- /dev/null +++ b/travis/dockerfiles/common_install.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Install dependencies + +set -e + +apt-get update -qq +apt-get install -y --no-install-recommends \ + git \ + cmake \ + libboost-all-dev \ + libcln-dev \ + libgmp-dev \ + libginac-dev \ + automake \ + libglpk-dev \ + libhwloc-dev From 25be35aa50d030a55b1365da975693ae3d789f22 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 12:57:25 +0200 Subject: [PATCH 019/110] First test of Travis, docker and Ubuntu 16.10 --- .travis.yml | 13 +++++++------ travis/install_linux.sh | 5 +++++ travis/postsubmit-helper.sh | 5 +++++ 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 travis/install_linux.sh diff --git a/.travis.yml b/.travis.yml index dbe768ca8..9e2af70c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,12 +11,13 @@ matrix: fast_finish: true include: -# - compiler: gcc -# env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugValgrind -# install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/postsubmit.sh -# DebugValgrind + - compiler: gcc + env: COMPILER=gcc-6 UBUNTU=16.10 TEST=DebugPlain + install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='16.10'; + travis/install_linux.sh + os: linux + script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='16.10'; + timeout 2400 travis/postsubmit.sh DebugPlain # - compiler: gcc # env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain # install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh diff --git a/travis/install_linux.sh b/travis/install_linux.sh new file mode 100644 index 000000000..f22305b09 --- /dev/null +++ b/travis/install_linux.sh @@ -0,0 +1,5 @@ +#!/bin/bash -x + +set -e + +sudo apt-get install -qq -y docker diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index d783a96ad..a6a138001 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -28,6 +28,11 @@ gcc-6) export CXX=g++-6 ;; +gcc-default) + export CC=gcc + export CXX=g++ + ;; + clang-3.5) export CC=clang-3.5 export CXX=clang++-3.5 From 1e720a97df5db9507cc0f0b5dcb1068a4b1a962d Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 13:33:08 +0200 Subject: [PATCH 020/110] Next try with docker and Ubuntu --- .travis.yml | 6 +++--- travis/install_linux.sh | 0 travis/postsubmit.sh | 34 +++++++++++++++++----------------- 3 files changed, 20 insertions(+), 20 deletions(-) mode change 100644 => 100755 travis/install_linux.sh diff --git a/.travis.yml b/.travis.yml index 9e2af70c6..7cec6968b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,11 @@ matrix: include: - compiler: gcc - env: COMPILER=gcc-6 UBUNTU=16.10 TEST=DebugPlain - install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='16.10'; + env: COMPILER=gcc-6 LINUX=ubuntu-16.10 TEST=DebugPlain + install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/install_linux.sh os: linux - script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='16.10'; + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; timeout 2400 travis/postsubmit.sh DebugPlain # - compiler: gcc # env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain diff --git a/travis/install_linux.sh b/travis/install_linux.sh old mode 100644 new mode 100755 diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 0b3893ce9..f875ce86f 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -12,34 +12,34 @@ fi case $OS in linux) - echo "Linux currently unsupported" - exit 2 -# docker rm -f fruit &>/dev/null || true -# docker run -d -it --name fruit --privileged polettimarco/fruit-basesystem:ubuntu-$UBUNTU -# docker exec fruit mkdir fruit -# docker cp . fruit:/fruit -# -# docker exec fruit bash -c " -# export COMPILER=$COMPILER; -# export N_JOBS=$N_JOBS; -# export STLARG=$STLARG; -# export ASAN_OPTIONS=$ASAN_OPTIONS; -# export OS=$OS; -# cd fruit; travis/postsubmit-helper.sh $1" -# exit $? + # Execute docker image on linux + docker rm -f storm &>/dev/null || true + docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX + docker exec storm mkdir storm + docker cp . storm:/storm + + docker exec storm bash -c " + export COMPILER=$COMPILER; + export N_JOBS=$N_JOBS; + export STLARG=$STLARG; + export OS=$OS; + cd storm; + travis/postsubmit-helper.sh $1" + exit $? ;; osx) + # Mac OSX export COMPILER export N_JOBS export STLARG - export ASAN_OPTIONS export OS - travis/postsubmit-helper.sh "$@" + travis/postsubmit-helper.sh "$1" exit $? ;; *) + # Other OS echo "Unsupported OS: $OS" exit 1 esac From 6b2db852be52f3e97cfe2f84c77b249a6688a935 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 14:11:23 +0200 Subject: [PATCH 021/110] Ruby is needed in docker --- travis/dockerfiles/common_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/dockerfiles/common_install.sh b/travis/dockerfiles/common_install.sh index bd9358bdb..588e56a56 100644 --- a/travis/dockerfiles/common_install.sh +++ b/travis/dockerfiles/common_install.sh @@ -5,6 +5,7 @@ set -e apt-get update -qq apt-get install -y --no-install-recommends \ + ruby \ git \ cmake \ libboost-all-dev \ From dcedea5a086e29264112e668cac8e4b126c1a996 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 15:59:01 +0200 Subject: [PATCH 022/110] Caching from docker as well --- .travis.yml | 6 ++++-- travis/dockerfiles/common_install.sh | 1 + travis/postsubmit.sh | 9 +++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7cec6968b..13ab99a3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,9 @@ matrix: travis/install_linux.sh os: linux script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - timeout 2400 travis/postsubmit.sh DebugPlain + travis/postsubmit.sh DebugPlain + before_cache: + docker cp storm:/storm . # - compiler: gcc # env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain # install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh @@ -58,7 +60,7 @@ matrix: os: osx osx_image: xcode8 script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - gtimeout 2400 travis/postsubmit.sh DebugPlain + travis/postsubmit.sh DebugPlain # - compiler: clang # env: COMPILER=clang-default STL=libc++ TEST=DebugPlain # install: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; diff --git a/travis/dockerfiles/common_install.sh b/travis/dockerfiles/common_install.sh index 588e56a56..9a40c7168 100644 --- a/travis/dockerfiles/common_install.sh +++ b/travis/dockerfiles/common_install.sh @@ -5,6 +5,7 @@ set -e apt-get update -qq apt-get install -y --no-install-recommends \ + build-essential \ ruby \ git \ cmake \ diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index f875ce86f..dc3ab9ce8 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -4,6 +4,7 @@ set -e : ${N_JOBS:=2} +: ${TIMEOUT:=400} if [ "$STL" != "" ] then @@ -13,12 +14,16 @@ fi case $OS in linux) # Execute docker image on linux + # Stop previous session docker rm -f storm &>/dev/null || true + # Run container docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX + # Copy local content into container docker exec storm mkdir storm docker cp . storm:/storm - docker exec storm bash -c " + # Execute main process + timeout $TIMEOUT docker exec storm bash -c " export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; export STLARG=$STLARG; @@ -34,7 +39,7 @@ osx) export N_JOBS export STLARG export OS - travis/postsubmit-helper.sh "$1" + gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" exit $? ;; From 9d441d21af62ddd44f36ebbd6a4050e42a07e9b6 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 16:41:16 +0200 Subject: [PATCH 023/110] More debug output --- travis/install_linux.sh | 2 +- travis/install_osx.sh | 5 +++-- travis/postsubmit-helper.sh | 30 ++++++++++++++---------------- travis/postsubmit.sh | 4 ++-- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/travis/install_linux.sh b/travis/install_linux.sh index f22305b09..df87868c0 100755 --- a/travis/install_linux.sh +++ b/travis/install_linux.sh @@ -1,5 +1,5 @@ #!/bin/bash -x -set -e +set -ev sudo apt-get install -qq -y docker diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 2125d65cc..4cec67af7 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -2,14 +2,15 @@ # Script installing dependencies # Inspired by https://github.com/google/fruit +set -ev + +# Helper for travis folding travis_fold() { local action=$1 local name=$2 echo -en "travis_fold:${action}:${name}\r" } -set -e - # Helper for installing packages via homebrew install_brew_package() { if brew list -1 | grep -q "^$1\$"; then diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index a6a138001..70c56f0e9 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -1,7 +1,14 @@ #!/bin/bash -x # Inspired by https://github.com/google/fruit -set -e +set -ev + +# Helper for travis folding +travis_fold() { + local action=$1 + local name=$2 + echo -en "travis_fold:${action}:${name}\r" +} # This only exists in OS X, but it doesn't cause issues in Linux (the dir doesn't exist, so it's # ignored). @@ -82,20 +89,6 @@ clang-default) exit 1 esac -travis_fold() { - local action=$1 - local name=$2 - echo -en "travis_fold:${action}:${name}\r" -} - -run_make() { - travis_fold start make - #make storm -j$N_JOBS - #make resources -j$N_JOBS - make -j$N_JOBS - travis_fold end make -} - # Build echo CXX version: $($CXX --version) echo C++ Standard library location: $(echo '#include ' | $CXX -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1) @@ -125,4 +118,9 @@ then fi echo travis_fold end cmake -run_make + +travis_fold start make +#make storm -j$N_JOBS +#make resources -j$N_JOBS +make -j$N_JOBS +travis_fold end make diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index dc3ab9ce8..5f665f8a3 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/bin/bash -x # Inspired by https://github.com/google/fruit -set -e +set -ev : ${N_JOBS:=2} : ${TIMEOUT:=400} From d810595f112e13b5b52ee49eda573e242bd611a6 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 17:05:01 +0200 Subject: [PATCH 024/110] Fixed copy in before_cache --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 13ab99a3b..c40bc9a13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DebugPlain before_cache: - docker cp storm:/storm . + docker cp storm:/storm/. . # - compiler: gcc # env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain # install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh From 94590ff5b90c70a9fab4c6f85a8bd792383b97d2 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 17:29:40 +0200 Subject: [PATCH 025/110] Several changes --- travis/dockerfiles/build_docker.sh | 3 +++ travis/install_linux.sh | 2 +- travis/install_osx.sh | 2 +- travis/postsubmit-helper.sh | 2 +- travis/postsubmit.sh | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100755 travis/dockerfiles/build_docker.sh diff --git a/travis/dockerfiles/build_docker.sh b/travis/dockerfiles/build_docker.sh new file mode 100755 index 000000000..a02680a0c --- /dev/null +++ b/travis/dockerfiles/build_docker.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker build -t mvolk/storm-basesystem:ubuntu-16.10 -f Dockerfile.ubuntu-16.10 . +docker push mvolk/storm-basesystem:ubuntu-16.10 diff --git a/travis/install_linux.sh b/travis/install_linux.sh index df87868c0..f22305b09 100755 --- a/travis/install_linux.sh +++ b/travis/install_linux.sh @@ -1,5 +1,5 @@ #!/bin/bash -x -set -ev +set -e sudo apt-get install -qq -y docker diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 4cec67af7..28b944d7b 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -2,7 +2,7 @@ # Script installing dependencies # Inspired by https://github.com/google/fruit -set -ev +set -e # Helper for travis folding travis_fold() { diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 70c56f0e9..82ca31579 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -1,7 +1,7 @@ #!/bin/bash -x # Inspired by https://github.com/google/fruit -set -ev +set -e # Helper for travis folding travis_fold() { diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 5f665f8a3..671da4bac 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -1,10 +1,10 @@ #!/bin/bash -x # Inspired by https://github.com/google/fruit -set -ev +set -e : ${N_JOBS:=2} -: ${TIMEOUT:=400} +: ${TIMEOUT:=2400} if [ "$STL" != "" ] then From 35573993366297d86198c1639be0f23aceb2be39 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 10 May 2017 18:17:00 +0200 Subject: [PATCH 026/110] Support for Debian 9 --- .travis.yml | 9 +++++++++ travis/dockerfiles/Dockerfile.debian-9 | 14 ++++++++++++++ travis/dockerfiles/Dockerfile.ubuntu-16.10 | 15 ++++++++++++--- travis/dockerfiles/build_docker.sh | 6 ++++++ travis/dockerfiles/common_install.sh | 18 ------------------ 5 files changed, 41 insertions(+), 21 deletions(-) create mode 100644 travis/dockerfiles/Dockerfile.debian-9 delete mode 100644 travis/dockerfiles/common_install.sh diff --git a/.travis.yml b/.travis.yml index c40bc9a13..31a22cf9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,15 @@ matrix: travis/postsubmit.sh DebugPlain before_cache: docker cp storm:/storm/. . + - compiler: gcc + env: COMPILER=gcc-6 LINUX=debian-9 TEST=DebugPlain + install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/install_linux.sh + os: linux + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/postsubmit.sh DebugPlain + before_cache: + docker cp storm:/storm/. . # - compiler: gcc # env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain # install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh diff --git a/travis/dockerfiles/Dockerfile.debian-9 b/travis/dockerfiles/Dockerfile.debian-9 new file mode 100644 index 000000000..2a2c7989c --- /dev/null +++ b/travis/dockerfiles/Dockerfile.debian-9 @@ -0,0 +1,14 @@ +FROM debian:9 +MAINTAINER Matthias Volk + +RUN apt-get update -qq && apt-get install -y --no-install-recommends \ + build-essential \ + ruby \ + git \ + cmake \ + libboost-all-dev \ + libcln-dev \ + libgmp-dev \ + libginac-dev \ + automake \ + libglpk-dev diff --git a/travis/dockerfiles/Dockerfile.ubuntu-16.10 b/travis/dockerfiles/Dockerfile.ubuntu-16.10 index 94e5bb5dd..541f8b64c 100644 --- a/travis/dockerfiles/Dockerfile.ubuntu-16.10 +++ b/travis/dockerfiles/Dockerfile.ubuntu-16.10 @@ -1,6 +1,15 @@ FROM ubuntu:16.10 MAINTAINER Matthias Volk -COPY common_install.sh / - -RUN bash -x /common_install.sh +RUN apt-get update -qq && apt-get install -y --no-install-recommends \ + build-essential \ + ruby \ + git \ + cmake \ + libboost-all-dev \ + libcln-dev \ + libgmp-dev \ + libginac-dev \ + automake \ + libglpk-dev \ + libhwloc-dev diff --git a/travis/dockerfiles/build_docker.sh b/travis/dockerfiles/build_docker.sh index a02680a0c..280710566 100755 --- a/travis/dockerfiles/build_docker.sh +++ b/travis/dockerfiles/build_docker.sh @@ -1,3 +1,9 @@ #!/bin/bash + +# Build Ubuntu 16.10 "Yakkety Yak" docker build -t mvolk/storm-basesystem:ubuntu-16.10 -f Dockerfile.ubuntu-16.10 . docker push mvolk/storm-basesystem:ubuntu-16.10 + +# Build Debian 9 "Stretch" +docker build -t mvolk/storm-basesystem:debian-9 -f Dockerfile.debian-9 . +docker push mvolk/storm-basesystem:debian-9 diff --git a/travis/dockerfiles/common_install.sh b/travis/dockerfiles/common_install.sh deleted file mode 100644 index 9a40c7168..000000000 --- a/travis/dockerfiles/common_install.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# Install dependencies - -set -e - -apt-get update -qq -apt-get install -y --no-install-recommends \ - build-essential \ - ruby \ - git \ - cmake \ - libboost-all-dev \ - libcln-dev \ - libgmp-dev \ - libginac-dev \ - automake \ - libglpk-dev \ - libhwloc-dev From ce4112304907abaff08c10f0ec7eb2b590c7b203 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 11 May 2017 09:47:56 +0200 Subject: [PATCH 027/110] Cache timeout and tests --- .travis.yml | 1 + travis/postsubmit-helper.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 31a22cf9c..261192fe5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,6 +80,7 @@ matrix: # DebugPlain cache: + timeout: 600 directories: - build - travis/mtime_cache diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 82ca31579..b55330670 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -105,8 +105,8 @@ travis_fold start mtime ruby travis/mtime_cache/mtime_cache.rb -g travis/mtime_cache/globs.txt -c travis/mtime_cache/cache.json travis_fold end mtime +# CMake travis_fold start cmake -#rm -rf build mkdir -p build cd build cmake .. "${CMAKE_ARGS[@]}" @@ -119,8 +119,14 @@ fi echo travis_fold end cmake +# Make travis_fold start make #make storm -j$N_JOBS #make resources -j$N_JOBS make -j$N_JOBS travis_fold end make + +# Make +travis_fold start tests +make test -j$N_JOBS +travis_fold end tests From c1d2fbf73c8ee01dc6257dc7640071cac0cf0f7d Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 11 May 2017 10:58:58 +0200 Subject: [PATCH 028/110] Output on test failure --- travis/postsubmit-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index b55330670..186e7c87d 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -128,5 +128,5 @@ travis_fold end make # Make travis_fold start tests -make test -j$N_JOBS +ctest test --output-on-failure travis_fold end tests From c4d6c1b78758ca4f2d8f926b32cc7cad9ddb2081 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 11 May 2017 12:03:06 +0200 Subject: [PATCH 029/110] Added tests in Release mode --- .travis.yml | 93 ++++++++++++++++++------------------- travis/postsubmit-helper.sh | 4 +- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index 261192fe5..20fffd5a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,80 +11,79 @@ matrix: fast_finish: true include: + + ### + # Ubuntu 16.10 + ### + - compiler: gcc + env: TEST=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 + os: linux + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultDebug + before_cache: + docker cp storm:/storm/. . - compiler: gcc - env: COMPILER=gcc-6 LINUX=ubuntu-16.10 TEST=DebugPlain + env: TEST=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 os: linux script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DebugPlain + travis/postsubmit.sh DefaultRelease before_cache: docker cp storm:/storm/. . + + ### + # Debian 9 + ### - compiler: gcc - env: COMPILER=gcc-6 LINUX=debian-9 TEST=DebugPlain + env: TEST=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/install_linux.sh os: linux script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/postsubmit.sh DebugPlain + travis/postsubmit.sh DefaultDebug before_cache: docker cp storm:/storm/. . -# - compiler: gcc -# env: COMPILER=gcc-6 UBUNTU=17.04 TEST=DebugPlain -# install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/postsubmit.sh -# DebugPlain -# - compiler: gcc -# env: COMPILER=gcc-6 UBUNTU=17.04 TEST=ReleasePlain -# install: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='gcc-6'; export UBUNTU='17.04'; extras/scripts/postsubmit.sh -# ReleasePlain -# - compiler: clang -# env: COMPILER=clang-4.0 STL=libstdc++ UBUNTU=17.04 TEST=DebugPlain -# install: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; -# export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; -# export UBUNTU='17.04'; extras/scripts/postsubmit.sh DebugPlain -# - compiler: clang -# env: COMPILER=clang-4.0 STL=libstdc++ UBUNTU=17.04 TEST=ReleasePlain -# install: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; -# export UBUNTU='17.04'; extras/scripts/travis_ci_install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='clang-4.0'; export STL='libstdc++'; -# export UBUNTU='17.04'; extras/scripts/postsubmit.sh ReleasePlain -# - compiler: gcc -# env: COMPILER=gcc-6 TEST=DebugPlain -# install: export OS=osx; export COMPILER='gcc-6'; export INSTALL_VALGRIND=1; extras/scripts/travis_ci_install_osx.sh -# os: osx -# osx_image: xcode8 -# script: export OS=osx; export COMPILER='gcc-6'; export INSTALL_VALGRIND=1; extras/scripts/postsubmit.sh -# DebugPlain + - compiler: gcc + env: TEST=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 + install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/install_linux.sh + os: linux + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/postsubmit.sh DefaultRelease + before_cache: + docker cp storm:/storm/. . + + ### + # Mac OS X + ### + - compiler: clang + env: TEST=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; + travis/install_osx.sh + os: osx + osx_image: xcode8 + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; + travis/postsubmit.sh DefaultDebug - compiler: clang - env: COMPILER=clang-4.0 STL=libc++ TEST=DebugPlain + env: TEST=DefaultRelease COMPILER=clang-4.0 STL=libc++ install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/install_osx.sh os: osx osx_image: xcode8 script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/postsubmit.sh DebugPlain -# - compiler: clang -# env: COMPILER=clang-default STL=libc++ TEST=DebugPlain -# install: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; -# extras/scripts/travis_ci_install_osx.sh -# os: osx -# osx_image: xcode8.2 -# script: export OS=osx; export COMPILER='clang-default'; export STL='libc++'; extras/scripts/postsubmit.sh -# DebugPlain + travis/postsubmit.sh DefaultRelease +# Enable caching cache: timeout: 600 directories: - build - travis/mtime_cache +# Enable docker support services: - docker sudo: required diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 186e7c87d..1489fa636 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -95,8 +95,8 @@ echo C++ Standard library location: $(echo '#include ' | $CXX -x c++ -E echo Normalized C++ Standard library location: $(readlink -f $(echo '#include ' | $CXX -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1)) case "$1" in -DebugPlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="$STLARG") ;; -ReleasePlain) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="$STLARG") ;; +DefaultDebug) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="$STLARG") ;; +DefaultRelease) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="$STLARG") ;; *) echo "Error: you need to specify one of the supported postsubmit modes (see postsubmit.sh)."; exit 1 ;; esac From 19b9ca14d068e1f8b78015d6fe0c5f77357600df Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 12 May 2017 14:23:11 +0200 Subject: [PATCH 030/110] Decreased timeout --- travis/postsubmit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 671da4bac..547a251ed 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -4,7 +4,7 @@ set -e : ${N_JOBS:=2} -: ${TIMEOUT:=2400} +: ${TIMEOUT:=2200} if [ "$STL" != "" ] then From 8aff592e10ebf1a3d9a2459bf941f3d4824cd620 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 12:30:20 +0200 Subject: [PATCH 031/110] Try beta feature of build stages --- .travis.yml | 104 +++++++++++++++++++++++------------- travis/postsubmit-helper.sh | 77 +++++++++++++++++--------- travis/postsubmit.sh | 4 +- 3 files changed, 122 insertions(+), 63 deletions(-) diff --git a/.travis.yml b/.travis.yml index 20fffd5a5..cf6559d0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,66 +15,98 @@ matrix: ### # Ubuntu 16.10 ### - - compiler: gcc - env: TEST=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 + - stage: build_dep + 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 os: linux script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug + travis/postsubmit.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . - - compiler: gcc - env: TEST=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 + - stage: build_lib + 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 os: linux script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DefaultRelease + travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - - ### - # Debian 9 - ### - - compiler: gcc - env: TEST=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 - install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + - stage: build_all + 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 os: linux - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/postsubmit.sh DefaultDebug + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . - - compiler: gcc - env: TEST=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 - install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + - stage: test_all + 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 os: linux - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/postsubmit.sh DefaultRelease + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . +# - compiler: gcc +# env: TEST=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 +# os: linux +# script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; +# travis/postsubmit.sh DefaultRelease +# before_cache: +# docker cp storm:/storm/. . + + ### + # Debian 9 + ### +# - compiler: gcc +# env: TEST=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 +# install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; +# travis/install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; +# travis/postsubmit.sh DefaultDebug +# before_cache: +# docker cp storm:/storm/. . +# - compiler: gcc +# env: TEST=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 +# install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; +# travis/install_linux.sh +# os: linux +# script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; +# travis/postsubmit.sh DefaultRelease +# before_cache: +# docker cp storm:/storm/. . + ### # Mac OS X ### - - compiler: clang - env: TEST=DefaultDebug COMPILER=clang-4.0 STL=libc++ - install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/install_osx.sh - os: osx - osx_image: xcode8 - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/postsubmit.sh DefaultDebug - - compiler: clang - env: TEST=DefaultRelease COMPILER=clang-4.0 STL=libc++ - install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/install_osx.sh - os: osx - osx_image: xcode8 - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/postsubmit.sh DefaultRelease +# - compiler: clang +# env: TEST=DefaultDebug COMPILER=clang-4.0 STL=libc++ +# install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; +# travis/install_osx.sh +# os: osx +# osx_image: xcode8 +# script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; +# travis/postsubmit.sh DefaultDebug +# - compiler: clang +# env: TEST=DefaultRelease COMPILER=clang-4.0 STL=libc++ +# install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; +# travis/install_osx.sh +# os: osx +# osx_image: xcode8 +# script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; +# travis/postsubmit.sh DefaultRelease # Enable caching cache: diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 1489fa636..18626ab15 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -10,6 +10,57 @@ travis_fold() { echo -en "travis_fold:${action}:${name}\r" } +# Helper for distinguishing between different runs +run() { + case "$1" in + BuildDep) + # CMake + travis_fold start cmake + mkdir -p build + cd build + cmake .. "${CMAKE_ARGS[@]}" + echo + echo "Content of CMakeFiles/CMakeError.log:" + if [ -f "CMakeFiles/CMakeError.log" ] + then + cat CMakeFiles/CMakeError.log + fi + echo + travis_fold end cmake + # Make resources + travis_fold start make_dep + make resources -j$N_JOBS + travis_fold end make_dep + ;; + + BuildLib) + # Make libstorm + travis_fold start make_lib + make storm -j$N_JOBS + travis_fold end make_lib + ;; + + BuildAll) + # Make all + travis_fold start make_all + make -j$N_JOBS + travis_fold end make_all + ;; + + TestAll) + # Test all + travis_fold start test_all + ctest test --output-on-failure + travis_fold end test_all + ;; + + *) + echo "Unrecognized value of run: $1" + exit 1 + esac +} + + # This only exists in OS X, but it doesn't cause issues in Linux (the dir doesn't exist, so it's # ignored). export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" @@ -105,28 +156,4 @@ travis_fold start mtime ruby travis/mtime_cache/mtime_cache.rb -g travis/mtime_cache/globs.txt -c travis/mtime_cache/cache.json travis_fold end mtime -# CMake -travis_fold start cmake -mkdir -p build -cd build -cmake .. "${CMAKE_ARGS[@]}" -echo -echo "Content of CMakeFiles/CMakeError.log:" -if [ -f "CMakeFiles/CMakeError.log" ] -then - cat CMakeFiles/CMakeError.log -fi -echo -travis_fold end cmake - -# Make -travis_fold start make -#make storm -j$N_JOBS -#make resources -j$N_JOBS -make -j$N_JOBS -travis_fold end make - -# Make -travis_fold start tests -ctest test --output-on-failure -travis_fold end tests +run "$2" diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 547a251ed..7f5b7326b 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -29,7 +29,7 @@ linux) export STLARG=$STLARG; export OS=$OS; cd storm; - travis/postsubmit-helper.sh $1" + travis/postsubmit-helper.sh $1 $2" exit $? ;; @@ -39,7 +39,7 @@ osx) export N_JOBS export STLARG export OS - gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" + gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" exit $? ;; From 811ca84944892ef0f83316eb418234fc04717155 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 12:52:39 +0200 Subject: [PATCH 032/110] Cd build --- travis/postsubmit-helper.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 18626ab15..f26f6a617 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -16,7 +16,8 @@ run() { BuildDep) # CMake travis_fold start cmake - mkdir -p build + rm -rf build + mkdir build cd build cmake .. "${CMAKE_ARGS[@]}" echo @@ -36,6 +37,7 @@ run() { BuildLib) # Make libstorm travis_fold start make_lib + cd build make storm -j$N_JOBS travis_fold end make_lib ;; @@ -43,6 +45,7 @@ run() { BuildAll) # Make all travis_fold start make_all + cd build make -j$N_JOBS travis_fold end make_all ;; @@ -50,6 +53,7 @@ run() { TestAll) # Test all travis_fold start test_all + cd build ctest test --output-on-failure travis_fold end test_all ;; From 7dc71ff12b03ed8ec247243aaa4ebc0435371b10 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 16:29:24 +0200 Subject: [PATCH 033/110] Generate travis file --- .travis.yml | 252 ++++++++++++++++++++++++++++---------- travis/generate_travis.py | 76 ++++++++++++ 2 files changed, 262 insertions(+), 66 deletions(-) create mode 100644 travis/generate_travis.py diff --git a/.travis.yml b/.travis.yml index cf6559d0b..0f8ebd6b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,98 +15,218 @@ matrix: ### # Ubuntu 16.10 ### - - stage: build_dep + - stage: Build dependencies + 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'; + install: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10' travis/install_linux.sh - os: linux - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug BuildDep - before_cache: + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10' + travis/postsubmit.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . - - stage: build_lib + - stage: Build library + 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'; + 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 all os: linux - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug BuildLib - before_cache: + 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 BuildAll before_cache: docker cp storm:/storm/. . - - stage: build_all + - stage: Test all + 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'; + 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: + docker cp storm:/storm/. . + - stage: Build dependencies os: linux - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug BuildAll - before_cache: + 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 BuildDep before_cache: docker cp storm:/storm/. . - - stage: test_all + - stage: Build library + 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'; + 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 all + 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 BuildAll before_cache: + docker cp storm:/storm/. . + - stage: Test all os: linux - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug TestAll - before_cache: + 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 TestAll before_cache: docker cp storm:/storm/. . -# - compiler: gcc -# env: TEST=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 -# os: linux -# script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; -# travis/postsubmit.sh DefaultRelease -# before_cache: -# docker cp storm:/storm/. . - ### # Debian 9 ### -# - compiler: gcc -# env: TEST=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 -# install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; -# travis/install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; -# travis/postsubmit.sh DefaultDebug -# before_cache: -# docker cp storm:/storm/. . -# - compiler: gcc -# env: TEST=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 -# install: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; -# travis/install_linux.sh -# os: linux -# script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; -# travis/postsubmit.sh DefaultRelease -# before_cache: -# docker cp storm:/storm/. . + + - stage: Build dependencies + 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 BuildDep before_cache: + docker cp storm:/storm/. . + - stage: Build library + 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 all + 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 BuildAll before_cache: + docker cp storm:/storm/. . + - stage: Test all + 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 TestAll before_cache: + docker cp storm:/storm/. . + - stage: Build dependencies + 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 BuildDep before_cache: + docker cp storm:/storm/. . + - stage: Build library + 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 all + 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 BuildAll before_cache: + docker cp storm:/storm/. . + - stage: Test all + 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 TestAll before_cache: + docker cp storm:/storm/. . ### # Mac OS X ### -# - compiler: clang -# env: TEST=DefaultDebug COMPILER=clang-4.0 STL=libc++ -# install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; -# travis/install_osx.sh -# os: osx -# osx_image: xcode8 -# script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; -# travis/postsubmit.sh DefaultDebug -# - compiler: clang -# env: TEST=DefaultRelease COMPILER=clang-4.0 STL=libc++ -# install: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; -# travis/install_osx.sh -# os: osx -# osx_image: xcode8 -# script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; -# travis/postsubmit.sh DefaultRelease + + - stage: Build dependencies + 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 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 + 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 + 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 + 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 + 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 + 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 + 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 TestAll + # Enable caching cache: diff --git a/travis/generate_travis.py b/travis/generate_travis.py new file mode 100644 index 000000000..3940d5916 --- /dev/null +++ b/travis/generate_travis.py @@ -0,0 +1,76 @@ + +# Configuration for Linux +configs_linux = [ + # OS, compiler + ("ubuntu-16.10", "gcc", "-6"), + ("debian-9", "gcc", "-6"), +] + +# Configurations for Mac +configs_mac = [ + # OS, compiler + ("osx", "clang", "-4.0"), +] + +# Build types +build_types = [ + "DefaultDebug", + "DefaultRelease", +] + +# Stages in travis +stages = [ + ("Build dependencies", "BuildDep"), + ("Build library", "BuildLib"), + ("Build all", "BuildAll"), + ("Test all", "TestAll"), +] + + +if __name__ == "__main__": + s = "" + + # Generate all configurations + # Linux via Docker + for config in configs_linux: + linux = config[0] + compiler = "{}{}".format(config[1], config[2]) + s += "\n" + s += " ###\n" + s += " # {}\n".format(linux) + s += " ###\n" + s += "\n" + for build in build_types: + for stage in stages: + 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 {} {}".format(build, stage[1]) + s += " before_cache:\n" + s += " docker cp storm:/storm/. .\n" + + # Mac OS X + for config in configs_mac: + osx = config[0] + compiler = "{}{}".format(config[1], config[2]) + s += "\n" + s += " ###\n" + s += " # {}\n".format(osx) + s += " ###\n" + s += "\n" + for build in build_types: + for stage in stages: + 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 {} {}".format(build, stage[1]) + + print(s) From 120bf729d4e112e690d80ea685746b8f355853da Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 16:36:41 +0200 Subject: [PATCH 034/110] 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) From 822d098caae4f05b2983adcfb02866cdbd5f5dee Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 16:40:45 +0200 Subject: [PATCH 035/110] Next fix --- .travis.yml | 96 +++++++++++++++++++-------------------- travis/generate_travis.py | 8 ++-- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ebd611c6..4c121fe41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . @@ -47,9 +47,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . @@ -57,9 +57,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . @@ -67,9 +67,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . @@ -77,9 +77,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . @@ -87,9 +87,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultRelease BuildLib before_cache: docker cp storm:/storm/. . @@ -97,9 +97,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . @@ -107,9 +107,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; travis/postsubmit.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . @@ -122,9 +122,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . @@ -132,9 +132,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . @@ -142,9 +142,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . @@ -152,9 +152,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . @@ -162,9 +162,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . @@ -172,9 +172,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultRelease BuildLib before_cache: docker cp storm:/storm/. . @@ -182,9 +182,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . @@ -192,9 +192,9 @@ matrix: 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' + 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' + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; travis/postsubmit.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . @@ -207,64 +207,64 @@ matrix: 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/postsubmit.sh DefaultRelease BuildAll - stage: Test 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++' + 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++' + script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; travis/postsubmit.sh DefaultRelease TestAll diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 6c9ee4d13..4342b64d7 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -77,9 +77,9 @@ if __name__ == "__main__": 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 += " 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 += " 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" @@ -99,9 +99,9 @@ if __name__ == "__main__": 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 += " 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 += " script: export OS=osx; export COMPILER='{}'; export STL='libc++';\n".format(compiler) s += " travis/postsubmit.sh {} {}\n".format(build, stage[1]) print(s) From 982538bfecc0f606ef8701e2d586c4be3aa86166 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 17:11:15 +0200 Subject: [PATCH 036/110] Use jobs instead of matrix --- .travis.yml | 4 +--- travis/generate_travis.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c121fe41..aebf87208 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,7 @@ sudo: required # # Configurations # -matrix: - fast_finish: true - +jobs: include: ### diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 4342b64d7..aef8de4c1 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -56,9 +56,7 @@ if __name__ == "__main__": s += "#\n" s += "# Configurations\n" s += "#\n" - s += "matrix:\n" - s += " fast_finish: true\n" - s += "\n" + s += "jobs:\n" s += " include:\n" # Generate all configurations From 2e02e34f948588308e4bdbb43d5916cd7368324d Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 15 May 2017 17:15:10 +0200 Subject: [PATCH 037/110] Insert jobs according to stage --- .travis.yml | 227 ++++++++++++++++++++------------------ travis/generate_travis.py | 32 +++--- 2 files changed, 136 insertions(+), 123 deletions(-) diff --git a/.travis.yml b/.travis.yml index aebf87208..def02f229 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,10 @@ jobs: include: ### - # ubuntu-16.10 + # Stage: ('Build dependencies', 'BuildDep') ### + # ubuntu-16.10 - stage: Build dependencies os: linux compiler: gcc @@ -41,44 +42,68 @@ jobs: travis/postsubmit.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . - - stage: Build library + - stage: Build dependencies os: linux compiler: gcc - env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 + 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 DefaultDebug BuildLib + travis/postsubmit.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . - - stage: Build all + # debian-9 + - stage: Build dependencies 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'; + 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='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug BuildAll + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/postsubmit.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . - - stage: Test all + - stage: Build dependencies 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'; + 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='ubuntu-16.10'; - travis/postsubmit.sh DefaultDebug TestAll + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/postsubmit.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . + # osx + - stage: Build dependencies + 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 BuildDep - 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', 'BuildLib') + ### + + # ubuntu-16.10 + - stage: Build library os: linux compiler: gcc - env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 + 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 DefaultRelease BuildDep + travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - stage: Build library @@ -91,51 +116,71 @@ jobs: travis/postsubmit.sh DefaultRelease BuildLib before_cache: docker cp storm:/storm/. . - - stage: Build all + # debian-9 + - stage: Build library 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'; + 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='ubuntu-16.10'; - travis/postsubmit.sh DefaultRelease BuildAll + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; + travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - - stage: Test all + - stage: Build library 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'; + 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='ubuntu-16.10'; - travis/postsubmit.sh DefaultRelease TestAll + 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 + 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 + 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 ### - # debian-9 + # Stage: ('Build all', 'BuildAll') ### - - stage: Build dependencies + # ubuntu-16.10 + - stage: Build all 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'; + 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='debian-9'; - travis/postsubmit.sh DefaultDebug BuildDep + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . - - stage: Build library + - stage: Build all 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'; + 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='debian-9'; - travis/postsubmit.sh DefaultDebug BuildLib + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . + # debian-9 - stage: Build all os: linux compiler: gcc @@ -146,44 +191,68 @@ jobs: travis/postsubmit.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . - - stage: Test all + - stage: Build all os: linux compiler: gcc - env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 + 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 DefaultDebug TestAll + travis/postsubmit.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . - - stage: Build dependencies + # osx + - 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: 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', 'TestAll') + ### + + # ubuntu-16.10 + - stage: Test all 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'; + 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='debian-9'; - travis/postsubmit.sh DefaultRelease BuildDep + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . - - stage: Build library + - stage: Test all 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'; + 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='debian-9'; - travis/postsubmit.sh DefaultRelease BuildLib + script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; + travis/postsubmit.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . - - stage: Build all + # debian-9 + - stage: Test all os: linux compiler: gcc - env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 + 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 DefaultRelease BuildAll + travis/postsubmit.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . - stage: Test all @@ -196,35 +265,7 @@ jobs: travis/postsubmit.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . - - ### # osx - ### - - - stage: Build dependencies - 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 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 - 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 os: osx compiler: clang @@ -233,30 +274,6 @@ jobs: travis/install_osx.sh script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; 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 - 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 - 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 os: osx compiler: clang diff --git a/travis/generate_travis.py b/travis/generate_travis.py index aef8de4c1..69ef83c87 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -60,17 +60,18 @@ if __name__ == "__main__": s += " include:\n" # Generate all configurations - # Linux via Docker - for config in configs_linux: - linux = config[0] - compiler = "{}{}".format(config[1], config[2]) + for stage in stages: s += "\n" s += " ###\n" - s += " # {}\n".format(linux) + s += " # Stage: {}\n".format(stage) s += " ###\n" s += "\n" - for build in build_types: - for stage in stages: + # Linux via Docker + for config in configs_linux: + linux = config[0] + compiler = "{}{}".format(config[1], config[2]) + s += " # {}\n".format(linux) + for build in build_types: s += " - stage: {}\n".format(stage[0]) s += " os: linux\n" s += " compiler: {}\n".format(config[1]) @@ -82,17 +83,12 @@ if __name__ == "__main__": s += " before_cache:\n" s += " docker cp storm:/storm/. .\n" - # Mac OS X - for config in configs_mac: - osx = config[0] - compiler = "{}{}".format(config[1], config[2]) - s += "\n" - s += " ###\n" - s += " # {}\n".format(osx) - s += " ###\n" - s += "\n" - for build in build_types: - for stage in stages: + # Mac OS X + for config in configs_mac: + osx = config[0] + compiler = "{}{}".format(config[1], config[2]) + s += " # {}\n".format(osx) + for build in build_types: s += " - stage: {}\n".format(stage[0]) s += " os: osx\n" s += " compiler: {}\n".format(config[1]) From e3759eb326a67d22747045b18930ec78d9e912ef Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 16 May 2017 08:17:52 +0200 Subject: [PATCH 038/110] Verbose output for make --- travis/postsubmit-helper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index f26f6a617..5f57a036a 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -30,7 +30,7 @@ run() { travis_fold end cmake # Make resources travis_fold start make_dep - make resources -j$N_JOBS + VERBOSE=1 make resources -j$N_JOBS travis_fold end make_dep ;; @@ -38,7 +38,7 @@ run() { # Make libstorm travis_fold start make_lib cd build - make storm -j$N_JOBS + VERBOSE=1 make storm -j$N_JOBS travis_fold end make_lib ;; @@ -46,7 +46,7 @@ run() { # Make all travis_fold start make_all cd build - make -j$N_JOBS + VERBOSE=1 make -j$N_JOBS travis_fold end make_all ;; From 4cf79ab8cc46f26c00b92c56063bf761aad87ccc Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 17 May 2017 10:38:39 +0200 Subject: [PATCH 039/110] Try to avoid rebuilding --- .travis.yml | 1 + travis/postsubmit-helper.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index def02f229..450e15a2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ cache: directories: - build - travis/mtime_cache + - src/storm/utility/storm-version.cpp # Enable docker support services: diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 5f57a036a..7f4d9c2a3 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -31,6 +31,8 @@ run() { # Make resources travis_fold start make_dep VERBOSE=1 make resources -j$N_JOBS + VERBOSE=1 make test-resources -j$N_JOBS + VERBOSE=1 make l3pp_ext -j$N_JOBS travis_fold end make_dep ;; From 869d7e7ba7a3a812c855bd5c55674be0c8065fc8 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 18 May 2017 10:31:53 +0200 Subject: [PATCH 040/110] Build sylvan beforehand --- travis/postsubmit-helper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 7f4d9c2a3..041c22383 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -33,6 +33,7 @@ run() { VERBOSE=1 make resources -j$N_JOBS VERBOSE=1 make test-resources -j$N_JOBS VERBOSE=1 make l3pp_ext -j$N_JOBS + VERBOSE=1 make sylvan -j$N_JOBS travis_fold end make_dep ;; From a2517c7a12fde364c02287a28b60930e5fb10247 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 18 May 2017 14:07:46 +0200 Subject: [PATCH 041/110] Set mtime for StormEigen --- .travis.yml | 1 - travis/mtime_cache/globs.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 450e15a2d..def02f229 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ cache: directories: - build - travis/mtime_cache - - src/storm/utility/storm-version.cpp # Enable docker support services: diff --git a/travis/mtime_cache/globs.txt b/travis/mtime_cache/globs.txt index 794ac4090..cd0d4d2ff 100644 --- a/travis/mtime_cache/globs.txt +++ b/travis/mtime_cache/globs.txt @@ -1,3 +1,4 @@ src/**/*.{%{cpp}} src/**/CMakeLists.txt resources/3rdparty/**/*.{%{cpp}} +resources/3rdparty/eigen-3.3-beta1/StormEigen/* From 2b142c83bb135951bad962e48eb06dd9144014d0 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 12:41:01 +0200 Subject: [PATCH 042/110] Disabled verbose output --- travis/install_linux.sh | 2 +- travis/install_osx.sh | 2 +- travis/postsubmit-helper.sh | 14 +++++++------- travis/postsubmit.sh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/travis/install_linux.sh b/travis/install_linux.sh index f22305b09..911b6730f 100755 --- a/travis/install_linux.sh +++ b/travis/install_linux.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash set -e diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 28b944d7b..1a581f8b6 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash # Script installing dependencies # Inspired by https://github.com/google/fruit diff --git a/travis/postsubmit-helper.sh b/travis/postsubmit-helper.sh index 041c22383..3d7383c89 100755 --- a/travis/postsubmit-helper.sh +++ b/travis/postsubmit-helper.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash # Inspired by https://github.com/google/fruit set -e @@ -30,10 +30,10 @@ run() { travis_fold end cmake # Make resources travis_fold start make_dep - VERBOSE=1 make resources -j$N_JOBS - VERBOSE=1 make test-resources -j$N_JOBS - VERBOSE=1 make l3pp_ext -j$N_JOBS - VERBOSE=1 make sylvan -j$N_JOBS + make resources -j$N_JOBS + make test-resources -j$N_JOBS + make l3pp_ext -j$N_JOBS + make sylvan -j$N_JOBS travis_fold end make_dep ;; @@ -41,7 +41,7 @@ run() { # Make libstorm travis_fold start make_lib cd build - VERBOSE=1 make storm -j$N_JOBS + make storm -j$N_JOBS travis_fold end make_lib ;; @@ -49,7 +49,7 @@ run() { # Make all travis_fold start make_all cd build - VERBOSE=1 make -j$N_JOBS + make -j$N_JOBS travis_fold end make_all ;; diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 7f5b7326b..a8b5b3de1 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash # Inspired by https://github.com/google/fruit set -e From 5bfc0f91c16548993f6c14e28f96ac52b5c1db03 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 14:44:07 +0200 Subject: [PATCH 043/110] Second build stage to make building libstorm more robust --- .travis.yml | 621 +++++++++++++++++++++++--------------- travis/generate_travis.py | 72 +++-- travis/postsubmit.sh | 2 +- 3 files changed, 419 insertions(+), 276 deletions(-) diff --git a/.travis.yml b/.travis.yml index def02f229..27a52383c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,259 +27,384 @@ sudo: required jobs: include: - ### - # Stage: ('Build dependencies', 'BuildDep') - ### + ### + # Stage: Build dependencies + ### - # ubuntu-16.10 - - stage: Build dependencies - 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 BuildDep - before_cache: - docker cp storm:/storm/. . - - stage: Build dependencies - 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 BuildDep - before_cache: - docker cp storm:/storm/. . - # debian-9 - - stage: Build dependencies - 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 BuildDep - before_cache: - docker cp storm:/storm/. . - - stage: Build dependencies - 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 BuildDep - before_cache: - docker cp storm:/storm/. . - # osx - - stage: Build dependencies - 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 BuildDep - - 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 + # ubuntu-16.10 + - stage: Build dependencies + 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 BuildDep + before_cache: + docker cp storm:/storm/. . + - stage: Build dependencies + 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 BuildDep + before_cache: + docker cp storm:/storm/. . + # debian-9 + - stage: Build dependencies + 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 BuildDep + before_cache: + docker cp storm:/storm/. . + - stage: Build dependencies + 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 BuildDep + before_cache: + docker cp storm:/storm/. . + # osx + - stage: Build dependencies + 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 BuildDep + - 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', 'BuildLib') - ### + ### + # Stage: Build library 1 + ### - # ubuntu-16.10 - - stage: Build library - 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 - 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 - 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 - 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 - 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 - 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 + # ubuntu-16.10 + - 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/. . + # debian-9 + - 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/. . + # osx + - 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 - ### - # Stage: ('Build all', 'BuildAll') - ### + ### + # Stage: Build library 2 + ### - # ubuntu-16.10 - - stage: Build all - 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 BuildAll - before_cache: - docker cp storm:/storm/. . - - stage: Build all - 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 BuildAll - before_cache: - docker cp storm:/storm/. . - # debian-9 - - stage: Build all - 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 BuildAll - before_cache: - docker cp storm:/storm/. . - - stage: Build all - 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 BuildAll - before_cache: - docker cp storm:/storm/. . - # osx - - 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: 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 + # 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: ('Test all', 'TestAll') - ### + ### + # Stage: Build all + ### - # ubuntu-16.10 - - stage: Test all - 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 TestAll - before_cache: - docker cp storm:/storm/. . - - stage: Test all - 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 TestAll - before_cache: - docker cp storm:/storm/. . - # debian-9 - - stage: Test all - 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 TestAll - before_cache: - docker cp storm:/storm/. . - - stage: Test all - 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 TestAll - before_cache: - docker cp storm:/storm/. . - # osx - - 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: Test 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 TestAll + # ubuntu-16.10 + - stage: Build all + 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 BuildAll + before_cache: + docker cp storm:/storm/. . + - stage: Build all + 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 BuildAll + before_cache: + docker cp storm:/storm/. . + # debian-9 + - stage: Build all + 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 BuildAll + before_cache: + docker cp storm:/storm/. . + - stage: Build all + 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 BuildAll + before_cache: + docker cp storm:/storm/. . + # osx + - 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: 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 + ### + + # ubuntu-16.10 + - stage: Test all + 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 TestAll + before_cache: + docker cp storm:/storm/. . + - stage: Test all + 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 TestAll + before_cache: + docker cp storm:/storm/. . + # debian-9 + - stage: Test all + 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 TestAll + before_cache: + docker cp storm:/storm/. . + - stage: Test all + 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 TestAll + before_cache: + docker cp storm:/storm/. . + # osx + - 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: Test 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 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 69ef83c87..46418a5d9 100644 --- a/travis/generate_travis.py +++ b/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,42 +61,59 @@ if __name__ == "__main__": s += " include:\n" # Generate all configurations + allowedFailures = "" for stage in stages: s += "\n" - s += " ###\n" - s += " # Stage: {}\n".format(stage) - s += " ###\n" + s += " ###\n" + s += " # Stage: {}\n".format(stage[0]) + s += " ###\n" s += "\n" # Linux via Docker for config in configs_linux: linux = config[0] compiler = "{}{}".format(config[1], config[2]) - s += " # {}\n".format(linux) + 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) + 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) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index a8b5b3de1..0c4e93603 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -4,7 +4,7 @@ set -e : ${N_JOBS:=2} -: ${TIMEOUT:=2200} +: ${TIMEOUT:=2000} if [ "$STL" != "" ] then From 987a53dfd1b31e55010e7817142330a536317ffa Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 15:22:40 +0200 Subject: [PATCH 044/110] 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 $? ;; From cb5c42feb6a5183b59de9f8474890bc69f27fce7 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 15:28:22 +0200 Subject: [PATCH 045/110] Fixed typo --- travis/postsubmit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index a594faeb1..5520633c2 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -11,7 +11,7 @@ then STLARG="-stdlib=$STL" fi -if [ "$2$ = "BuildLib1"] +if [ "$2" = "BuildLib1"] then TIMEARG="--preserve-status" else From 1afd8388d55e493d77ff959e324a66dfcc8f9824 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 16:39:53 +0200 Subject: [PATCH 046/110] Small fixes --- .travis.yml | 28 ++++++++++++++-------------- travis/generate_travis.py | 4 ++-- travis/postsubmit.sh | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index dc984b8d4..abcc36e02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,11 +92,11 @@ jobs: travis/postsubmit.sh DefaultRelease BuildDep ### - # Stage: Build library 1 + # Stage: Build library (1st run) ### # ubuntu-16.10 - - stage: Build library 1 + - stage: Build library (1st run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 @@ -106,7 +106,7 @@ jobs: travis/postsubmit.sh DefaultDebug BuildLib1 before_cache: docker cp storm:/storm/. . - - stage: Build library 1 + - stage: Build library (1st run) 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 1 + - stage: Build library (1st run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 @@ -127,7 +127,7 @@ jobs: travis/postsubmit.sh DefaultDebug BuildLib1 before_cache: docker cp storm:/storm/. . - - stage: Build library 1 + - stage: Build library (1st run) 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 1 + - stage: Build library (1st run) 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 BuildLib1 - - stage: Build library 1 + - stage: Build library (1st run) os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ @@ -156,11 +156,11 @@ jobs: travis/postsubmit.sh DefaultRelease BuildLib1 ### - # Stage: Build library 2 + # Stage: Build library (2nd run) ### # ubuntu-16.10 - - stage: Build library 2 + - stage: Build library (2nd run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=ubuntu-16.10 @@ -170,7 +170,7 @@ jobs: travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - - stage: Build library 2 + - stage: Build library (2nd run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=ubuntu-16.10 @@ -181,7 +181,7 @@ jobs: before_cache: docker cp storm:/storm/. . # debian-9 - - stage: Build library 2 + - stage: Build library (2nd run) os: linux compiler: gcc env: BUILD=DefaultDebug COMPILER=gcc-6 LINUX=debian-9 @@ -191,7 +191,7 @@ jobs: travis/postsubmit.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - - stage: Build library 2 + - stage: Build library (2nd run) os: linux compiler: gcc env: BUILD=DefaultRelease COMPILER=gcc-6 LINUX=debian-9 @@ -202,7 +202,7 @@ jobs: before_cache: docker cp storm:/storm/. . # osx - - stage: Build library 2 + - stage: Build library (2nd run) os: osx compiler: clang env: BUILD=DefaultDebug COMPILER=clang-4.0 STL=libc++ @@ -210,7 +210,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 2 + - stage: Build library (2nd run) os: osx compiler: clang env: BUILD=DefaultRelease COMPILER=clang-4.0 STL=libc++ diff --git a/travis/generate_travis.py b/travis/generate_travis.py index f1bb22e53..3c2de4b25 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -21,8 +21,8 @@ build_types = [ # Stages in travis stages = [ ("Build dependencies", "BuildDep"), - ("Build library 1", "BuildLib1"), - ("Build library 2", "BuildLib"), + ("Build library (1st run)", "BuildLib1"), + ("Build library (2nd run)", "BuildLib"), ("Build all", "BuildAll"), ("Test all", "TestAll"), ] diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 5520633c2..a2c4a2c75 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # Inspired by https://github.com/google/fruit set -e @@ -11,7 +11,7 @@ then STLARG="-stdlib=$STL" fi -if [ "$2" = "BuildLib1"] +if [ "$2" = "BuildLib1" ] then TIMEARG="--preserve-status" else From dcbd8fdb126a8ca901865b75b582120315fca096 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 19 May 2017 17:32:41 +0200 Subject: [PATCH 047/110] Wrong order for timeout --- travis/postsubmit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index a2c4a2c75..35f48ce22 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -30,7 +30,7 @@ linux) docker cp . storm:/storm # Execute main process - timeout $TIMEOUT $TIMEARG docker exec storm bash -c " + timeout $TIMEARG $TIMEOUT docker exec storm bash -c " export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; export STLARG=$STLARG; @@ -46,7 +46,7 @@ osx) export N_JOBS export STLARG export OS - gtimeout $TIMEOUT $TIMEARG travis/postsubmit-helper.sh "$1" "$2" + gtimeout $TIMEARG $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" exit $? ;; From 8aaa4b3bf78be22fa07a0dd633806df3229140a7 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 31 May 2017 13:48:33 +0200 Subject: [PATCH 048/110] Playing with exit codes --- travis/postsubmit.sh | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index 35f48ce22..fa57b8da5 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -1,8 +1,6 @@ #!/bin/bash -x # Inspired by https://github.com/google/fruit -set -e - : ${N_JOBS:=2} : ${TIMEOUT:=2000} @@ -11,33 +9,34 @@ then STLARG="-stdlib=$STL" fi -if [ "$2" = "BuildLib1" ] -then - TIMEARG="--preserve-status" -else - TIMEARG="" -fi - case $OS in linux) # Execute docker image on linux # Stop previous session - docker rm -f storm &>/dev/null || true + docker rm -f storm &>/dev/null # Run container + set -e docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX # Copy local content into container docker exec storm mkdir storm docker cp . storm:/storm + set +e # Execute main process - timeout $TIMEARG $TIMEOUT docker exec storm bash -c " + timeout $TIMEOUT docker exec storm bash -c " export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; export STLARG=$STLARG; export OS=$OS; cd storm; travis/postsubmit-helper.sh $1 $2" - exit $? + EXITCODE=$? + if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] + then + exit 0 + else + exit $EXITCODE + fi ;; osx) @@ -46,8 +45,14 @@ osx) export N_JOBS export STLARG export OS - gtimeout $TIMEARG $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" - exit $? + gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" + if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] + EXITCODE=$? + then + exit 0 + else + exit $EXITCODE + fi ;; *) From 5fb6dcc49580ea41484f0f2b7ceb67c5aa0363c3 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 1 Jun 2017 10:36:16 +0200 Subject: [PATCH 049/110] Fixed ordering in travis script --- travis/postsubmit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/postsubmit.sh b/travis/postsubmit.sh index fa57b8da5..fa057c3ff 100755 --- a/travis/postsubmit.sh +++ b/travis/postsubmit.sh @@ -46,8 +46,8 @@ osx) export STLARG export OS gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" - if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] EXITCODE=$? + if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] then exit 0 else From 857ffe1f140dc388a20ac7136faff7cdc7518ee1 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 1 Jun 2017 14:01:24 +0200 Subject: [PATCH 050/110] Install z3 for travis --- travis/dockerfiles/Dockerfile.debian-9 | 3 ++- travis/dockerfiles/Dockerfile.ubuntu-16.10 | 3 ++- travis/install_osx.sh | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/travis/dockerfiles/Dockerfile.debian-9 b/travis/dockerfiles/Dockerfile.debian-9 index 2a2c7989c..edf0100b1 100644 --- a/travis/dockerfiles/Dockerfile.debian-9 +++ b/travis/dockerfiles/Dockerfile.debian-9 @@ -11,4 +11,5 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \ libgmp-dev \ libginac-dev \ automake \ - libglpk-dev + libglpk-dev \ + libz3-dev diff --git a/travis/dockerfiles/Dockerfile.ubuntu-16.10 b/travis/dockerfiles/Dockerfile.ubuntu-16.10 index 541f8b64c..966857553 100644 --- a/travis/dockerfiles/Dockerfile.ubuntu-16.10 +++ b/travis/dockerfiles/Dockerfile.ubuntu-16.10 @@ -12,4 +12,5 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \ libginac-dev \ automake \ libglpk-dev \ - libhwloc-dev + libhwloc-dev \ + libz3-dev diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 1a581f8b6..4ebee5484 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -59,6 +59,7 @@ install_brew_package cln install_brew_package ginac install_brew_package doxygen install_brew_package boost --c++11 +install_brew_package z3 # optional brew tap homebrew/science install_brew_package homebrew/science/glpk install_brew_package homebrew/science/hwloc From 06e9e2802d9f087985d72da6094e1d62a6b02ff0 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 2 Jun 2017 11:31:57 +0200 Subject: [PATCH 051/110] Fixed path in warning --- travis/install_osx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 4ebee5484..091f9d1f8 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -47,7 +47,7 @@ clang-3.7) install_brew_package llvm@3.7 --with-clang --with-libcxx;; clang-3.8) install_brew_package llvm@3.8 --with-clang --with-libcxx;; clang-3.9) install_brew_package llvm@3.9 --with-clang --with-libcxx;; clang-4.0) install_brew_package llvm --with-clang --with-libcxx;; -*) echo "Compiler not supported: ${COMPILER}. See travis_ci_install_osx.sh"; exit 1 ;; +*) echo "Compiler not supported: ${COMPILER}. See travis/install_osx.sh"; exit 1 ;; esac travis_fold end brew_install_util From 749f8e41863bb6b2acd362b9f2ad43c5d0960262 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 12 Jun 2017 11:35:44 +0200 Subject: [PATCH 052/110] Change ordering in travis to let MacOs run first as it takes longer --- .travis.yml | 106 +++++++++++++++++++------------------- travis/generate_travis.py | 34 ++++++------ 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/.travis.yml b/.travis.yml index abcc36e02..e4390bde0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,23 @@ jobs: # Stage: Build dependencies ### + # osx + - stage: Build dependencies + 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 BuildDep + - 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 # ubuntu-16.10 - stage: Build dependencies os: linux @@ -73,28 +90,28 @@ jobs: travis/postsubmit.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . + + ### + # Stage: Build library (1st run) + ### + # osx - - stage: Build dependencies + - stage: Build library (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/postsubmit.sh DefaultDebug BuildDep - - stage: Build dependencies + travis/postsubmit.sh DefaultDebug BuildLib1 + - stage: Build library (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/postsubmit.sh DefaultRelease BuildDep - - ### - # Stage: Build library (1st run) - ### - + travis/postsubmit.sh DefaultRelease BuildLib1 # ubuntu-16.10 - stage: Build library (1st run) os: linux @@ -137,28 +154,28 @@ jobs: travis/postsubmit.sh DefaultRelease BuildLib1 before_cache: docker cp storm:/storm/. . + + ### + # Stage: Build library (2nd run) + ### + # osx - - stage: Build library (1st run) + - stage: Build library (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/postsubmit.sh DefaultDebug BuildLib1 - - stage: Build library (1st run) + travis/postsubmit.sh DefaultDebug BuildLib + - stage: Build library (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/postsubmit.sh DefaultRelease BuildLib1 - - ### - # Stage: Build library (2nd run) - ### - + travis/postsubmit.sh DefaultRelease BuildLib # ubuntu-16.10 - stage: Build library (2nd run) os: linux @@ -201,28 +218,28 @@ jobs: travis/postsubmit.sh DefaultRelease BuildLib before_cache: docker cp storm:/storm/. . + + ### + # Stage: Build all + ### + # osx - - stage: Build library (2nd run) + - 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 BuildLib - - stage: Build library (2nd run) + travis/postsubmit.sh DefaultDebug BuildAll + - 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 BuildLib - - ### - # Stage: Build all - ### - + travis/postsubmit.sh DefaultRelease BuildAll # ubuntu-16.10 - stage: Build all os: linux @@ -265,28 +282,28 @@ jobs: travis/postsubmit.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . + + ### + # Stage: Test all + ### + # osx - - stage: Build all + - 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 BuildAll - - stage: Build all + travis/postsubmit.sh DefaultDebug TestAll + - stage: Test 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 TestAll # ubuntu-16.10 - stage: Test all os: linux @@ -329,21 +346,4 @@ jobs: travis/postsubmit.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . - # osx - - 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: Test 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 TestAll diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 3c2de4b25..1f8bb5f94 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -67,6 +67,23 @@ if __name__ == "__main__": s += " # Stage: {}\n".format(stage[0]) s += " ###\n" s += "\n" + # 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: + 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 + # Linux via Docker for config in configs_linux: linux = config[0] @@ -86,21 +103,4 @@ if __name__ == "__main__": buildConfig += " docker cp storm:/storm/. .\n" s += 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: - 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 - print(s) From 4827d2083c3f1e6135198f2e610bb69c102e36c5 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 20 Jun 2017 16:43:19 +0200 Subject: [PATCH 053/110] Renamed build scripts in travis --- .travis.yml | 60 +++++++++---------- .../{postsubmit-helper.sh => build-helper.sh} | 0 travis/{postsubmit.sh => build.sh} | 4 +- travis/generate_travis.py | 4 +- 4 files changed, 34 insertions(+), 34 deletions(-) rename travis/{postsubmit-helper.sh => build-helper.sh} (100%) rename travis/{postsubmit.sh => build.sh} (91%) diff --git a/.travis.yml b/.travis.yml index e4390bde0..488f541af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,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 BuildDep + travis/build.sh DefaultDebug BuildDep - stage: Build dependencies os: osx compiler: clang @@ -47,7 +47,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 BuildDep + travis/build.sh DefaultRelease BuildDep # ubuntu-16.10 - stage: Build dependencies os: linux @@ -56,7 +56,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 BuildDep + travis/build.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . - stage: Build dependencies @@ -66,7 +66,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 BuildDep + travis/build.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . # debian-9 @@ -77,7 +77,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 BuildDep + travis/build.sh DefaultDebug BuildDep before_cache: docker cp storm:/storm/. . - stage: Build dependencies @@ -87,7 +87,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 BuildDep + travis/build.sh DefaultRelease BuildDep before_cache: docker cp storm:/storm/. . @@ -103,7 +103,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 BuildLib1 + travis/build.sh DefaultDebug BuildLib1 - stage: Build library (1st run) os: osx compiler: clang @@ -111,7 +111,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 BuildLib1 + travis/build.sh DefaultRelease BuildLib1 # ubuntu-16.10 - stage: Build library (1st run) os: linux @@ -120,7 +120,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 BuildLib1 + travis/build.sh DefaultDebug BuildLib1 before_cache: docker cp storm:/storm/. . - stage: Build library (1st run) @@ -130,7 +130,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 BuildLib1 + travis/build.sh DefaultRelease BuildLib1 before_cache: docker cp storm:/storm/. . # debian-9 @@ -141,7 +141,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 BuildLib1 + travis/build.sh DefaultDebug BuildLib1 before_cache: docker cp storm:/storm/. . - stage: Build library (1st run) @@ -151,7 +151,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 BuildLib1 + travis/build.sh DefaultRelease BuildLib1 before_cache: docker cp storm:/storm/. . @@ -167,7 +167,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/build.sh DefaultDebug BuildLib - stage: Build library (2nd run) os: osx compiler: clang @@ -175,7 +175,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/build.sh DefaultRelease BuildLib # ubuntu-16.10 - stage: Build library (2nd run) os: linux @@ -184,7 +184,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/build.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - stage: Build library (2nd run) @@ -194,7 +194,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/build.sh DefaultRelease BuildLib before_cache: docker cp storm:/storm/. . # debian-9 @@ -205,7 +205,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/build.sh DefaultDebug BuildLib before_cache: docker cp storm:/storm/. . - stage: Build library (2nd run) @@ -215,7 +215,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/build.sh DefaultRelease BuildLib before_cache: docker cp storm:/storm/. . @@ -231,7 +231,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 BuildAll + travis/build.sh DefaultDebug BuildAll - stage: Build all os: osx compiler: clang @@ -239,7 +239,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 BuildAll + travis/build.sh DefaultRelease BuildAll # ubuntu-16.10 - stage: Build all os: linux @@ -248,7 +248,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 BuildAll + travis/build.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . - stage: Build all @@ -258,7 +258,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 BuildAll + travis/build.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . # debian-9 @@ -269,7 +269,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 BuildAll + travis/build.sh DefaultDebug BuildAll before_cache: docker cp storm:/storm/. . - stage: Build all @@ -279,7 +279,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 BuildAll + travis/build.sh DefaultRelease BuildAll before_cache: docker cp storm:/storm/. . @@ -295,7 +295,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 TestAll + travis/build.sh DefaultDebug TestAll - stage: Test all os: osx compiler: clang @@ -303,7 +303,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 TestAll + travis/build.sh DefaultRelease TestAll # ubuntu-16.10 - stage: Test all os: linux @@ -312,7 +312,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 TestAll + travis/build.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . - stage: Test all @@ -322,7 +322,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 TestAll + travis/build.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . # debian-9 @@ -333,7 +333,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 TestAll + travis/build.sh DefaultDebug TestAll before_cache: docker cp storm:/storm/. . - stage: Test all @@ -343,7 +343,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 TestAll + travis/build.sh DefaultRelease TestAll before_cache: docker cp storm:/storm/. . diff --git a/travis/postsubmit-helper.sh b/travis/build-helper.sh similarity index 100% rename from travis/postsubmit-helper.sh rename to travis/build-helper.sh diff --git a/travis/postsubmit.sh b/travis/build.sh similarity index 91% rename from travis/postsubmit.sh rename to travis/build.sh index fa057c3ff..f2abbdd99 100755 --- a/travis/postsubmit.sh +++ b/travis/build.sh @@ -29,7 +29,7 @@ linux) export STLARG=$STLARG; export OS=$OS; cd storm; - travis/postsubmit-helper.sh $1 $2" + travis/build-helper.sh $1 $2" EXITCODE=$? if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] then @@ -45,7 +45,7 @@ osx) export N_JOBS export STLARG export OS - gtimeout $TIMEOUT travis/postsubmit-helper.sh "$1" "$2" + gtimeout $TIMEOUT travis/build-helper.sh "$1" "$2" EXITCODE=$? if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] then diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 1f8bb5f94..202ef19ac 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -81,7 +81,7 @@ if __name__ == "__main__": 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]) + buildConfig += " travis/build.sh {} {}\n".format(build, stage[1]) s += buildConfig # Linux via Docker @@ -98,7 +98,7 @@ if __name__ == "__main__": 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 += " travis/build.sh {} {}\n".format(build, stage[1]) buildConfig += " before_cache:\n" buildConfig += " docker cp storm:/storm/. .\n" s += buildConfig From 9b40592932a698c71f8e16624fad56f80c7ebdbf Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 20 Jun 2017 16:45:14 +0200 Subject: [PATCH 054/110] Smaller timeout for Mac --- travis/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/travis/build.sh b/travis/build.sh index f2abbdd99..238f113a9 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -2,7 +2,8 @@ # Inspired by https://github.com/google/fruit : ${N_JOBS:=2} -: ${TIMEOUT:=2000} +: ${TIMEOUT_MAC:=1800} +: ${TIMEOUT_LINUX:=2000} if [ "$STL" != "" ] then @@ -23,7 +24,7 @@ linux) set +e # Execute main process - timeout $TIMEOUT docker exec storm bash -c " + timeout $TIMEOUT_LINUX docker exec storm bash -c " export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; export STLARG=$STLARG; @@ -45,7 +46,7 @@ osx) export N_JOBS export STLARG export OS - gtimeout $TIMEOUT travis/build-helper.sh "$1" "$2" + gtimeout $TIMEOUT_MAC travis/build-helper.sh "$1" "$2" EXITCODE=$? if [ $EXITCODE = 124 ] && [ "$2" = "BuildLib1" ] then From 02fd731fa25697a49128e91f955baa3554963beb Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 23 Jun 2017 10:20:32 +0200 Subject: [PATCH 055/110] 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"), ] From fef8f03a1a3a3ce356ac68ac16a0d9167a12cf85 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 23 Jun 2017 10:31:48 +0200 Subject: [PATCH 056/110] Changed travis helper for changed stages --- travis/build-helper.sh | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 39d5d0a2a..defef87ad 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -13,7 +13,7 @@ travis_fold() { # Helper for distinguishing between different runs run() { case "$1" in - BuildDep) + Build1) # CMake travis_fold start cmake rm -rf build @@ -28,37 +28,18 @@ run() { fi echo travis_fold end cmake - # Make resources - travis_fold start make_dep - make resources -j$N_JOBS - make test-resources -j$N_JOBS - make l3pp_ext -j$N_JOBS - make sylvan -j$N_JOBS - 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 - cd build - make storm -j$N_JOBS - travis_fold end make_lib + # Make + travis_fold start make + make -j$N_JOBS + travis_fold end make ;; - BuildAll) - # Make all - travis_fold start make_all + Build2 | Build3 | Build4) + # Make (run 2-4) + travis_fold start make cd build make -j$N_JOBS - travis_fold end make_all + travis_fold end make ;; TestAll) From c268df3da358972ce552992e264806c1924b67f0 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 26 Jun 2017 13:04:02 +0200 Subject: [PATCH 057/110] Increase timeout for Linux in travis --- travis/build-helper.sh | 3 ++- travis/build.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index defef87ad..ccc5a286d 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -14,9 +14,10 @@ travis_fold() { run() { case "$1" in Build1) - # CMake travis_fold start cmake + # Remove old build folder rm -rf build + # CMake mkdir build cd build cmake .. "${CMAKE_ARGS[@]}" diff --git a/travis/build.sh b/travis/build.sh index abf611603..3baa1ee0f 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -3,7 +3,7 @@ : ${N_JOBS:=2} : ${TIMEOUT_MAC:=1800} -: ${TIMEOUT_LINUX:=2000} +: ${TIMEOUT_LINUX:=2500} if [ "$STL" != "" ] then From 5982cf886d02a122710a86e4e55686185273e161 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 26 Jun 2017 13:05:12 +0200 Subject: [PATCH 058/110] Introduce skip flag to avoid rerunning successful builds in later stages --- travis/build-helper.sh | 2 ++ travis/build.sh | 11 +++++++++++ travis/install_linux.sh | 6 ++++++ travis/install_osx.sh | 6 ++++++ 4 files changed, 25 insertions(+) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index ccc5a286d..e8658e180 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -33,6 +33,7 @@ run() { travis_fold start make make -j$N_JOBS travis_fold end make + touch skip.txt ;; Build2 | Build3 | Build4) @@ -41,6 +42,7 @@ run() { cd build make -j$N_JOBS travis_fold end make + touch skip.txt ;; TestAll) diff --git a/travis/build.sh b/travis/build.sh index 3baa1ee0f..fbf99d6cc 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -12,6 +12,17 @@ fi EXITCODE=42 +# Skip this run? +if [ -f build/skip.txt ] +then + # Remove flag s.t. tests will be executed + if [[ "$2" == "Build4" ]] + then + rm build/skip.txt + fi + exit 0 +fi + case $OS in linux) # Execute docker image on Linux diff --git a/travis/install_linux.sh b/travis/install_linux.sh index 911b6730f..c7ef04886 100755 --- a/travis/install_linux.sh +++ b/travis/install_linux.sh @@ -2,4 +2,10 @@ set -e +# Skip this run? +if [ -f build/skip.txt ] +then + exit 0 +fi + sudo apt-get install -qq -y docker diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 091f9d1f8..e62065a50 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -23,6 +23,12 @@ install_brew_package() { fi } +# Skip this run? +if [ -f build/skip.txt ] +then + exit 0 +fi + # Update packages travis_fold start brew_update brew update From e3f4476fa3fee35e17738e25db863f53d16978b3 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 26 Jun 2017 14:07:23 +0200 Subject: [PATCH 059/110] Decreased timeout for Linux again --- travis/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/build.sh b/travis/build.sh index fbf99d6cc..6b7239449 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -3,7 +3,7 @@ : ${N_JOBS:=2} : ${TIMEOUT_MAC:=1800} -: ${TIMEOUT_LINUX:=2500} +: ${TIMEOUT_LINUX:=2300} if [ "$STL" != "" ] then From 2231e9dfa373f4c334533297ed14582081e9ef83 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 28 Jun 2017 14:08:07 +0200 Subject: [PATCH 060/110] Fixed stage skipping in travis --- travis/build-helper.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index e8658e180..30d44c3af 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -36,8 +36,8 @@ run() { touch skip.txt ;; - Build2 | Build3 | Build4) - # Make (run 2-4) + Build2 | Build3) + # Make (run 2-3) travis_fold start make cd build make -j$N_JOBS @@ -45,6 +45,14 @@ run() { touch skip.txt ;; + Build4) + # Make (run 2-4) + travis_fold start make + cd build + make -j$N_JOBS + travis_fold end make + ;; + TestAll) # Test all travis_fold start test_all From 79f96ad2eda79bf2c2af95d204a99541f9470564 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 4 Jul 2017 14:52:22 +0200 Subject: [PATCH 061/110] Added Dockerfile for Storm --- travis/dockerfiles/Dockerfile.storm | 8 ++++++++ travis/dockerfiles/build_carl.sh | 9 +++++++++ travis/dockerfiles/build_storm.sh | 9 +++++++++ 3 files changed, 26 insertions(+) create mode 100644 travis/dockerfiles/Dockerfile.storm create mode 100755 travis/dockerfiles/build_carl.sh create mode 100755 travis/dockerfiles/build_storm.sh diff --git a/travis/dockerfiles/Dockerfile.storm b/travis/dockerfiles/Dockerfile.storm new file mode 100644 index 000000000..272b97825 --- /dev/null +++ b/travis/dockerfiles/Dockerfile.storm @@ -0,0 +1,8 @@ +FROM mvolk/storm-basesystem:ubuntu-16.10 +MAINTAINER Matthias Volk + +COPY build_carl.sh /opt +RUN cd opt && ./build_carl.sh + +COPY build_storm.sh /opt +RUN cd opt && ./build_storm.sh diff --git a/travis/dockerfiles/build_carl.sh b/travis/dockerfiles/build_carl.sh new file mode 100755 index 000000000..5c26b307b --- /dev/null +++ b/travis/dockerfiles/build_carl.sh @@ -0,0 +1,9 @@ +#!/bin/bash +echo "Building Carl..." +git clone -b singleton_fix https://github.com/smtrat/carl.git +cd carl +mkdir build +cd build +cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON +make lib_carl -j2 +echo "Building Carl finished" diff --git a/travis/dockerfiles/build_storm.sh b/travis/dockerfiles/build_storm.sh new file mode 100755 index 000000000..4c11b708d --- /dev/null +++ b/travis/dockerfiles/build_storm.sh @@ -0,0 +1,9 @@ +#!/bin/bash +echo "Building Storm..." +git clone https://github.com/moves-rwth/storm.git +cd storm +mkdir build +cd build +cmake .. -DCMAKE_BUILD_TYPE=Release +make storm storm-dft storm-pars -j1 +echo "Building Storm finished" From c70a81558975d5f9b2d4d1cb922ffb3f6e237e92 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 4 Jul 2017 16:34:58 +0200 Subject: [PATCH 062/110] Refactored travis scripts --- .travis.yml | 240 +++++++++++++++++++------------------- travis/build-helper.sh | 6 +- travis/build.sh | 24 ++-- travis/generate_travis.py | 16 +-- 4 files changed, 143 insertions(+), 143 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b45b7f4a..e700009c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,59 +35,59 @@ jobs: - 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++'; + env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug Build1 + script: + travis/build.sh 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++'; + env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease Build1 + script: + travis/build.sh Build1 # ubuntu-16.10 - 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'; + env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug Build1 + script: + travis/build.sh Build1 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease Build1 + script: + travis/build.sh Build1 before_cache: docker cp storm:/storm/. . # debian-9 - 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'; + env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug Build1 + script: + travis/build.sh Build1 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease Build1 + script: + travis/build.sh Build1 before_cache: docker cp storm:/storm/. . @@ -99,59 +99,59 @@ jobs: - 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++'; + env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug Build2 + script: + travis/build.sh 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++'; + env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease Build2 + script: + travis/build.sh Build2 # ubuntu-16.10 - 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'; + env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug Build2 + script: + travis/build.sh Build2 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease Build2 + script: + travis/build.sh Build2 before_cache: docker cp storm:/storm/. . # debian-9 - 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'; + env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug Build2 + script: + travis/build.sh Build2 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease Build2 + script: + travis/build.sh Build2 before_cache: docker cp storm:/storm/. . @@ -163,59 +163,59 @@ jobs: - 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++'; + env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug Build3 + script: + travis/build.sh 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++'; + env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease Build3 + script: + travis/build.sh Build3 # ubuntu-16.10 - 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'; + env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug Build3 + script: + travis/build.sh Build3 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease Build3 + script: + travis/build.sh Build3 before_cache: docker cp storm:/storm/. . # debian-9 - 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'; + env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug Build3 + script: + travis/build.sh Build3 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease Build3 + script: + travis/build.sh Build3 before_cache: docker cp storm:/storm/. . @@ -227,59 +227,59 @@ jobs: - 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++'; + env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug Build4 + script: + travis/build.sh 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++'; + env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease Build4 + script: + travis/build.sh Build4 # ubuntu-16.10 - 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'; + env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug Build4 + script: + travis/build.sh Build4 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease Build4 + script: + travis/build.sh Build4 before_cache: docker cp storm:/storm/. . # debian-9 - 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'; + env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug Build4 + script: + travis/build.sh Build4 before_cache: docker cp storm:/storm/. . - 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'; + env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease Build4 + script: + travis/build.sh Build4 before_cache: docker cp storm:/storm/. . @@ -291,59 +291,59 @@ jobs: - 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++'; + env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultDebug TestAll + script: + travis/build.sh TestAll - stage: Test 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++'; + env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++ + install: travis/install_osx.sh - script: export OS=osx; export COMPILER='clang-4.0'; export STL='libc++'; - travis/build.sh DefaultRelease TestAll + script: + travis/build.sh TestAll # ubuntu-16.10 - stage: Test all 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'; + env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultDebug TestAll + script: + travis/build.sh TestAll before_cache: docker cp storm:/storm/. . - stage: Test all 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'; + env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='ubuntu-16.10'; - travis/build.sh DefaultRelease TestAll + script: + travis/build.sh TestAll before_cache: docker cp storm:/storm/. . # debian-9 - stage: Test all 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'; + env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultDebug TestAll + script: + travis/build.sh TestAll before_cache: docker cp storm:/storm/. . - stage: Test all 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'; + env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 + install: travis/install_linux.sh - script: export OS=linux; export COMPILER='gcc-6'; export LINUX='debian-9'; - travis/build.sh DefaultRelease TestAll + script: + travis/build.sh TestAll before_cache: docker cp storm:/storm/. . diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 30d44c3af..200d82852 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -152,10 +152,10 @@ echo CXX version: $($CXX --version) echo C++ Standard library location: $(echo '#include ' | $CXX -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1) echo Normalized C++ Standard library location: $(readlink -f $(echo '#include ' | $CXX -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1)) -case "$1" in +case "$CONFIG" in DefaultDebug) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="$STLARG") ;; DefaultRelease) CMAKE_ARGS=(-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="$STLARG") ;; -*) echo "Error: you need to specify one of the supported postsubmit modes (see postsubmit.sh)."; exit 1 ;; +*) echo "Unrecognized value of CONFIG: $CONFIG"; exit 1 ;; esac # Restore timestamps of files @@ -163,4 +163,4 @@ travis_fold start mtime ruby travis/mtime_cache/mtime_cache.rb -g travis/mtime_cache/globs.txt -c travis/mtime_cache/cache.json travis_fold end mtime -run "$2" +run "$1" diff --git a/travis/build.sh b/travis/build.sh index 6b7239449..e46685174 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -1,14 +1,11 @@ #!/bin/bash -x # Inspired by https://github.com/google/fruit -: ${N_JOBS:=2} -: ${TIMEOUT_MAC:=1800} -: ${TIMEOUT_LINUX:=2300} +N_JOBS=2 +TIMEOUT_MAC=1800 +TIMEOUT_LINUX=2300 -if [ "$STL" != "" ] -then - STLARG="-stdlib=$STL" -fi +OS=$TRAVIS_OS_NAME EXITCODE=42 @@ -16,7 +13,7 @@ EXITCODE=42 if [ -f build/skip.txt ] then # Remove flag s.t. tests will be executed - if [[ "$2" == "Build4" ]] + if [[ "$1" == "Build4" ]] then rm build/skip.txt fi @@ -38,22 +35,25 @@ linux) # Execute main process timeout $TIMEOUT_LINUX docker exec storm bash -c " + export CONFIG=$CONFIG; export COMPILER=$COMPILER; export N_JOBS=$N_JOBS; - export STLARG=$STLARG; + export STLARG=; export OS=$OS; cd storm; - travis/build-helper.sh $1 $2" + travis/build-helper.sh $1" EXITCODE=$? ;; osx) # Mac OSX + STLARG="-stdlib=libc++" + export CONFIG=$CONFIG export COMPILER export N_JOBS export STLARG export OS - gtimeout $TIMEOUT_MAC travis/build-helper.sh "$1" "$2" + gtimeout $TIMEOUT_MAC travis/build-helper.sh "$1" EXITCODE=$? ;; @@ -63,7 +63,7 @@ osx) exit 1 esac -if [[ $EXITCODE == 124 ]] && [[ "$2" == Build* ]] && [[ "$2" != "Build4" ]] +if [[ $EXITCODE == 124 ]] && [[ "$1" == Build* ]] && [[ "$1" != "Build4" ]] then exit 0 else diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 7e1ab7735..4fca95f1b 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -77,11 +77,11 @@ if __name__ == "__main__": 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 += " env: CONFIG={} COMPILER={} STL=libc++\n".format(build, compiler) + buildConfig += " install:\n" buildConfig += " travis/install_osx.sh\n" - buildConfig += " script: export OS=osx; export COMPILER='{}'; export STL='libc++';\n".format(compiler) - buildConfig += " travis/build.sh {} {}\n".format(build, stage[1]) + buildConfig += " script:\n" + buildConfig += " travis/build.sh {}\n".format(stage[1]) s += buildConfig # Linux via Docker @@ -94,11 +94,11 @@ if __name__ == "__main__": 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 += " env: CONFIG={} LINUX={} COMPILER={}\n".format(build, linux, compiler) + buildConfig += " install:\n" buildConfig += " travis/install_linux.sh\n" - buildConfig += " script: export OS=linux; export COMPILER='{}'; export LINUX='{}';\n".format(compiler, linux) - buildConfig += " travis/build.sh {} {}\n".format(build, stage[1]) + buildConfig += " script:\n" + buildConfig += " travis/build.sh {}\n".format(stage[1]) buildConfig += " before_cache:\n" buildConfig += " docker cp storm:/storm/. .\n" s += buildConfig From f2492c9e9712fdec996dd00697c800b8a43d3a74 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 5 Jul 2017 18:21:57 +0200 Subject: [PATCH 063/110] Small fix in travis script --- travis/build-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 200d82852..1fd6dc785 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -22,9 +22,9 @@ run() { cd build cmake .. "${CMAKE_ARGS[@]}" echo - echo "Content of CMakeFiles/CMakeError.log:" if [ -f "CMakeFiles/CMakeError.log" ] then + echo "Content of CMakeFiles/CMakeError.log:" cat CMakeFiles/CMakeError.log fi echo From 1eaa02fab1088172d0066c59a000d1dde7b16421 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 5 Jul 2017 22:54:49 +0200 Subject: [PATCH 064/110] Clear mtime_cache when starting --- travis/build-helper.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 1fd6dc785..72e377617 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -160,6 +160,11 @@ esac # Restore timestamps of files travis_fold start mtime +if [[ "$1" == "Build1" ]] +then + # Remove old mtime cache + rm -rf travis/mtime_cache/cache.json +fi ruby travis/mtime_cache/mtime_cache.rb -g travis/mtime_cache/globs.txt -c travis/mtime_cache/cache.json travis_fold end mtime From a860776164b626e43dca5606640c460591725411 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 7 Jul 2017 14:00:49 +0200 Subject: [PATCH 065/110] Try to print error output in travis --- .travis.yml | 60 +++++++++++++++++++++++++++++++++++++++ travis/generate_travis.py | 4 +++ 2 files changed, 64 insertions(+) diff --git a/.travis.yml b/.travis.yml index e700009c3..58ccf03e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build1 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (1st run) os: osx compiler: clang @@ -48,6 +50,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build1 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 - stage: Build (1st run) os: linux @@ -59,6 +63,8 @@ jobs: travis/build.sh Build1 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (1st run) os: linux compiler: gcc @@ -69,6 +75,8 @@ jobs: travis/build.sh Build1 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 - stage: Build (1st run) os: linux @@ -80,6 +88,8 @@ jobs: travis/build.sh Build1 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (1st run) os: linux compiler: gcc @@ -90,6 +100,8 @@ jobs: travis/build.sh Build1 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Build (2nd run) @@ -104,6 +116,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build2 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (2nd run) os: osx compiler: clang @@ -112,6 +126,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build2 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 - stage: Build (2nd run) os: linux @@ -123,6 +139,8 @@ jobs: travis/build.sh Build2 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (2nd run) os: linux compiler: gcc @@ -133,6 +151,8 @@ jobs: travis/build.sh Build2 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 - stage: Build (2nd run) os: linux @@ -144,6 +164,8 @@ jobs: travis/build.sh Build2 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (2nd run) os: linux compiler: gcc @@ -154,6 +176,8 @@ jobs: travis/build.sh Build2 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Build (3rd run) @@ -168,6 +192,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build3 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (3rd run) os: osx compiler: clang @@ -176,6 +202,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build3 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 - stage: Build (3rd run) os: linux @@ -187,6 +215,8 @@ jobs: travis/build.sh Build3 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (3rd run) os: linux compiler: gcc @@ -197,6 +227,8 @@ jobs: travis/build.sh Build3 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 - stage: Build (3rd run) os: linux @@ -208,6 +240,8 @@ jobs: travis/build.sh Build3 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (3rd run) os: linux compiler: gcc @@ -218,6 +252,8 @@ jobs: travis/build.sh Build3 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Build (4th run) @@ -232,6 +268,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build4 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (4th run) os: osx compiler: clang @@ -240,6 +278,8 @@ jobs: travis/install_osx.sh script: travis/build.sh Build4 + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 - stage: Build (4th run) os: linux @@ -251,6 +291,8 @@ jobs: travis/build.sh Build4 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (4th run) os: linux compiler: gcc @@ -261,6 +303,8 @@ jobs: travis/build.sh Build4 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 - stage: Build (4th run) os: linux @@ -272,6 +316,8 @@ jobs: travis/build.sh Build4 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Build (4th run) os: linux compiler: gcc @@ -282,6 +328,8 @@ jobs: travis/build.sh Build4 before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Test all @@ -296,6 +344,8 @@ jobs: travis/install_osx.sh script: travis/build.sh TestAll + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Test all os: osx compiler: clang @@ -304,6 +354,8 @@ jobs: travis/install_osx.sh script: travis/build.sh TestAll + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # ubuntu-16.10 - stage: Test all os: linux @@ -315,6 +367,8 @@ jobs: travis/build.sh TestAll before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Test all os: linux compiler: gcc @@ -325,6 +379,8 @@ jobs: travis/build.sh TestAll before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; # debian-9 - stage: Test all os: linux @@ -336,6 +392,8 @@ jobs: travis/build.sh TestAll before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; - stage: Test all os: linux compiler: gcc @@ -346,4 +404,6 @@ jobs: travis/build.sh TestAll before_cache: docker cp storm:/storm/. . + after_failure: + - find build -iname '*err*.log' -type f -print -exec cat {} \; diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 4fca95f1b..59dcd0aac 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -82,6 +82,8 @@ if __name__ == "__main__": buildConfig += " travis/install_osx.sh\n" buildConfig += " script:\n" 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 # Linux via Docker @@ -101,6 +103,8 @@ if __name__ == "__main__": buildConfig += " travis/build.sh {}\n".format(stage[1]) buildConfig += " before_cache:\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 print(s) From 2a32e2cd772c427c11be23c88a850d05189a3dec Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 7 Jul 2017 15:17:27 +0200 Subject: [PATCH 066/110] Install eigen package in travis --- travis/build.sh | 2 ++ travis/install_osx.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/travis/build.sh b/travis/build.sh index e46685174..4f7d1c17d 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -28,6 +28,8 @@ linux) # Run container set -e docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX + # Install dependencies + docker exec storm apt-get install -qq -y libeigen-dev # Copy local content into container docker exec storm mkdir storm docker cp . storm:/storm diff --git a/travis/install_osx.sh b/travis/install_osx.sh index e62065a50..8d703a82a 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -69,4 +69,5 @@ install_brew_package z3 # optional brew tap homebrew/science install_brew_package homebrew/science/glpk install_brew_package homebrew/science/hwloc +install_brew_package eigen travis_fold end brew_install_dependencies From d9d201f56b2813465b3edf3929285b2ff6aa9177 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 7 Jul 2017 15:20:55 +0200 Subject: [PATCH 067/110] Fixed eigen package in docker --- travis/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/build.sh b/travis/build.sh index 4f7d1c17d..e649f5a74 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -29,7 +29,7 @@ linux) set -e docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX # Install dependencies - docker exec storm apt-get install -qq -y libeigen-dev + docker exec storm apt-get install -qq -y libeigen3-dev # Copy local content into container docker exec storm mkdir storm docker cp . storm:/storm From 9ad4203b09866da323c11bc8d827d91acdc76ab7 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 10:45:15 +0200 Subject: [PATCH 068/110] Export to cmake for shipped carl --- resources/3rdparty/carl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/3rdparty/carl/CMakeLists.txt b/resources/3rdparty/carl/CMakeLists.txt index d0e046861..cba8492dc 100644 --- a/resources/3rdparty/carl/CMakeLists.txt +++ b/resources/3rdparty/carl/CMakeLists.txt @@ -12,7 +12,7 @@ ExternalProject_Add(carl-config PREFIX here SOURCE_DIR source_dir BINARY_DIR ${STORM_3RDPARTY_BINARY_DIR}/carl - CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBOOST_INCLUDEDIR=${Boost_INCLUDE_DIRS} -DBOOST_LIBRARYDIR=${Boost_LIBRARY_DIRS} -DBoost_NO_SYSTEM_PATHS=ON -DEXPORT_TO_CMAKE=OFF -DTHREAD_SAFE=ON -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON -DCMAKE_INSTALL_PREFIX:PATH=${STORM_3RDPARTY_BINARY_DIR}/carl + CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBOOST_INCLUDEDIR=${Boost_INCLUDE_DIRS} -DBOOST_LIBRARYDIR=${Boost_LIBRARY_DIRS} -DBoost_NO_SYSTEM_PATHS=ON -DEXPORT_TO_CMAKE=ON -DTHREAD_SAFE=ON -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON -DCMAKE_INSTALL_PREFIX:PATH=${STORM_3RDPARTY_BINARY_DIR}/carl BUILD_IN_SOURCE 0 LOG_UPDATE OFF LOG_CONFIGURE OFF From e4783846e0592bd35df51b0d8331aadb67494178 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 10:55:23 +0200 Subject: [PATCH 069/110] Changed carlConfig path for shipped carl --- resources/3rdparty/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index dd0942e92..b8b9ba12a 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -271,7 +271,7 @@ if(USE_CARL) LOG_INSTALL ON BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl${DYNAMIC_EXT} ) - include(${STORM_3RDPARTY_BINARY_DIR}/carl/carlExport/carlConfig.cmake) + include(${STORM_3RDPARTY_BINARY_DIR}/carl/carlConfig.cmake) set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS}) set(STORM_HAVE_GINAC ${CARL_USE_GINAC}) From 6c2213b9a1069ea22b1748afe0bcfc3dac08f7d0 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:24:25 +0200 Subject: [PATCH 070/110] 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 From 9df6e5812734c53420efbb52d50cfbaa6a032ed5 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:28:01 +0200 Subject: [PATCH 071/110] Travis dependency already part of docker --- travis/build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/travis/build.sh b/travis/build.sh index e649f5a74..e46685174 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -28,8 +28,6 @@ linux) # Run container set -e docker run -d -it --name storm --privileged mvolk/storm-basesystem:$LINUX - # Install dependencies - docker exec storm apt-get install -qq -y libeigen3-dev # Copy local content into container docker exec storm mkdir storm docker cp . storm:/storm From 556a7df2139f3c7a7be3d8f8905fa1ec8d52805a Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:28:24 +0200 Subject: [PATCH 072/110] Refactored travis build script --- travis/build-helper.sh | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 835da8dc3..f601928f0 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -27,28 +27,18 @@ run() { fi echo travis_fold end cmake - # Make - travis_fold start make - make -j$N_JOBS - travis_fold end make - touch skip.txt - ;; - - Build2 | Build3) - # Make (run 2-3) - travis_fold start make - cd build - make -j$N_JOBS - travis_fold end make - touch skip.txt - ;; + ;& # fall-through to make step - Build4) - # Make (run 2-4) + Build2 | Build3 | Build4) + # Make travis_fold start make cd build make -j$N_JOBS travis_fold end make + if [[ "$1" != "Build4" ]] + then + touch skip.txt + fi ;; TestAll) From cc268b3140ba7b8efffe997c5d41560b3848ab89 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:38:11 +0200 Subject: [PATCH 073/110] Fixed problem in travis --- travis/build-helper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index f601928f0..22f292496 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -26,6 +26,7 @@ run() { cat CMakeFiles/CMakeError.log fi echo + cd .. travis_fold end cmake ;& # fall-through to make step From ae9641babac8ef88d1cb492317e096437e9a14ab Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:38:34 +0200 Subject: [PATCH 074/110] Install eigen3 in dockerfiles --- travis/dockerfiles/Dockerfile.debian-9 | 1 + travis/dockerfiles/Dockerfile.ubuntu-16.10 | 1 + 2 files changed, 2 insertions(+) diff --git a/travis/dockerfiles/Dockerfile.debian-9 b/travis/dockerfiles/Dockerfile.debian-9 index edf0100b1..3735b38fd 100644 --- a/travis/dockerfiles/Dockerfile.debian-9 +++ b/travis/dockerfiles/Dockerfile.debian-9 @@ -8,6 +8,7 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \ cmake \ libboost-all-dev \ libcln-dev \ + libeigen3-dev \ libgmp-dev \ libginac-dev \ automake \ diff --git a/travis/dockerfiles/Dockerfile.ubuntu-16.10 b/travis/dockerfiles/Dockerfile.ubuntu-16.10 index 966857553..a612faccb 100644 --- a/travis/dockerfiles/Dockerfile.ubuntu-16.10 +++ b/travis/dockerfiles/Dockerfile.ubuntu-16.10 @@ -8,6 +8,7 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \ cmake \ libboost-all-dev \ libcln-dev \ + libeigen3-dev \ libgmp-dev \ libginac-dev \ automake \ From ff6037ed795248699403780516c49b46cd1d3eb5 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 16:38:59 +0200 Subject: [PATCH 075/110] Use master branch for carl again --- travis/dockerfiles/build_carl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/dockerfiles/build_carl.sh b/travis/dockerfiles/build_carl.sh index 5c26b307b..fc3d43d22 100755 --- a/travis/dockerfiles/build_carl.sh +++ b/travis/dockerfiles/build_carl.sh @@ -1,6 +1,6 @@ #!/bin/bash echo "Building Carl..." -git clone -b singleton_fix https://github.com/smtrat/carl.git +git clone https://github.com/smtrat/carl.git cd carl mkdir build cd build From afd6c21c7da3936b246cd52c53bda8e7644ba0b0 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 14 Jul 2017 17:04:05 +0200 Subject: [PATCH 076/110] Replaced switch-fallthrough in travis --- travis/build-helper.sh | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index 22f292496..c6f2dff60 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -13,32 +13,36 @@ travis_fold() { # Helper for distinguishing between different runs run() { case "$1" in - Build1) - travis_fold start cmake - # CMake - mkdir build - cd build - cmake .. "${CMAKE_ARGS[@]}" - echo - if [ -f "CMakeFiles/CMakeError.log" ] + Build1 | Build2 | Build3 | Build4) + if [[ "$1" == "Build1" ]] then - echo "Content of CMakeFiles/CMakeError.log:" - cat CMakeFiles/CMakeError.log + # CMake + travis_fold start cmake + mkdir build + cd build + cmake .. "${CMAKE_ARGS[@]}" + echo + if [ -f "CMakeFiles/CMakeError.log" ] + then + echo "Content of CMakeFiles/CMakeError.log:" + cat CMakeFiles/CMakeError.log + fi + echo + cd .. + travis_fold end cmake fi - echo - cd .. - travis_fold end cmake - ;& # fall-through to make step - Build2 | Build3 | Build4) # Make travis_fold start make cd build make -j$N_JOBS travis_fold end make + # Set skip-file if [[ "$1" != "Build4" ]] then touch skip.txt + else + rm -rf skip.txt fi ;; From 1bf272263ffcd65395fa2a68796795a197788a06 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 19 Jul 2017 16:42:55 +0200 Subject: [PATCH 077/110] Decreased timeout for mac in travis once again --- travis/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/build.sh b/travis/build.sh index e46685174..0b7900e70 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -2,7 +2,7 @@ # Inspired by https://github.com/google/fruit N_JOBS=2 -TIMEOUT_MAC=1800 +TIMEOUT_MAC=1600 TIMEOUT_LINUX=2300 OS=$TRAVIS_OS_NAME From c770649f26348b601b1e0b966cfc75e417604f7b Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 19 Jul 2017 16:47:28 +0200 Subject: [PATCH 078/110] Increased caching timeout in travis --- .travis.yml | 2 +- travis/generate_travis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb8727e75..731783ddf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ language: cpp # Enable caching cache: - timeout: 600 + timeout: 1000 directories: - build - travis/mtime_cache diff --git a/travis/generate_travis.py b/travis/generate_travis.py index c54e947fe..0f52bb550 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -44,7 +44,7 @@ if __name__ == "__main__": s += "\n" s += "# Enable caching\n" s += "cache:\n" - s += " timeout: 600\n" + s += " timeout: 1000\n" s += " directories:\n" s += " - build\n" s += " - travis/mtime_cache\n" From 38cc9b126581acbe592b691d4a2edd78b5f46294 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 4 Aug 2017 10:27:27 +0200 Subject: [PATCH 079/110] Fixed typo in doc --- src/storm/storage/expressions/Variable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storm/storage/expressions/Variable.h b/src/storm/storage/expressions/Variable.h index 83ee9a13e..8a51df376 100644 --- a/src/storm/storage/expressions/Variable.h +++ b/src/storm/storage/expressions/Variable.h @@ -130,9 +130,9 @@ namespace storm { bool hasRationalType() const; /*! - * Checks whether the variable is of boolean type. + * Checks whether the variable is of numerical type. * - * @return True iff the variable if of boolean type. + * @return True iff the variable if of numerical type. */ bool hasNumericalType() const; From 8ede347fdd612ac9c7aee4039b54874050eb60d5 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 9 Aug 2017 12:02:01 +0200 Subject: [PATCH 080/110] Fixed warning by fixing typo --- src/storm-dft/storage/dft/OrderDFTElementsById.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storm-dft/storage/dft/OrderDFTElementsById.cpp b/src/storm-dft/storage/dft/OrderDFTElementsById.cpp index 8812eb763..72e571ab1 100644 --- a/src/storm-dft/storage/dft/OrderDFTElementsById.cpp +++ b/src/storm-dft/storage/dft/OrderDFTElementsById.cpp @@ -22,12 +22,12 @@ namespace storm { // Explicitly instantiate the class. - template class OrderElementsById; - template class OrderElementsByRank; + template struct OrderElementsById; + template struct OrderElementsByRank; #ifdef STORM_HAVE_CARL - template class OrderElementsById; - template class OrderElementsByRank; + template struct OrderElementsById; + template struct OrderElementsByRank; #endif } } From a1934ce8a9d02f0447ca9baddc8cab0357e35fe9 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 9 Aug 2017 13:27:10 +0200 Subject: [PATCH 081/110] Fixed minor things in README --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ffcc3bc5c..a40a349f8 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ -Storm +Storm ============================== -For more instructions, check out the documentation found in [Getting Started](https://moves-rwth.github.io/storm/getting-started.html) +For more instructions, check out the documentation found in [Getting Started](http://www.stormchecker.org/getting-started.html). Benchmarks ---------------------------- -Example input files for storm can be obtained from +Example input files for Storm can be obtained from https://github.com/moves-rwth/storm-examples. -Running make example-files automatically obtains these files. +Running `make example-files` automatically obtains these files. -Further examples and benchmarks found in the following repositories: +Further examples and benchmarks can be found in the following repositories: * **Prism files** (DTMC, MDP, CTMC): -http://www.prismmodelchecker.org/benchmarks/ +http://www.prismmodelchecker.org/benchmarks * **Jani files** (DTMC, MDP, CTMC, MA): -http://jani-spec.org/ -* **GSPN**s: +http://jani-spec.org +* **GSPN**s: (private, contact: sebastian.junges@cs.rwth-aachen.de) * **DFT**s: https://github.com/moves-rwth/dft-examples @@ -31,8 +31,8 @@ Storm has been developed at RWTH Aachen University. ###### Principal developers * Christian Dehnert -* Joost-Pieter Katoen * Sebastian Junges +* Joost-Pieter Katoen * Matthias Volk ###### Developers (lexicographical order) @@ -40,7 +40,7 @@ Storm has been developed at RWTH Aachen University. * David Korzeniewski * Tim Quatmann -###### Contributors (lexicographical order) +###### Contributors (lexicographical order) * Dimitri Bohlender * Harold Bruintjes * Michael Deutschen From 6edbc52171e812be59625ecf6bc1fee94c71456f Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 9 Aug 2017 15:26:14 +0200 Subject: [PATCH 082/110] Removed remark to non-existing make command in README --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a40a349f8..92214ca57 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,7 @@ Benchmarks ---------------------------- Example input files for Storm can be obtained from -https://github.com/moves-rwth/storm-examples. -Running `make example-files` automatically obtains these files. +https://github.com/moves-rwth/storm-examples. Further examples and benchmarks can be found in the following repositories: From c639f39076d14d063678e74ac6acf76838234f9f Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 10 Aug 2017 15:10:40 +0200 Subject: [PATCH 083/110] require carl version 17.08 --- resources/3rdparty/CMakeLists.txt | 2 +- resources/3rdparty/carl/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index b8b9ba12a..243c0b0e5 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -200,7 +200,7 @@ include(${STORM_3RDPARTY_SOURCE_DIR}/include_cudd.cmake) set(STORM_HAVE_CARL OFF) set(CARL_MINYEAR 17) -set(CARL_MINMONTH 06) +set(CARL_MINMONTH 08) set(CARL_MINPATCH 0) if(USE_CARL) if (NOT STORM_FORCE_SHIPPED_CARL) diff --git a/resources/3rdparty/carl/CMakeLists.txt b/resources/3rdparty/carl/CMakeLists.txt index cba8492dc..b41ed3785 100644 --- a/resources/3rdparty/carl/CMakeLists.txt +++ b/resources/3rdparty/carl/CMakeLists.txt @@ -8,7 +8,7 @@ message(STORM_3RDPARTY_BINARY_DIR: ${STORM_3RDPARTY_BINARY_DIR}) ExternalProject_Add(carl-config GIT_REPOSITORY https://github.com/smtrat/carl - GIT_TAG master + GIT_TAG 17.08 PREFIX here SOURCE_DIR source_dir BINARY_DIR ${STORM_3RDPARTY_BINARY_DIR}/carl From 8aaa205c5711225d261cd86e23a4e7283796b5d9 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 10:42:01 +0200 Subject: [PATCH 084/110] Added travis build status to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 92214ca57..921983387 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ Storm ============================== +[![Build Status](https://travis-ci.org/moves-rwth/storm.svg?branch=master)](https://travis-ci.org/moves-rwth/storm) For more instructions, check out the documentation found in [Getting Started](http://www.stormchecker.org/getting-started.html). From 05e97917aa898a6732eca6200b6baa05c5a9a037 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 10:54:56 +0200 Subject: [PATCH 085/110] Enable travis support for stable branch --- .travis.yml | 1 + travis/generate_travis.py | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 731783ddf..779e5bb69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ branches: only: - master + - stable dist: trusty language: cpp diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 0f52bb550..5ace5a47c 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -39,6 +39,7 @@ if __name__ == "__main__": s += "branches:\n" s += " only:\n" s += " - master\n" + s += " - stable\n" s += "dist: trusty\n" s += "language: cpp\n" s += "\n" From c8734591c3595ffd0633a7561df770ca448eed6a Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 10:55:31 +0200 Subject: [PATCH 086/110] Enable travis notifications --- .travis.yml | 7 +++++++ travis/generate_travis.py | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 779e5bb69..3d0168555 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,13 @@ services: - docker sudo: required +notifications: + email: + on_failure: always + on_success: change + recipients: + secure: "Q9CW/PtyWkZwExDrfFFb9n1STGYsRfI6awv1bZHcGwfrDvhpXoMCuF8CwviIfilm7fFJJEoKizTtdRpY0HrOnY/8KY111xrtcFYosxdndv7xbESodIxQOUoIEFCO0mCNHwWYisoi3dAA7H3Yn661EsxluwHjzX5vY0xSbw0n229hlsFz092HwGLSU33zHl7eXpQk+BOFmBTRGlOq9obtDZ17zbHz1oXFZntHK/JDUIYP0b0uq8NvE2jM6CIVdcuSwmIkOhZJoO2L3Py3rBbPci+L2PSK4Smv2UjCPF8KusnOaFIyDB3LcNM9Jqq5ssJMrK/KaO6BiuYrOZXYWZ7KEg3Y/naC8HjOH1dzty+P7oW46sb9F03pTsufqD4R7wcK+9wROTztO6aJPDG/IPH7EWgrBTxqlOkVRwi2eYuQouZpZUW6EMClKbMHMIxCH2S8aOk/r1w2cNwmPEcunnP0nl413x/ByHr4fTPFykPj8pQxIsllYjpdWBRQfDOauKWGzk6LcrFW0qpWP+/aJ2vYu/IoZQMG5lMHbp6Y1Lg09pYm7Q983v3b7D+JvXhOXMyGq91HyPahA2wwKoG1GA4uoZ2I95/IFYNiKkelDd3WTBoFLNF9YFoEJNdCywm1fO2WY4WkyEFBuQcgDA+YpFMJJMxjTbivYk9jvHk2gji//2w=" + # # Configurations # diff --git a/travis/generate_travis.py b/travis/generate_travis.py index 5ace5a47c..bafb15c1d 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -55,6 +55,14 @@ if __name__ == "__main__": s += "- docker\n" s += "sudo: required\n" s += "\n" + + s += "notifications:\n" + s += " email:\n" + s += " on_failure: always\n" + s += " on_success: change\n" + s += " recipients:\n" + s += ' secure: "Q9CW/PtyWkZwExDrfFFb9n1STGYsRfI6awv1bZHcGwfrDvhpXoMCuF8CwviIfilm7fFJJEoKizTtdRpY0HrOnY/8KY111xrtcFYosxdndv7xbESodIxQOUoIEFCO0mCNHwWYisoi3dAA7H3Yn661EsxluwHjzX5vY0xSbw0n229hlsFz092HwGLSU33zHl7eXpQk+BOFmBTRGlOq9obtDZ17zbHz1oXFZntHK/JDUIYP0b0uq8NvE2jM6CIVdcuSwmIkOhZJoO2L3Py3rBbPci+L2PSK4Smv2UjCPF8KusnOaFIyDB3LcNM9Jqq5ssJMrK/KaO6BiuYrOZXYWZ7KEg3Y/naC8HjOH1dzty+P7oW46sb9F03pTsufqD4R7wcK+9wROTztO6aJPDG/IPH7EWgrBTxqlOkVRwi2eYuQouZpZUW6EMClKbMHMIxCH2S8aOk/r1w2cNwmPEcunnP0nl413x/ByHr4fTPFykPj8pQxIsllYjpdWBRQfDOauKWGzk6LcrFW0qpWP+/aJ2vYu/IoZQMG5lMHbp6Y1Lg09pYm7Q983v3b7D+JvXhOXMyGq91HyPahA2wwKoG1GA4uoZ2I95/IFYNiKkelDd3WTBoFLNF9YFoEJNdCywm1fO2WY4WkyEFBuQcgDA+YpFMJJMxjTbivYk9jvHk2gji//2w="\n' + s += "\n" s += "#\n" s += "# Configurations\n" s += "#\n" From 49447da43d97eb91d9b112dec20ec42f13abb747 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 10:56:43 +0200 Subject: [PATCH 087/110] Disable Debian in travis as there was no difference to Ubuntu --- .travis.yml | 127 -------------------------------------- travis/generate_travis.py | 2 +- 2 files changed, 1 insertion(+), 128 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d0168555..c824cddf6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,33 +89,6 @@ jobs: - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - # debian-9 - - stage: Build (1st run) - os: linux - compiler: gcc - env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 - install: - - rm -rf build - - travis/install_linux.sh - script: - - travis/build.sh Build1 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; - - stage: Build (1st run) - os: linux - compiler: gcc - env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 - install: - - rm -rf build - - travis/install_linux.sh - script: - - travis/build.sh Build1 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Build (2nd run) @@ -167,31 +140,6 @@ jobs: - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - # debian-9 - - stage: Build (2nd run) - os: linux - compiler: gcc - env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh Build2 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; - - stage: Build (2nd run) - os: linux - compiler: gcc - env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh Build2 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Build (3rd run) @@ -243,31 +191,6 @@ jobs: - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - # debian-9 - - stage: Build (3rd run) - os: linux - compiler: gcc - env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh Build3 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; - - stage: Build (3rd run) - os: linux - compiler: gcc - env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh Build3 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Build (4th run) @@ -319,31 +242,6 @@ jobs: - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - # debian-9 - - stage: Build (4th run) - os: linux - compiler: gcc - env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh Build4 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; - - stage: Build (4th run) - os: linux - compiler: gcc - env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh Build4 - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; ### # Stage: Test all @@ -395,29 +293,4 @@ jobs: - docker cp storm:/storm/. . after_failure: - find build -iname '*err*.log' -type f -print -exec cat {} \; - # debian-9 - - stage: Test all - os: linux - compiler: gcc - env: CONFIG=DefaultDebug LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh TestAll - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; - - stage: Test all - os: linux - compiler: gcc - env: CONFIG=DefaultRelease LINUX=debian-9 COMPILER=gcc-6 - install: - - travis/install_linux.sh - script: - - travis/build.sh TestAll - before_cache: - - docker cp storm:/storm/. . - after_failure: - - find build -iname '*err*.log' -type f -print -exec cat {} \; diff --git a/travis/generate_travis.py b/travis/generate_travis.py index bafb15c1d..c47afac0c 100644 --- a/travis/generate_travis.py +++ b/travis/generate_travis.py @@ -3,7 +3,7 @@ configs_linux = [ # OS, compiler ("ubuntu-16.10", "gcc", "-6"), - ("debian-9", "gcc", "-6"), + #("debian-9", "gcc", "-6"), ] # Configurations for Mac From c903f738b3b06a271e9d8d663b7b0bab505306a1 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 11:34:46 +0200 Subject: [PATCH 088/110] Fixed some typos --- .../transformer/SparseParametricModelSimplifier.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/storm-pars/transformer/SparseParametricModelSimplifier.cpp b/src/storm-pars/transformer/SparseParametricModelSimplifier.cpp index 1679bdcca..9385a24a9 100644 --- a/src/storm-pars/transformer/SparseParametricModelSimplifier.cpp +++ b/src/storm-pars/transformer/SparseParametricModelSimplifier.cpp @@ -45,7 +45,7 @@ namespace storm { } } // reaching this point means that the provided formula is not supported. Thus, no simplification is possible. - STORM_LOG_DEBUG("Simplification not possible because the formula is not suppoerted. Formula: " << formula); + STORM_LOG_DEBUG("Simplification not possible because the formula is not supported. Formula: " << formula); return false; } @@ -63,8 +63,8 @@ namespace storm { template bool SparseParametricModelSimplifier::simplifyForUntilProbabilities(storm::logic::ProbabilityOperatorFormula const& formula) { - // If this method was not overriden by any subclass, simplification is not possible - STORM_LOG_DEBUG("Simplification not possible because the formula is not suppoerted. Formula: " << formula); + // If this method was not overridden by any subclass, simplification is not possible + STORM_LOG_DEBUG("Simplification not possible because the formula is not supported. Formula: " << formula); return false; } @@ -77,21 +77,21 @@ namespace storm { template bool SparseParametricModelSimplifier::simplifyForBoundedUntilProbabilities(storm::logic::ProbabilityOperatorFormula const& formula) { - // If this method was not overriden by any subclass, simplification is not possible + // If this method was not overridden by any subclass, simplification is not possible STORM_LOG_DEBUG("Simplification not possible because the formula is not supported. Formula: " << formula); return false; } template bool SparseParametricModelSimplifier::simplifyForReachabilityRewards(storm::logic::RewardOperatorFormula const& formula) { - // If this method was not overriden by any subclass, simplification is not possible + // If this method was not overridden by any subclass, simplification is not possible STORM_LOG_DEBUG("Simplification not possible because the formula is not supported. Formula: " << formula); return false; } template bool SparseParametricModelSimplifier::simplifyForCumulativeRewards(storm::logic::RewardOperatorFormula const& formula) { - // If this method was not overriden by any subclass, simplification is not possible + // If this method was not overridden by any subclass, simplification is not possible STORM_LOG_DEBUG("Simplification not possible because the formula is not supported. Formula: " << formula); return false; } @@ -100,7 +100,6 @@ namespace storm { std::shared_ptr SparseParametricModelSimplifier::eliminateConstantDeterministicStates(SparseModelType const& model, storm::storage::BitVector const& consideredStates, boost::optional const& rewardModelName) { storm::storage::SparseMatrix const& sparseMatrix = model.getTransitionMatrix(); - // get the action-based reward values std::vector actionRewards; if(rewardModelName) { From 2dba64705ec6502d01b226dd0d61c403570cb25c Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 14:36:28 +0200 Subject: [PATCH 089/110] Removed redundant info in CHANGELOG --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c72cd28..7c55d776d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ The releases of major and minor versions contain an overview of changes since th Version 1.1.x ------------- -Long run average computation via LRA, LP based MDP model checking, parametric model checking has an own binary ### Version 1.1.0 (2017/8) From 1c2c4eb6123c7e42127d2fe08bdb78b8a83ab5ac Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 11 Aug 2017 14:54:07 +0200 Subject: [PATCH 090/110] Added subtitle to README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 921983387..a415b376e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -Storm -============================== +Storm - A Modern Probabilistic Model Checker +============================================ [![Build Status](https://travis-ci.org/moves-rwth/storm.svg?branch=master)](https://travis-ci.org/moves-rwth/storm) For more instructions, check out the documentation found in [Getting Started](http://www.stormchecker.org/getting-started.html). From bf6258bd868d3f3e75a813b0c7c6c8dd2a33c059 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 14:53:11 +0200 Subject: [PATCH 091/110] builder options have uniform signature --- src/storm/builder/BuilderOptions.cpp | 8 ++++---- src/storm/builder/BuilderOptions.h | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/storm/builder/BuilderOptions.cpp b/src/storm/builder/BuilderOptions.cpp index 6e42745fd..b0d2641bd 100644 --- a/src/storm/builder/BuilderOptions.cpp +++ b/src/storm/builder/BuilderOptions.cpp @@ -157,8 +157,8 @@ namespace storm { return buildAllLabels; } - BuilderOptions& BuilderOptions::setBuildAllRewardModels() { - buildAllRewardModels = true; + BuilderOptions& BuilderOptions::setBuildAllRewardModels(bool newValue) { + buildAllRewardModels = newValue; return *this; } @@ -185,8 +185,8 @@ namespace storm { return *this; } - BuilderOptions& BuilderOptions::setBuildAllLabels() { - buildAllLabels = true; + BuilderOptions& BuilderOptions::setBuildAllLabels(bool newValue) { + buildAllLabels = newValue; return *this; } diff --git a/src/storm/builder/BuilderOptions.h b/src/storm/builder/BuilderOptions.h index a06de50eb..28660e4b5 100644 --- a/src/storm/builder/BuilderOptions.h +++ b/src/storm/builder/BuilderOptions.h @@ -97,17 +97,17 @@ namespace storm { bool isExplorationShowProgressSet() const; uint64_t getExplorationShowProgressDelay() const; - BuilderOptions& setBuildAllRewardModels(); + BuilderOptions& setBuildAllRewardModels(bool newValue = true); BuilderOptions& addRewardModel(std::string const& rewardModelName); - BuilderOptions& setBuildAllLabels(); + BuilderOptions& setBuildAllLabels(bool newValue = true); BuilderOptions& addLabel(storm::expressions::Expression const& expression); BuilderOptions& addLabel(std::string const& labelName); BuilderOptions& addTerminalExpression(storm::expressions::Expression const& expression, bool value); BuilderOptions& addTerminalLabel(std::string const& label, bool value); - BuilderOptions& setBuildChoiceLabels(bool newValue); - BuilderOptions& setBuildStateValuations(bool newValue); - BuilderOptions& setBuildChoiceOrigins(bool newValue); - BuilderOptions& setExplorationChecks(bool newValue); + BuilderOptions& setBuildChoiceLabels(bool newValue = true); + BuilderOptions& setBuildStateValuations(bool newValue = true); + BuilderOptions& setBuildChoiceOrigins(bool newValue = true); + BuilderOptions& setExplorationChecks(bool newValue = true); private: /// A flag that indicates whether all reward models are to be built. In this case, the reward model names are From 98d124bd06269129a0044945e257da0860607d60 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 15:35:35 +0200 Subject: [PATCH 092/110] As the builder options now occur in the API, we should improve their documentation. --- src/storm/builder/BuilderOptions.h | 51 ++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/src/storm/builder/BuilderOptions.h b/src/storm/builder/BuilderOptions.h index 28660e4b5..f3a6edfbf 100644 --- a/src/storm/builder/BuilderOptions.h +++ b/src/storm/builder/BuilderOptions.h @@ -81,9 +81,21 @@ namespace storm { * model. */ void setTerminalStatesFromFormula(storm::logic::Formula const& formula); - + + /*! + * Which reward models are built + * @return + */ std::vector const& getRewardModelNames() const; + /*! + * Which labels are built + * @return + */ std::set const& getLabelNames() const; + /*! + * Which expression labels are built + * @return + */ std::vector const& getExpressionLabels() const; std::vector> const& getTerminalStates() const; bool hasTerminalStates() const; @@ -96,17 +108,52 @@ namespace storm { bool isExplorationChecksSet() const; bool isExplorationShowProgressSet() const; uint64_t getExplorationShowProgressDelay() const; - + + /** + * Should all reward models be built? If not set, only required reward models are build. + * @param newValue The new value (default true) + * @return this + */ BuilderOptions& setBuildAllRewardModels(bool newValue = true); + /** + * Add an additional reward model to build + * @param newValue The name of the extra reward model + * @return this + */ BuilderOptions& addRewardModel(std::string const& rewardModelName); + /** + * Should all reward models be built? If not set, only required reward models are build. + * @param newValue The new value (default true) + * @return this + */ BuilderOptions& setBuildAllLabels(bool newValue = true); BuilderOptions& addLabel(storm::expressions::Expression const& expression); BuilderOptions& addLabel(std::string const& labelName); BuilderOptions& addTerminalExpression(storm::expressions::Expression const& expression, bool value); BuilderOptions& addTerminalLabel(std::string const& label, bool value); + /** + * Should the choice labels be built? + * @param newValue The new value (default true) + * @return this + */ BuilderOptions& setBuildChoiceLabels(bool newValue = true); + /** + * Should the state valuation mapping be built? + * @param newValue The new value (default true) + * @return this + */ BuilderOptions& setBuildStateValuations(bool newValue = true); + /** + * Should the origins the different choices be built? + * @param newValue The new value (default true) + * @return this + */ BuilderOptions& setBuildChoiceOrigins(bool newValue = true); + /** + * Should extra checks be performed during exploration + * @param newValue The new value (default true) + * @return this + */ BuilderOptions& setExplorationChecks(bool newValue = true); private: From 2c2dc5acd89bcdeecf96d2640b6c0096b700bf68 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 15:36:47 +0200 Subject: [PATCH 093/110] Changed API such that the command line settings do not occur in the settings anymore. Moreover, to prevent having 15 Boolean arguments, the build options are now part of the API. --- src/storm/api/builder.h | 35 ++++++++++++++--------------------- src/storm/cli/cli.cpp | 30 +++++++++++++++++++----------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/storm/api/builder.h b/src/storm/api/builder.h index 868c47bba..ca21f99fc 100644 --- a/src/storm/api/builder.h +++ b/src/storm/api/builder.h @@ -23,10 +23,6 @@ #include "storm/builder/ExplicitModelBuilder.h" #include "storm/builder/jit/ExplicitJitJaniModelBuilder.h" -#include "storm/settings/SettingsManager.h" -#include "storm/settings/modules/IOSettings.h" -#include "storm/settings/modules/JitBuilderSettings.h" - #include "storm/utility/macros.h" #include "storm/exceptions/NotSupportedException.h" @@ -62,29 +58,18 @@ namespace storm { } template - std::shared_ptr> buildSparseModel(storm::storage::SymbolicModelDescription const& model, std::vector> const& formulas, bool buildChoiceLabels = false, bool buildChoiceOrigins = false, bool buildStateValuations = false) { - storm::builder::BuilderOptions options(formulas); - - if (storm::settings::getModule().isBuildFullModelSet()) { - options.setBuildAllLabels(); - options.setBuildAllRewardModels(); - options.clearTerminalStates(); - } - options.setBuildChoiceLabels(buildChoiceLabels); - options.setBuildChoiceOrigins(buildChoiceOrigins); - options.setBuildStateValuations(buildStateValuations); - - if (storm::settings::getModule().isJitSet()) { + std::shared_ptr> buildSparseModel(storm::storage::SymbolicModelDescription const& model, storm::builder::BuilderOptions const& options, bool jit = false, bool doctor = false) { + if (jit) { STORM_LOG_THROW(model.isJaniModel(), storm::exceptions::NotSupportedException, "Cannot use JIT-based model builder for non-JANI model."); - + storm::builder::jit::ExplicitJitJaniModelBuilder builder(model.asJaniModel(), options); - - if (storm::settings::getModule().isDoctorSet()) { + + if (doctor) { bool result = builder.doctor(); STORM_LOG_THROW(result, storm::exceptions::NotSupportedException, "The JIT-based model builder cannot be used on your system."); STORM_LOG_INFO("The JIT-based model builder seems to be working."); } - + return builder.build(); } else { std::shared_ptr> generator; @@ -99,6 +84,14 @@ namespace storm { return builder.build(); } } + + template + std::shared_ptr> buildSparseModel(storm::storage::SymbolicModelDescription const& model, std::vector> const& formulas, bool jit = false, bool doctor = false) { + storm::builder::BuilderOptions options(formulas); + return buildSparseModel(model, options, jit, doctor); + + + } template> std::shared_ptr> buildSparseModel(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents&& components) { diff --git a/src/storm/cli/cli.cpp b/src/storm/cli/cli.cpp index 343006c6d..42a76a7b2 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm/cli/cli.cpp @@ -4,34 +4,34 @@ #include "storm/models/ModelBase.h" -#include "storm/settings/modules/DebugSettings.h" -#include "storm/settings/modules/IOSettings.h" -#include "storm/settings/modules/CoreSettings.h" #include "storm/exceptions/OptionParserException.h" -#include "storm/settings/modules/ResourceSettings.h" -#include "storm/settings/modules/JaniExportSettings.h" #include "storm/modelchecker/results/SymbolicQualitativeCheckResult.h" #include "storm/models/sparse/StandardRewardModel.h" #include "storm/models/symbolic/StandardRewardModel.h" +#include "storm/settings/SettingsManager.h" +#include "storm/settings/modules/ResourceSettings.h" +#include "storm/settings/modules/JitBuilderSettings.h" +#include "storm/settings/modules/DebugSettings.h" +#include "storm/settings/modules/IOSettings.h" +#include "storm/settings/modules/CoreSettings.h" +#include "storm/settings/modules/ResourceSettings.h" +#include "storm/settings/modules/JaniExportSettings.h" + #include "storm/utility/resources.h" #include "storm/utility/file.h" #include "storm/utility/storm-version.h" -#include "storm/utility/cli.h" +#include "storm/utility/macros.h" #include "storm/utility/initialize.h" #include "storm/utility/Stopwatch.h" -#include "storm/settings/SettingsManager.h" -#include "storm/settings/modules/ResourceSettings.h" - #include #include "storm/api/storm.h" -#include "storm/utility/macros.h" // Includes for the linked libraries and versions header. #ifdef STORM_HAVE_INTELTBB @@ -370,7 +370,15 @@ namespace storm { template std::shared_ptr buildModelSparse(SymbolicInput const& input, storm::settings::modules::IOSettings const& ioSettings) { auto counterexampleGeneratorSettings = storm::settings::getModule(); - return storm::api::buildSparseModel(input.model.get(), createFormulasToRespect(input.properties), ioSettings.isBuildChoiceLabelsSet(), counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet()); + storm::builder::BuilderOptions options(createFormulasToRespect(input.properties)); + options.setBuildChoiceLabels(ioSettings.isBuildChoiceLabelsSet()); + options.setBuildChoiceOrigins(counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet()); + options.setBuildAllLabels(ioSettings.isBuildFullModelSet()); + options.setBuildAllRewardModels(ioSettings.isBuildFullModelSet()); + if (ioSettings.isBuildFullModelSet()) { + options.clearTerminalStates(); + } + return storm::api::buildSparseModel(input.model.get(), options, ioSettings.isJitSet(), storm::settings::getModule().isDoctorSet()); } template From e718acffba9bd6fa47efe144551bfa978824bb3c Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 17:18:08 +0200 Subject: [PATCH 094/110] move cli stuff from storm lib to an own small lib --- src/CMakeLists.txt | 1 + src/storm-cli-utilities/CMakeLists.txt | 40 +++++++++++++++++++ .../cli => storm-cli-utilities}/cli.cpp | 6 +-- src/{storm/cli => storm-cli-utilities}/cli.h | 0 src/storm-dft-cli/CMakeLists.txt | 2 +- src/storm-dft-cli/storm-dyftee.cpp | 4 +- .../modelchecker/dft/DFTModelChecker.cpp | 2 + src/storm-gspn-cli/CMakeLists.txt | 2 +- src/storm-gspn-cli/storm-gspn.cpp | 4 +- src/storm-pgcl-cli/CMakeLists.txt | 2 +- src/storm-pgcl-cli/storm-pgcl.cpp | 2 +- src/storm/CMakeLists.txt | 2 +- src/storm/storm.cpp | 2 +- 13 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 src/storm-cli-utilities/CMakeLists.txt rename src/{storm/cli => storm-cli-utilities}/cli.cpp (99%) rename src/{storm/cli => storm-cli-utilities}/cli.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 38b884cf7..acf819119 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) add_custom_target(binaries) add_subdirectory(storm) +add_subdirectory(storm-cli-utilities) add_subdirectory(storm-pgcl) add_subdirectory(storm-pgcl-cli) add_subdirectory(storm-gspn) diff --git a/src/storm-cli-utilities/CMakeLists.txt b/src/storm-cli-utilities/CMakeLists.txt new file mode 100644 index 000000000..64c2848c7 --- /dev/null +++ b/src/storm-cli-utilities/CMakeLists.txt @@ -0,0 +1,40 @@ +file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm-cli-utilities/*.h ${PROJECT_SOURCE_DIR}/src/storm-cli-utilities/*.cpp) + +register_source_groups_from_filestructure("${ALL_FILES}" storm-cli-utilities) + + + +file(GLOB_RECURSE STORM_CLI_UTIL_SOURCES ${PROJECT_SOURCE_DIR}/src/storm-cli-utilities/*.cpp) +file(GLOB_RECURSE STORM_CLI_UTIL_HEADERS ${PROJECT_SOURCE_DIR}/src/storm-cli-utilities/*.h) + + +# Create storm-pars. +add_library(storm-cli-utilities SHARED ${STORM_CLI_UTIL_SOURCES} ${STORM_CLI_UTIL_HEADERS}) + +# Remove define symbol for shared libstorm. +set_target_properties(storm-cli-utilities PROPERTIES DEFINE_SYMBOL "") +#add_dependencies(storm resources) +list(APPEND STORM_TARGETS storm-cli-utilities) +set(STORM_TARGETS ${STORM_TARGETS} PARENT_SCOPE) + +target_link_libraries(storm-cli-utilities PUBLIC storm) + +# Install storm headers to include directory. +foreach(HEADER ${STORM_CLI_UTIL_HEADERS}) + string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER}) + string(REGEX MATCH "(.*)[/\\]" RELATIVE_DIRECTORY ${RELATIVE_HEADER_PATH}) + string(REGEX REPLACE "${RELATIVE_DIRECTORY}/?" "" HEADER_FILENAME ${RELATIVE_HEADER_PATH}) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY}${HEADER_FILENAME} + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY} + COMMAND ${CMAKE_COMMAND} -E copy ${HEADER} ${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY}${HEADER_FILENAME} + DEPENDS ${HEADER} + ) + list(APPEND STORM_CLI_UTIL_OUTPUT_HEADERS "${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY}${HEADER_FILENAME}") +endforeach() +add_custom_target(copy_storm_cli_util_headers DEPENDS ${STORM_CLI_UTIL_OUTPUT_HEADERS} ${STORM_CLI_UTIL_HEADERS}) +add_dependencies(storm-cli-utilities copy_storm_pars_headers) + +# installation +install(TARGETS storm-cli-utilities RUNTIME DESTINATION bin LIBRARY DESTINATION lib OPTIONAL) + diff --git a/src/storm/cli/cli.cpp b/src/storm-cli-utilities/cli.cpp similarity index 99% rename from src/storm/cli/cli.cpp rename to src/storm-cli-utilities/cli.cpp index 42a76a7b2..66d83ece7 100644 --- a/src/storm/cli/cli.cpp +++ b/src/storm-cli-utilities/cli.cpp @@ -1,4 +1,4 @@ -#include "storm/cli/cli.h" +#include "cli.h" #include "storm/storage/SymbolicModelDescription.h" @@ -65,12 +65,12 @@ namespace storm { storm::utility::setUp(); storm::cli::printHeader("Storm", argc, argv); storm::settings::initializeAll("Storm", "storm"); - + storm::utility::Stopwatch totalTimer(true); if (!storm::cli::parseOptions(argc, argv)) { return -1; } - + processOptions(); totalTimer.stop(); diff --git a/src/storm/cli/cli.h b/src/storm-cli-utilities/cli.h similarity index 100% rename from src/storm/cli/cli.h rename to src/storm-cli-utilities/cli.h diff --git a/src/storm-dft-cli/CMakeLists.txt b/src/storm-dft-cli/CMakeLists.txt index 0d104405e..b8cdbbd27 100644 --- a/src/storm-dft-cli/CMakeLists.txt +++ b/src/storm-dft-cli/CMakeLists.txt @@ -1,6 +1,6 @@ # Create storm-dft. add_executable(storm-dft-cli ${PROJECT_SOURCE_DIR}/src/storm-dft-cli/storm-dyftee.cpp) -target_link_libraries(storm-dft-cli storm-dft) # Adding headers for xcode +target_link_libraries(storm-dft-cli storm-dft storm-cli-utilities) # Adding headers for xcode set_target_properties(storm-dft-cli PROPERTIES OUTPUT_NAME "storm-dft") add_dependencies(binaries storm-dft-cli) diff --git a/src/storm-dft-cli/storm-dyftee.cpp b/src/storm-dft-cli/storm-dyftee.cpp index b2dc40006..8eef6f0b5 100644 --- a/src/storm-dft-cli/storm-dyftee.cpp +++ b/src/storm-dft-cli/storm-dyftee.cpp @@ -1,12 +1,12 @@ #include "storm/logic/Formula.h" #include "storm/utility/initialize.h" #include "storm/api/storm.h" -#include "storm/cli/cli.h" +#include "storm-cli-utilities/cli.h" #include "storm/exceptions/BaseException.h" #include "storm/logic/Formula.h" -#include "storm/settings/modules/GeneralSettings.h" +#include "storm/settings/modules/IOSettings.h" #include "storm/settings/modules/CoreSettings.h" #include "storm/settings/modules/DebugSettings.h" #include "storm/settings/modules/GmmxxEquationSolverSettings.h" diff --git a/src/storm-dft/modelchecker/dft/DFTModelChecker.cpp b/src/storm-dft/modelchecker/dft/DFTModelChecker.cpp index 8721efd7c..d6b7e9138 100644 --- a/src/storm-dft/modelchecker/dft/DFTModelChecker.cpp +++ b/src/storm-dft/modelchecker/dft/DFTModelChecker.cpp @@ -1,5 +1,6 @@ #include "DFTModelChecker.h" +#include "storm/settings/modules/IOSettings.h" #include "storm/builder/ParallelCompositionBuilder.h" #include "storm/utility/bitoperations.h" #include "storm/utility/DirectEncodingExporter.h" @@ -357,6 +358,7 @@ namespace storm { explorationTimer.stop(); // Export the model if required + // TODO move this outside of the model checker? if (storm::settings::getModule().isExportExplicitSet()) { std::ofstream stream; storm::utility::openFile(storm::settings::getModule().getExportExplicitFilename(), stream); diff --git a/src/storm-gspn-cli/CMakeLists.txt b/src/storm-gspn-cli/CMakeLists.txt index 72e51a6da..39d656a4c 100644 --- a/src/storm-gspn-cli/CMakeLists.txt +++ b/src/storm-gspn-cli/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(storm-gspn-cli ${PROJECT_SOURCE_DIR}/src/storm-gspn-cli/storm-gspn.cpp) -target_link_libraries(storm-gspn-cli storm-gspn) # Adding headers for xcode +target_link_libraries(storm-gspn-cli storm-gspn storm-cli-utilities) # Adding headers for xcode set_target_properties(storm-gspn-cli PROPERTIES OUTPUT_NAME "storm-gspn") add_dependencies(binaries storm-gspn-cli) diff --git a/src/storm-gspn-cli/storm-gspn.cpp b/src/storm-gspn-cli/storm-gspn.cpp index 9a77a56be..fc493391a 100644 --- a/src/storm-gspn-cli/storm-gspn.cpp +++ b/src/storm-gspn-cli/storm-gspn.cpp @@ -12,7 +12,7 @@ #include "storm/utility/initialize.h" #include "api/storm.h" -#include "storm/cli/cli.h" +#include "storm-cli-utilities/cli.h" #include "storm/parser/FormulaParser.h" @@ -27,7 +27,7 @@ #include "storm/exceptions/FileIoException.h" -#include "storm/settings/modules/GeneralSettings.h" +#include "storm/settings/modules/IOSettings.h" #include "storm/settings/modules/GSPNSettings.h" #include "storm/settings/modules/GSPNExportSettings.h" #include "storm/settings/modules/CoreSettings.h" diff --git a/src/storm-pgcl-cli/CMakeLists.txt b/src/storm-pgcl-cli/CMakeLists.txt index 0f051a1b4..4778d1e93 100644 --- a/src/storm-pgcl-cli/CMakeLists.txt +++ b/src/storm-pgcl-cli/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(storm-pgcl-cli ${PROJECT_SOURCE_DIR}/src/storm-pgcl-cli/storm-pgcl.cpp) -target_link_libraries(storm-pgcl-cli storm-pgcl) +target_link_libraries(storm-pgcl-cli storm-pgcl storm-cli-utilities) set_target_properties(storm-pgcl-cli PROPERTIES OUTPUT_NAME "storm-pgcl") # installation diff --git a/src/storm-pgcl-cli/storm-pgcl.cpp b/src/storm-pgcl-cli/storm-pgcl.cpp index 423afb087..ce579938f 100644 --- a/src/storm-pgcl-cli/storm-pgcl.cpp +++ b/src/storm-pgcl-cli/storm-pgcl.cpp @@ -2,7 +2,7 @@ #include "logic/Formula.h" #include "utility/initialize.h" -#include "storm/cli/cli.h" +#include "storm-cli-utilities/cli.h" #include "storm/exceptions/BaseException.h" #include "storm/utility/macros.h" #include diff --git a/src/storm/CMakeLists.txt b/src/storm/CMakeLists.txt index 193a6d4bb..0ed4b0d1c 100644 --- a/src/storm/CMakeLists.txt +++ b/src/storm/CMakeLists.txt @@ -49,7 +49,7 @@ set(STORM_TARGETS ${STORM_TARGETS} PARENT_SCOPE) # Create storm. add_executable(storm-main ${STORM_MAIN_SOURCES} ${STORM_MAIN_HEADERS}) -target_link_libraries(storm-main PUBLIC storm) +target_link_libraries(storm-main PUBLIC storm storm-cli-utilities) set_target_properties(storm-main PROPERTIES OUTPUT_NAME "storm") # Install storm headers to include directory. diff --git a/src/storm/storm.cpp b/src/storm/storm.cpp index 8e915d6e7..3cba6dd3d 100644 --- a/src/storm/storm.cpp +++ b/src/storm/storm.cpp @@ -1,7 +1,7 @@ #include "storm/utility/macros.h" #include "storm/exceptions/BaseException.h" -#include "storm/cli/cli.h" +#include "storm-cli-utilities/cli.h" /*! * Main entry point of the executable storm. From b4a8833e3f5349d68bc3c34ee6650ecb70b59206 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 17:18:37 +0200 Subject: [PATCH 095/110] towards getting rid of code duplication in storm-pars-cli --- src/storm-pars-cli/storm-pars.cpp | 49 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/storm-pars-cli/storm-pars.cpp b/src/storm-pars-cli/storm-pars.cpp index 0836f1e0d..1ff2fabb6 100644 --- a/src/storm-pars-cli/storm-pars.cpp +++ b/src/storm-pars-cli/storm-pars.cpp @@ -6,7 +6,7 @@ #include "storm/settings/SettingsManager.h" #include "storm/api/storm.h" -#include "storm/cli/cli.h" +#include "storm-cli-utilities/cli.h" #include "storm/models/ModelBase.h" #include "storm/storage/SymbolicModelDescription.h" #include "storm/utility/file.h" @@ -23,13 +23,13 @@ #include "storm/exceptions/InvalidSettingsException.h" #include "storm/exceptions/NotSupportedException.h" -#include "storm/cli/cli.cpp" +#include "storm-cli-utilities/cli.cpp" namespace storm { namespace pars { typedef typename storm::cli::SymbolicInput SymbolicInput; - + template std::shared_ptr buildModelSparse(SymbolicInput const& input, storm::settings::modules::IOSettings const& ioSettings) { return storm::api::buildSparseModel(input.model.get(), storm::api::extractFormulasFromProperties(input.properties), ioSettings.isBuildChoiceLabelsSet()); @@ -50,7 +50,7 @@ namespace storm { STORM_LOG_THROW(engine == storm::settings::modules::CoreSettings::Engine::Sparse, storm::exceptions::InvalidSettingsException, "Can only use sparse engine with explicit input."); result = storm::cli::buildModelExplicit(ioSettings); } - + modelBuildingWatch.stop(); if (result) { STORM_PRINT_AND_LOG("Time for model construction: " << modelBuildingWatch << "." << std::endl << std::endl); @@ -335,27 +335,7 @@ namespace storm { processInputWithValueTypeAndDdlib(symbolicInput); } - - int64_t process(const int argc, const char** argv) { - storm::utility::setUp(); - storm::cli::printHeader("Storm-pars", argc, argv); - storm::settings::initializeParsSettings("Storm-pars", "storm-pars"); - - storm::utility::Stopwatch totalTimer(true); - if (!storm::cli::parseOptions(argc, argv)) { - return -1; - } - - processOptions(); - - totalTimer.stop(); - if (storm::settings::getModule().isPrintTimeAndMemorySet()) { - storm::cli::printTimeAndMemoryStatistics(totalTimer.getTimeInMilliseconds()); - } - - storm::utility::cleanUp(); - return 0; - } + } } @@ -366,7 +346,24 @@ namespace storm { int main(const int argc, const char** argv) { try { - return storm::pars::process(argc, argv); + storm::utility::setUp(); + storm::cli::printHeader("Storm-pars", argc, argv); + storm::settings::initializeParsSettings("Storm-pars", "storm-pars"); + + storm::utility::Stopwatch totalTimer(true); + if (!storm::cli::parseOptions(argc, argv)) { + return -1; + } + + storm::pars::processOptions(); + + totalTimer.stop(); + if (storm::settings::getModule().isPrintTimeAndMemorySet()) { + storm::cli::printTimeAndMemoryStatistics(totalTimer.getTimeInMilliseconds()); + } + + storm::utility::cleanUp(); + return 0; } catch (storm::exceptions::BaseException const& exception) { STORM_LOG_ERROR("An exception caused Storm-pars to terminate. The message of the exception is: " << exception.what()); return 1; From 9e9060ecd73eea5a29a31678b14b65e755d600b2 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Sun, 13 Aug 2017 18:09:37 +0200 Subject: [PATCH 096/110] fix in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c72cd28..66635c85e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The releases of major and minor versions contain an overview of changes since th Version 1.1.x ------------- -Long run average computation via LRA, LP based MDP model checking, parametric model checking has an own binary +Long run average computation via ValueIteration, LP based MDP model checking, parametric model checking has an own binary ### Version 1.1.0 (2017/8) From a994b80931f4f7af8c1a07ccd559b42db86748c1 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 18:58:36 +0200 Subject: [PATCH 097/110] getting rid of outdated carl simple constraint usage --- src/storm/adapters/Smt2ExpressionAdapter.h | 30 +++++----------------- src/storm/analysis/GraphConditions.h | 6 ++--- src/storm/solver/SmtlibSmtSolver.cpp | 27 ------------------- src/storm/solver/SmtlibSmtSolver.h | 12 +++------ 4 files changed, 13 insertions(+), 62 deletions(-) diff --git a/src/storm/adapters/Smt2ExpressionAdapter.h b/src/storm/adapters/Smt2ExpressionAdapter.h index c61566177..f1b96b71e 100644 --- a/src/storm/adapters/Smt2ExpressionAdapter.h +++ b/src/storm/adapters/Smt2ExpressionAdapter.h @@ -38,8 +38,7 @@ namespace storm { std::string translateExpression(storm::expressions::Expression const& ) { STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "functionality not (yet) implemented"); } - -#ifdef STORM_HAVE_CARL + /*! * Translates the given constraint "leftHandSide relation rightHandSide" to an equivalent expression for Smt2. @@ -60,6 +59,7 @@ namespace storm { ") " + ")"; } + /*! * Translates the given constraint "leftHandSide relation 0" to an equivalent expression for Smt2. @@ -67,31 +67,16 @@ namespace storm { * @param constraint * @return An equivalent expression for Smt2. */ - std::string translateExpression(storm::ArithConstraint const& constraint) { - std::stringstream ss; - ss << "(" << constraint.rel() << " " << - constraint.lhs().toString(false, useReadableVarNames) << " " << - "0 " << - ")"; - return ss.str(); - } - - /*! - * Translates the given constraint "leftHandSide relation 0" to an equivalent expression for Smt2. - - * @param constraint - * @return An equivalent expression for Smt2. - */ - std::string translateExpression(storm::ArithConstraint const& constraint) { + std::string translateExpression(storm::RationalFunction const& leftHandSide, storm::CompareRelation const& relation) { std::stringstream ss; - ss << "(" << constraint.rel() << " " << - constraint.lhs().toString(false, useReadableVarNames) << " " << + ss << "(" << relation << " " << + leftHandSide.toString(false, useReadableVarNames) << " " << "0 " << ")"; return ss.str(); } -#endif + /*! * Translates the given variable to an equivalent expression for Smt2. * @@ -126,7 +111,7 @@ namespace storm { } -#ifdef STORM_HAVE_CARL + /*! Checks whether the variables in the given set are already declared and creates them if necessary * @param variables the set of variables to check */ @@ -167,7 +152,6 @@ namespace storm { } return result; } -#endif private: // The manager that can be used to build expressions. diff --git a/src/storm/analysis/GraphConditions.h b/src/storm/analysis/GraphConditions.h index 48b4aee64..394f11b31 100644 --- a/src/storm/analysis/GraphConditions.h +++ b/src/storm/analysis/GraphConditions.h @@ -8,12 +8,12 @@ namespace storm { namespace analysis { - + template struct ConstraintType { - typedef storm::ArithConstraint val; + typedef void* val; }; - + template struct ConstraintType::value>::type> { typedef carl::Formula val; diff --git a/src/storm/solver/SmtlibSmtSolver.cpp b/src/storm/solver/SmtlibSmtSolver.cpp index 8dcd37ddc..69394ec8a 100644 --- a/src/storm/solver/SmtlibSmtSolver.cpp +++ b/src/storm/solver/SmtlibSmtSolver.cpp @@ -102,33 +102,6 @@ namespace storm { writeCommand("( assert " + expressionAdapter->translateExpression(leftHandSide, relation, rightHandSide) + " )", true); } - void SmtlibSmtSolver::add(storm::ArithConstraint const& constraint) { - add(constraint.lhs(), constraint.rel()); - } - - void SmtlibSmtSolver::add(storm::ArithConstraint const& constraint) { - //if some of the occurring variables are not declared yet, we will have to. - std::set variables = constraint.lhs().gatherVariables(); - std::vector const varDeclarations = expressionAdapter->checkForUndeclaredVariables(variables); - for (auto declaration : varDeclarations){ - writeCommand(declaration, true); - } - writeCommand("( assert " + expressionAdapter->translateExpression(constraint) + " )", true); - } - - void SmtlibSmtSolver::add(storm::RationalFunctionVariable const& guard, typename storm::ArithConstraint const& constraint){ - STORM_LOG_THROW((guard.getType()==carl::VariableType::VT_BOOL), storm::exceptions::IllegalArgumentException, "Tried to add a guarded constraint, but the guard is not of type bool."); - //if some of the occurring variables are not declared yet, we will have to (including the guard!). - std::set variables = constraint.lhs().gatherVariables(); - variables.insert(guard); - std::vector const varDeclarations = expressionAdapter->checkForUndeclaredVariables(variables); - for (auto declaration : varDeclarations){ - writeCommand(declaration, true); - } - std::string guardName= carl::VariablePool::getInstance().getName(guard, this->useReadableVarNames); - writeCommand("( assert (=> " + guardName + " " + expressionAdapter->translateExpression(constraint) + " ) )", true); - } - void SmtlibSmtSolver::add(const storm::RationalFunctionVariable& variable, bool value){ STORM_LOG_THROW((variable.getType()==carl::VariableType::VT_BOOL), storm::exceptions::IllegalArgumentException, "Tried to add a constraint that consists of a non-boolean variable."); std::set variableSet; diff --git a/src/storm/solver/SmtlibSmtSolver.h b/src/storm/solver/SmtlibSmtSolver.h index 70e4c325f..6ae64eb92 100644 --- a/src/storm/solver/SmtlibSmtSolver.h +++ b/src/storm/solver/SmtlibSmtSolver.h @@ -51,12 +51,7 @@ namespace storm { //adds the constraint "leftHandSide relation rightHandSide" virtual void add(storm::RationalFunction const& leftHandSide, storm::CompareRelation const& relation, storm::RationalFunction const& rightHandSide=storm::RationalFunction(0)); - //adds the given carl constraint - void add(typename storm::ArithConstraint const& constraint); - void add(typename storm::ArithConstraint const& constraint); - - // adds the given carl constraint that is guarded by the given guard. The guard should have type 'bool' - void add(storm::RationalFunctionVariable const& guard, typename storm::ArithConstraint const& constraint); + // asserts that the given variable has the given value. The variable should have type 'bool' void add(storm::RationalFunctionVariable const& variable, bool value); @@ -65,10 +60,9 @@ namespace storm { virtual CheckResult check() override; virtual CheckResult checkWithAssumptions(std::set const& assumptions) override; -#ifndef WINDOWS + virtual CheckResult checkWithAssumptions(std::initializer_list const& assumptions) override; -#endif - + bool isNeedsRestart() const; //Todo: some of these might be added in the future From a27e7bdc82d7b9036ee5be080db6fb7f0ca1315c Mon Sep 17 00:00:00 2001 From: sjunges Date: Sun, 13 Aug 2017 23:48:13 +0200 Subject: [PATCH 098/110] no longer use arithconstraint --- src/storm/adapters/RationalFunctionAdapter.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/storm/adapters/RationalFunctionAdapter.h b/src/storm/adapters/RationalFunctionAdapter.h index ba9858fe0..f403103f5 100644 --- a/src/storm/adapters/RationalFunctionAdapter.h +++ b/src/storm/adapters/RationalFunctionAdapter.h @@ -7,7 +7,6 @@ #include #include #include -#include #include namespace carl { @@ -58,5 +57,5 @@ namespace storm { typedef carl::RationalFunction RationalFunction; typedef carl::Interval Interval; - template using ArithConstraint = carl::SimpleConstraint; } + From 2b01e2fa61a2a2a8fc0e19c317fa71875786252f Mon Sep 17 00:00:00 2001 From: sjunges Date: Mon, 14 Aug 2017 20:37:04 +0200 Subject: [PATCH 099/110] GraphConditions for any model type --- src/storm/analysis/GraphConditions.cpp | 31 ++++++++++++++++++-------- src/storm/analysis/GraphConditions.h | 18 +++++++-------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/storm/analysis/GraphConditions.cpp b/src/storm/analysis/GraphConditions.cpp index bf3beeb0c..ef77a720b 100644 --- a/src/storm/analysis/GraphConditions.cpp +++ b/src/storm/analysis/GraphConditions.cpp @@ -1,4 +1,6 @@ +#include "storm/models/sparse/MarkovAutomaton.h" +#include "storm/models/sparse/Ctmc.h" #include "GraphConditions.h" #include "storm/utility/constants.h" #include "storm/exceptions/NotImplementedException.h" @@ -9,8 +11,8 @@ namespace storm { template - ConstraintCollector::ConstraintCollector(storm::models::sparse::Dtmc const& dtmc) { - process(dtmc); + ConstraintCollector::ConstraintCollector(storm::models::sparse::Model const& model) { + process(model); } template @@ -50,10 +52,13 @@ namespace storm { } template - void ConstraintCollector::process(storm::models::sparse::Dtmc const& dtmc) { - for(uint_fast64_t state = 0; state < dtmc.getNumberOfStates(); ++state) { + void ConstraintCollector::process(storm::models::sparse::Model const& model) { + for(uint_fast64_t action = 0; action < model.getTransitionMatrix().getRowCount(); ++action) { ValueType sum = storm::utility::zero(); - for (auto const& transition : dtmc.getRows(state)) { + + for (auto transitionIt = model.getTransitionMatrix().begin(action); transitionIt != model.getTransitionMatrix().end(action); ++transitionIt) { + auto const& transition = *transitionIt; + std::cout << transition.getValue() << std::endl; sum += transition.getValue(); if (!storm::utility::isConstant(transition.getValue())) { auto const& transitionVars = transition.getValue().gatherVariables(); @@ -90,9 +95,17 @@ namespace storm { // Assert: sum == 1 wellformedConstraintSet.emplace((sum.nominator() - sum.denominator()).polynomialWithCoefficient(), storm::CompareRelation::EQ); } + } + if (model.getType() == storm::models::ModelType::Ctmc) { + auto const& exitRateVector = static_cast const&>(model).getExitRateVector(); + wellformedRequiresNonNegativeEntries(exitRateVector); + } else if (model.getType() == storm::models::ModelType::MarkovAutomaton) { + auto const& exitRateVector = static_cast const&>(model).getExitRates(); + wellformedRequiresNonNegativeEntries(exitRateVector); } - for(auto const& rewModelEntry : dtmc.getRewardModels()) { + + for(auto const& rewModelEntry : model.getRewardModels()) { if (rewModelEntry.second.hasStateRewards()) { wellformedRequiresNonNegativeEntries(rewModelEntry.second.getStateRewardVector()); } @@ -117,13 +130,13 @@ namespace storm { } } } - } + } template - void ConstraintCollector::operator()(storm::models::sparse::Dtmc const& dtmc) { - process(dtmc); + void ConstraintCollector::operator()(storm::models::sparse::Model const& model) { + process(model); } template class ConstraintCollector; diff --git a/src/storm/analysis/GraphConditions.h b/src/storm/analysis/GraphConditions.h index 394f11b31..a901dfa68 100644 --- a/src/storm/analysis/GraphConditions.h +++ b/src/storm/analysis/GraphConditions.h @@ -38,12 +38,12 @@ namespace storm { void wellformedRequiresNonNegativeEntries(std::vector const&); public: /*! - * Constructs a constraint collector for the given DTMC. The constraints are built and ready for + * Constructs a constraint collector for the given Model. The constraints are built and ready for * retrieval after the construction. * - * @param dtmc The DTMC for which to create the constraints. + * @param model The Model for which to create the constraints. */ - ConstraintCollector(storm::models::sparse::Dtmc const& dtmc); + ConstraintCollector(storm::models::sparse::Model const& model); /*! * Returns the set of wellformed-ness constraints. @@ -66,18 +66,18 @@ namespace storm { std::set const& getVariables() const; /*! - * Constructs the constraints for the given DTMC. + * Constructs the constraints for the given Model. * - * @param dtmc The DTMC for which to create the constraints. + * @param model The DTMC for which to create the constraints. */ - void process(storm::models::sparse::Dtmc const& dtmc); + void process(storm::models::sparse::Model const& model); /*! - * Constructs the constraints for the given DTMC by calling the process method. + * Constructs the constraints for the given Model by calling the process method. * - * @param dtmc The DTMC for which to create the constraints. + * @param model The Model for which to create the constraints. */ - void operator()(storm::models::sparse::Dtmc const& dtmc); + void operator()(storm::models::sparse::Model const& model); }; From 66cf4f1d28bad8f52b842e423e5ae5bd9a22d463 Mon Sep 17 00:00:00 2001 From: sjunges Date: Mon, 14 Aug 2017 20:37:27 +0200 Subject: [PATCH 100/110] Command line access to onlyconstraints for any model type --- src/storm-pars-cli/storm-pars.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/storm-pars-cli/storm-pars.cpp b/src/storm-pars-cli/storm-pars.cpp index 1ff2fabb6..5fa744c59 100644 --- a/src/storm-pars-cli/storm-pars.cpp +++ b/src/storm-pars-cli/storm-pars.cpp @@ -306,15 +306,8 @@ namespace storm { if (parSettings.onlyObtainConstraints()) { STORM_LOG_THROW(parSettings.exportResultToFile(), storm::exceptions::InvalidSettingsException, "When computing constraints, export path has to be specified."); - if (model->isOfType(storm::models::ModelType::Dtmc)) { - auto dtmc = model->template as>(); - storm::api::exportParametricResultToFile(boost::none, storm::analysis::ConstraintCollector(*dtmc),parSettings.exportResultPath()); - return; - } else { - STORM_LOG_THROW(parSettings.exportResultToFile(), storm::exceptions::NotImplementedException, "Constraints for MDPs and CTMCs not implemented."); - - } - + storm::api::exportParametricResultToFile(boost::none, storm::analysis::ConstraintCollector(*(model->as>())), parSettings.exportResultPath()); + return; } if (model) { From 5624818caf179fc4b96524e8faa20dc84cdf2213 Mon Sep 17 00:00:00 2001 From: sjunges Date: Mon, 14 Aug 2017 20:37:40 +0200 Subject: [PATCH 101/110] Updated Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c55d776d..a346bc43d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ The releases of major and minor versions contain an overview of changes since th Version 1.1.x ------------- +### Version 1.1.1 +- c++ api changes: Building model takes BuilderOptions instead of extended list of Booleans, does not depend on settings anymore. +- storm-cli-utilities now contains cli related stuff, instead of storm-lib +- storm-pars: support for welldefinedness constraints in mdps. + ### Version 1.1.0 (2017/8) - Support for long-run average rewards on MDPs and Markov automata using a value-iteration based approach. From c09f6c1924972d7e5c55921abf24a98d95c45af1 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 15 Aug 2017 15:23:06 +0200 Subject: [PATCH 102/110] Update mtime_cache files for travis caching --- travis/mtime_cache/globs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/mtime_cache/globs.txt b/travis/mtime_cache/globs.txt index cd0d4d2ff..09bc1e5bf 100644 --- a/travis/mtime_cache/globs.txt +++ b/travis/mtime_cache/globs.txt @@ -1,4 +1,4 @@ src/**/*.{%{cpp}} src/**/CMakeLists.txt resources/3rdparty/**/*.{%{cpp}} -resources/3rdparty/eigen-3.3-beta1/StormEigen/* +resources/3rdparty/eigen-3.3-beta1/StormEigen/**/* From f254a05f4e86d0965773885b05f3e516e138d2ab Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 17 Aug 2017 09:25:43 +0200 Subject: [PATCH 103/110] Update mtime_cache files for travis caching --- travis/mtime_cache/globs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/mtime_cache/globs.txt b/travis/mtime_cache/globs.txt index 09bc1e5bf..a09cba27a 100644 --- a/travis/mtime_cache/globs.txt +++ b/travis/mtime_cache/globs.txt @@ -1,4 +1,5 @@ src/**/*.{%{cpp}} src/**/CMakeLists.txt +CMakeLists.txt resources/3rdparty/**/*.{%{cpp}} resources/3rdparty/eigen-3.3-beta1/StormEigen/**/* From 8cdbf281fae2e4f97eea6c6427d2b4a19193ad80 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sat, 19 Aug 2017 11:12:13 +0200 Subject: [PATCH 104/110] make minmax solvers use policy iteration when --exact is set and no other method was explicitly set --- src/storm/settings/Argument.cpp | 10 ++++++++-- src/storm/settings/Argument.h | 5 +++++ src/storm/settings/ArgumentBase.h | 4 +++- .../modules/MinMaxEquationSolverSettings.cpp | 4 ++++ .../modules/MinMaxEquationSolverSettings.h | 11 +++++++++-- .../solver/IterativeMinMaxLinearEquationSolver.h | 2 +- src/storm/solver/MinMaxLinearEquationSolver.cpp | 15 ++++++++++++++- 7 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/storm/settings/Argument.cpp b/src/storm/settings/Argument.cpp index ddb39c0ab..555bcdb9d 100644 --- a/src/storm/settings/Argument.cpp +++ b/src/storm/settings/Argument.cpp @@ -12,12 +12,12 @@ namespace storm { namespace settings { template - Argument::Argument(std::string const& name, std::string const& description, std::vector>> const& validators): ArgumentBase(name, description), argumentValue(), argumentType(inferToEnumType()), validators(validators), isOptional(false), defaultValue(), hasDefaultValue(false) { + Argument::Argument(std::string const& name, std::string const& description, std::vector>> const& validators): ArgumentBase(name, description), argumentValue(), argumentType(inferToEnumType()), validators(validators), isOptional(false), defaultValue(), hasDefaultValue(false), wasSetFromDefaultValueFlag(false) { // Intentionally left empty. } template - Argument::Argument(std::string const& name, std::string const& description, std::vector>> const& validators, bool isOptional, T defaultValue): ArgumentBase(name, description), argumentValue(), argumentType(inferToEnumType()), validators(validators), isOptional(isOptional), defaultValue(), hasDefaultValue(true) { + Argument::Argument(std::string const& name, std::string const& description, std::vector>> const& validators, bool isOptional, T defaultValue): ArgumentBase(name, description), argumentValue(), argumentType(inferToEnumType()), validators(validators), isOptional(isOptional), defaultValue(), hasDefaultValue(true), wasSetFromDefaultValueFlag(false) { this->setDefaultValue(defaultValue); } @@ -71,6 +71,12 @@ namespace storm { STORM_LOG_THROW(this->hasDefaultValue, storm::exceptions::IllegalFunctionCallException, "Unable to set value from default value, because the argument " << name << " has none."); bool result = this->setFromTypeValue(this->defaultValue, false); STORM_LOG_THROW(result, storm::exceptions::IllegalArgumentValueException, "Unable to assign default value to argument " << name << ", because it was rejected."); + this->wasSetFromDefaultValueFlag = true; + } + + template + bool Argument::wasSetFromDefaultValue() const { + return wasSetFromDefaultValueFlag; } template diff --git a/src/storm/settings/Argument.h b/src/storm/settings/Argument.h index 080d06409..2074557cf 100644 --- a/src/storm/settings/Argument.h +++ b/src/storm/settings/Argument.h @@ -85,6 +85,8 @@ namespace storm { void setFromDefaultValue() override; + virtual bool wasSetFromDefaultValue() const override; + virtual std::string getValueAsString() const override; virtual int_fast64_t getValueAsInteger() const override; @@ -116,6 +118,9 @@ namespace storm { // A flag indicating whether a default value has been provided. bool hasDefaultValue; + // A flag indicating whether the argument was set from the default value. + bool wasSetFromDefaultValueFlag; + /*! * Sets the default value of the argument to the provided value. * diff --git a/src/storm/settings/ArgumentBase.h b/src/storm/settings/ArgumentBase.h index 6808bd815..b48a46183 100644 --- a/src/storm/settings/ArgumentBase.h +++ b/src/storm/settings/ArgumentBase.h @@ -80,6 +80,8 @@ namespace storm { */ virtual void setFromDefaultValue() = 0; + virtual bool wasSetFromDefaultValue() const = 0; + /*! * Tries to set the value of the argument from the given string. * @@ -134,7 +136,7 @@ namespace storm { friend std::ostream& operator<<(std::ostream& out, ArgumentBase const& argument); - protected: + protected: // A flag indicating whether the argument has been set. bool hasBeenSet; diff --git a/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp b/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp index 398eaaeac..de9ce1746 100644 --- a/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp +++ b/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp @@ -50,6 +50,10 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentValueException, "Unknown min/max equation solving technique '" << minMaxEquationSolvingTechnique << "'."); } + bool MinMaxEquationSolverSettings::isMinMaxEquationSolvingMethodSetFromDefaultValue() const { + return !this->getOption(solvingMethodOptionName).getArgumentByName("name").getHasBeenSet() || this->getOption(solvingMethodOptionName).getArgumentByName("name").wasSetFromDefaultValue(); + } + bool MinMaxEquationSolverSettings::isMinMaxEquationSolvingMethodSet() const { return this->getOption(solvingMethodOptionName).getHasOptionBeenSet(); } diff --git a/src/storm/settings/modules/MinMaxEquationSolverSettings.h b/src/storm/settings/modules/MinMaxEquationSolverSettings.h index 35bee18ac..1ce4a9db7 100644 --- a/src/storm/settings/modules/MinMaxEquationSolverSettings.h +++ b/src/storm/settings/modules/MinMaxEquationSolverSettings.h @@ -27,12 +27,19 @@ namespace storm { bool isMinMaxEquationSolvingMethodSet() const; /*! - * Retrieves the selected min/max equation solving technique. + * Retrieves the selected min/max equation solving method. * - * @return The selected min/max equation solving technique. + * @return The selected min/max equation solving method. */ storm::solver::MinMaxMethod getMinMaxEquationSolvingMethod() const; + /*! + * Retrieves whether the min/max equation solving method is set from its default value. + * + * @return True iff if it is set from its default value. + */ + bool isMinMaxEquationSolvingMethodSetFromDefaultValue() const; + /*! * Retrieves whether the maximal iteration count has been set. * diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index 301db3049..e197f88b0 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -73,7 +73,7 @@ namespace storm { IterativeMinMaxLinearEquationSolverSettings settings; }; - template + template class IterativeMinMaxLinearEquationSolverFactory : public StandardMinMaxLinearEquationSolverFactory { public: IterativeMinMaxLinearEquationSolverFactory(MinMaxMethodSelection const& method = MinMaxMethodSelection::FROMSETTINGS, bool trackScheduler = false); diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index 08c70bd58..aa68fd9e3 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -154,7 +154,19 @@ namespace storm { template void MinMaxLinearEquationSolverFactory::setMinMaxMethod(MinMaxMethodSelection const& newMethod) { if (newMethod == MinMaxMethodSelection::FROMSETTINGS) { - setMinMaxMethod(storm::settings::getModule().getMinMaxEquationSolvingMethod()); + bool wasSet = false; + auto const& minMaxSettings = storm::settings::getModule(); + if (std::is_same::value) { + if (minMaxSettings.isMinMaxEquationSolvingMethodSetFromDefaultValue()) { + STORM_LOG_WARN("Selecting policy iteration as the solution method to guarantee exact results. If you want to override this, please explicitly specify a different method."); + this->setMinMaxMethod(MinMaxMethod::PolicyIteration); + wasSet = true; + } + } + + if (!wasSet) { + setMinMaxMethod(minMaxSettings.getMinMaxEquationSolvingMethod()); + } } else { setMinMaxMethod(convert(newMethod)); } @@ -162,6 +174,7 @@ namespace storm { template void MinMaxLinearEquationSolverFactory::setMinMaxMethod(MinMaxMethod const& newMethod) { + STORM_LOG_WARN_COND(!(std::is_same::value) || newMethod == MinMaxMethod::PolicyIteration, "The selected solution method does not guarantee exact result. Consider using policy iteration."); method = newMethod; } From c5da67d6cf5805ffa0d6e40ab07d1aa0e707d4ac Mon Sep 17 00:00:00 2001 From: dehnert Date: Sat, 19 Aug 2017 12:29:47 +0200 Subject: [PATCH 105/110] refined warning for automatic switch to policy iteration in exact mode --- src/storm/solver/MinMaxLinearEquationSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storm/solver/MinMaxLinearEquationSolver.cpp b/src/storm/solver/MinMaxLinearEquationSolver.cpp index aa68fd9e3..0ce28bd2a 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/MinMaxLinearEquationSolver.cpp @@ -157,7 +157,7 @@ namespace storm { bool wasSet = false; auto const& minMaxSettings = storm::settings::getModule(); if (std::is_same::value) { - if (minMaxSettings.isMinMaxEquationSolvingMethodSetFromDefaultValue()) { + if (minMaxSettings.isMinMaxEquationSolvingMethodSetFromDefaultValue() && minMaxSettings.getMinMaxEquationSolvingMethod() != MinMaxMethod::PolicyIteration) { STORM_LOG_WARN("Selecting policy iteration as the solution method to guarantee exact results. If you want to override this, please explicitly specify a different method."); this->setMinMaxMethod(MinMaxMethod::PolicyIteration); wasSet = true; From e0452be54bf37ee7d55f996da23966e2e5b2aa54 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 22 Aug 2017 16:54:20 +0200 Subject: [PATCH 106/110] move some of the cli stuff to an own header --- src/storm-cli-utilities/cli.cpp | 609 +-------------------- src/storm-cli-utilities/model-handling.h | 639 +++++++++++++++++++++++ 2 files changed, 640 insertions(+), 608 deletions(-) create mode 100644 src/storm-cli-utilities/model-handling.h diff --git a/src/storm-cli-utilities/cli.cpp b/src/storm-cli-utilities/cli.cpp index 66d83ece7..cb33c3205 100644 --- a/src/storm-cli-utilities/cli.cpp +++ b/src/storm-cli-utilities/cli.cpp @@ -1,24 +1,5 @@ #include "cli.h" -#include "storm/storage/SymbolicModelDescription.h" - -#include "storm/models/ModelBase.h" - -#include "storm/exceptions/OptionParserException.h" - -#include "storm/modelchecker/results/SymbolicQualitativeCheckResult.h" - -#include "storm/models/sparse/StandardRewardModel.h" -#include "storm/models/symbolic/StandardRewardModel.h" - -#include "storm/settings/SettingsManager.h" -#include "storm/settings/modules/ResourceSettings.h" -#include "storm/settings/modules/JitBuilderSettings.h" -#include "storm/settings/modules/DebugSettings.h" -#include "storm/settings/modules/IOSettings.h" -#include "storm/settings/modules/CoreSettings.h" -#include "storm/settings/modules/ResourceSettings.h" -#include "storm/settings/modules/JaniExportSettings.h" #include "storm/utility/resources.h" #include "storm/utility/file.h" @@ -30,7 +11,7 @@ #include -#include "storm/api/storm.h" +#include "storm-cli-utilities/model-handling.h" // Includes for the linked libraries and versions header. @@ -231,595 +212,7 @@ namespace storm { setLogLevel(); setFileLogging(); } - - struct SymbolicInput { - // The symbolic model description. - boost::optional model; - - // The properties to check. - std::vector properties; - }; - - void parseSymbolicModelDescription(storm::settings::modules::IOSettings const& ioSettings, SymbolicInput& input) { - if (ioSettings.isPrismOrJaniInputSet()) { - if (ioSettings.isPrismInputSet()) { - input.model = storm::api::parseProgram(ioSettings.getPrismInputFilename()); - } else { - auto janiInput = storm::api::parseJaniModel(ioSettings.getJaniInputFilename()); - input.model = janiInput.first; - auto const& janiPropertyInput = janiInput.second; - - if (ioSettings.isJaniPropertiesSet()) { - for (auto const& propName : ioSettings.getJaniProperties()) { - auto propertyIt = janiPropertyInput.find(propName); - STORM_LOG_THROW(propertyIt != janiPropertyInput.end(), storm::exceptions::InvalidArgumentException, "No JANI property with name '" << propName << "' is known."); - input.properties.emplace_back(propertyIt->second); - } - } - } - } - } - - void parseProperties(storm::settings::modules::IOSettings const& ioSettings, SymbolicInput& input, boost::optional> const& propertyFilter) { - if (ioSettings.isPropertySet()) { - std::vector newProperties; - if (input.model) { - newProperties = storm::api::parsePropertiesForSymbolicModelDescription(ioSettings.getProperty(), input.model.get(), propertyFilter); - } else { - newProperties = storm::api::parseProperties(ioSettings.getProperty(), propertyFilter); - } - - input.properties.insert(input.properties.end(), newProperties.begin(), newProperties.end()); - } - } - - SymbolicInput parseSymbolicInput() { - auto ioSettings = storm::settings::getModule(); - - // Parse the property filter, if any is given. - boost::optional> propertyFilter = storm::api::parsePropertyFilter(ioSettings.getPropertyFilter()); - - SymbolicInput input; - parseSymbolicModelDescription(ioSettings, input); - parseProperties(ioSettings, input, propertyFilter); - - return input; - } - - SymbolicInput preprocessSymbolicInput(SymbolicInput const& input) { - auto ioSettings = storm::settings::getModule(); - auto coreSettings = storm::settings::getModule(); - - SymbolicInput output = input; - - // Substitute constant definitions in symbolic input. - std::string constantDefinitionString = ioSettings.getConstantDefinitionString(); - std::map constantDefinitions; - if (output.model) { - constantDefinitions = output.model.get().parseConstantDefinitions(constantDefinitionString); - output.model = output.model.get().preprocess(constantDefinitions); - } - if (!output.properties.empty()) { - output.properties = storm::api::substituteConstantsInProperties(output.properties, constantDefinitions); - } - - // Check whether conversion for PRISM to JANI is requested or necessary. - if (input.model && input.model.get().isPrismProgram()) { - bool transformToJani = ioSettings.isPrismToJaniSet(); - bool transformToJaniForJit = coreSettings.getEngine() == storm::settings::modules::CoreSettings::Engine::Sparse && ioSettings.isJitSet(); - STORM_LOG_WARN_COND(transformToJani || !transformToJaniForJit, "The JIT-based model builder is only available for JANI models, automatically converting the PRISM input model."); - transformToJani |= transformToJaniForJit; - - if (transformToJani) { - storm::prism::Program const& model = output.model.get().asPrismProgram(); - auto modelAndRenaming = model.toJaniWithLabelRenaming(true); - output.model = modelAndRenaming.first; - - if (!modelAndRenaming.second.empty()) { - std::map const& labelRenaming = modelAndRenaming.second; - std::vector amendedProperties; - for (auto const& property : output.properties) { - amendedProperties.emplace_back(property.substituteLabels(labelRenaming)); - } - output.properties = std::move(amendedProperties); - } - } - } - - return output; - } - - void exportSymbolicInput(SymbolicInput const& input) { - auto ioSettings = storm::settings::getModule(); - if (input.model && input.model.get().isJaniModel()) { - storm::storage::SymbolicModelDescription const& model = input.model.get(); - if (ioSettings.isExportJaniDotSet()) { - storm::api::exportJaniModelAsDot(model.asJaniModel(), ioSettings.getExportJaniDotFilename()); - } - - if (model.isJaniModel() && storm::settings::getModule().isJaniFileSet()) { - storm::api::exportJaniModel(model.asJaniModel(), input.properties, storm::settings::getModule().getJaniFilename()); - } - } - } - - SymbolicInput parseAndPreprocessSymbolicInput() { - SymbolicInput input = parseSymbolicInput(); - input = preprocessSymbolicInput(input); - exportSymbolicInput(input); - return input; - } - - std::vector> createFormulasToRespect(std::vector const& properties) { - std::vector> result = storm::api::extractFormulasFromProperties(properties); - - for (auto const& property : properties) { - if (!property.getFilter().getStatesFormula()->isInitialFormula()) { - result.push_back(property.getFilter().getStatesFormula()); - } - } - - return result; - } - - template - std::shared_ptr buildModelDd(SymbolicInput const& input) { - return storm::api::buildSymbolicModel(input.model.get(), createFormulasToRespect(input.properties)); - } - - template - std::shared_ptr buildModelSparse(SymbolicInput const& input, storm::settings::modules::IOSettings const& ioSettings) { - auto counterexampleGeneratorSettings = storm::settings::getModule(); - storm::builder::BuilderOptions options(createFormulasToRespect(input.properties)); - options.setBuildChoiceLabels(ioSettings.isBuildChoiceLabelsSet()); - options.setBuildChoiceOrigins(counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet()); - options.setBuildAllLabels(ioSettings.isBuildFullModelSet()); - options.setBuildAllRewardModels(ioSettings.isBuildFullModelSet()); - if (ioSettings.isBuildFullModelSet()) { - options.clearTerminalStates(); - } - return storm::api::buildSparseModel(input.model.get(), options, ioSettings.isJitSet(), storm::settings::getModule().isDoctorSet()); - } - - template - std::shared_ptr buildModelExplicit(storm::settings::modules::IOSettings const& ioSettings) { - std::shared_ptr result; - if (ioSettings.isExplicitSet()) { - result = storm::api::buildExplicitModel(ioSettings.getTransitionFilename(), ioSettings.getLabelingFilename(), ioSettings.isStateRewardsSet() ? boost::optional(ioSettings.getStateRewardsFilename()) : boost::none, ioSettings.isTransitionRewardsSet() ? boost::optional(ioSettings.getTransitionRewardsFilename()) : boost::none, ioSettings.isChoiceLabelingSet() ? boost::optional(ioSettings.getChoiceLabelingFilename()) : boost::none); - } else if (ioSettings.isExplicitDRNSet()) { - result = storm::api::buildExplicitDRNModel(ioSettings.getExplicitDRNFilename()); - } else { - STORM_LOG_THROW(ioSettings.isExplicitIMCASet(), storm::exceptions::InvalidSettingsException, "Unexpected explicit model input type."); - result = storm::api::buildExplicitIMCAModel(ioSettings.getExplicitIMCAFilename()); - } - return result; - } - - template - std::shared_ptr buildModel(storm::settings::modules::CoreSettings::Engine const& engine, SymbolicInput const& input, storm::settings::modules::IOSettings const& ioSettings) { - storm::utility::Stopwatch modelBuildingWatch(true); - - std::shared_ptr result; - if (input.model) { - if (engine == storm::settings::modules::CoreSettings::Engine::Dd || engine == storm::settings::modules::CoreSettings::Engine::Hybrid) { - result = buildModelDd(input); - } else if (engine == storm::settings::modules::CoreSettings::Engine::Sparse) { - result = buildModelSparse(input, ioSettings); - } - } else if (ioSettings.isExplicitSet() || ioSettings.isExplicitDRNSet() || ioSettings.isExplicitIMCASet()) { - STORM_LOG_THROW(engine == storm::settings::modules::CoreSettings::Engine::Sparse, storm::exceptions::InvalidSettingsException, "Can only use sparse engine with explicit input."); - result = buildModelExplicit(ioSettings); - } - - modelBuildingWatch.stop(); - if (result) { - STORM_PRINT_AND_LOG("Time for model construction: " << modelBuildingWatch << "." << std::endl << std::endl); - } - - return result; - } - - template - std::shared_ptr> preprocessSparseMarkovAutomaton(std::shared_ptr> const& model) { - std::shared_ptr> result = model; - model->close(); - if (model->hasOnlyTrivialNondeterminism()) { - result = model->convertToCTMC(); - } - return result; - } - template - std::shared_ptr> preprocessSparseModelBisimulation(std::shared_ptr> const& model, SymbolicInput const& input, storm::settings::modules::BisimulationSettings const& bisimulationSettings) { - storm::storage::BisimulationType bisimType = storm::storage::BisimulationType::Strong; - if (bisimulationSettings.isWeakBisimulationSet()) { - bisimType = storm::storage::BisimulationType::Weak; - } - - STORM_LOG_INFO("Performing bisimulation minimization..."); - return storm::api::performBisimulationMinimization(model, createFormulasToRespect(input.properties), bisimType); - } - - template - std::pair>, bool> preprocessSparseModel(std::shared_ptr> const& model, SymbolicInput const& input) { - auto generalSettings = storm::settings::getModule(); - auto bisimulationSettings = storm::settings::getModule(); - auto ioSettings = storm::settings::getModule(); - - std::pair>, bool> result = std::make_pair(model, false); - - if (result.first->isOfType(storm::models::ModelType::MarkovAutomaton)) { - result.first = preprocessSparseMarkovAutomaton(result.first->template as>()); - result.second = true; - } - - if (generalSettings.isBisimulationSet()) { - result.first = preprocessSparseModelBisimulation(result.first, input, bisimulationSettings); - result.second = true; - } - - return result; - } - - template - void exportSparseModel(std::shared_ptr> const& model, SymbolicInput const& input) { - auto ioSettings = storm::settings::getModule(); - - if (ioSettings.isExportExplicitSet()) { - storm::api::exportSparseModelAsDrn(model, ioSettings.getExportExplicitFilename(), input.model ? input.model.get().getParameterNames() : std::vector()); - } - - if (ioSettings.isExportDotSet()) { - storm::api::exportSparseModelAsDot(model, ioSettings.getExportDotFilename()); - } - } - - template - void exportDdModel(std::shared_ptr> const& model, SymbolicInput const& input) { - // Intentionally left empty. - } - - template - void exportModel(std::shared_ptr const& model, SymbolicInput const& input) { - if (model->isSparseModel()) { - exportSparseModel(model->as>(), input); - } else { - exportDdModel(model->as>(), input); - } - } - - template - std::pair, bool> preprocessDdModel(std::shared_ptr> const& model, SymbolicInput const& input) { - return std::make_pair(model, false); - } - - template - std::pair, bool> preprocessModel(std::shared_ptr const& model, SymbolicInput const& input) { - storm::utility::Stopwatch preprocessingWatch(true); - - std::pair, bool> result = std::make_pair(model, false); - if (model->isSparseModel()) { - result = preprocessSparseModel(result.first->as>(), input); - } else { - STORM_LOG_ASSERT(model->isSymbolicModel(), "Unexpected model type."); - result = preprocessDdModel(result.first->as>(), input); - } - - if (result.second) { - STORM_PRINT_AND_LOG(std::endl << "Time for model preprocessing: " << preprocessingWatch << "." << std::endl << std::endl); - } - return result; - } - - void printComputingCounterexample(storm::jani::Property const& property) { - STORM_PRINT_AND_LOG("Computing counterexample for property " << *property.getRawFormula() << " ..." << std::endl); - } - - void printCounterexample(std::shared_ptr const& counterexample, storm::utility::Stopwatch* watch = nullptr) { - if (counterexample) { - STORM_PRINT_AND_LOG(*counterexample << std::endl); - if (watch) { - STORM_PRINT_AND_LOG("Time for computation: " << *watch << "." << std::endl); - } - } else { - STORM_PRINT_AND_LOG(" failed." << std::endl); - } - } - - template - void generateCounterexamples(std::shared_ptr const& model, SymbolicInput const& input) { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Counterexample generation is not supported for this data-type."); - } - - template <> - void generateCounterexamples(std::shared_ptr const& model, SymbolicInput const& input) { - typedef double ValueType; - - STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::NotSupportedException, "Counterexample generation is currently only supported for sparse models."); - auto sparseModel = model->as>(); - - STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Mdp), storm::exceptions::NotSupportedException, "Counterexample is currently only supported for MDPs."); - auto mdp = sparseModel->template as>(); - - auto counterexampleSettings = storm::settings::getModule(); - if (counterexampleSettings.isMinimalCommandSetGenerationSet()) { - STORM_LOG_THROW(input.model && input.model.get().isPrismProgram(), storm::exceptions::NotSupportedException, "Minimal command set counterexamples are only supported for PRISM model input."); - storm::prism::Program const& program = input.model.get().asPrismProgram(); - - bool useMilp = counterexampleSettings.isUseMilpBasedMinimalCommandSetGenerationSet(); - for (auto const& property : input.properties) { - std::shared_ptr counterexample; - printComputingCounterexample(property); - storm::utility::Stopwatch watch(true); - if (useMilp) { - counterexample = storm::api::computePrismHighLevelCounterexampleMilp(program, mdp, property.getRawFormula()); - } else { - counterexample = storm::api::computePrismHighLevelCounterexampleMaxSmt(program, mdp, property.getRawFormula()); - } - watch.stop(); - printCounterexample(counterexample, &watch); - } - } else { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "The selected counterexample formalism is unsupported."); - } - } - - template - void printFilteredResult(std::unique_ptr const& result, storm::modelchecker::FilterType ft) { - if (result->isQuantitative()) { - switch (ft) { - case storm::modelchecker::FilterType::VALUES: - STORM_PRINT_AND_LOG(*result); - break; - case storm::modelchecker::FilterType::SUM: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().sum()); - break; - case storm::modelchecker::FilterType::AVG: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().average()); - break; - case storm::modelchecker::FilterType::MIN: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().getMin()); - break; - case storm::modelchecker::FilterType::MAX: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().getMax()); - break; - case storm::modelchecker::FilterType::ARGMIN: - case storm::modelchecker::FilterType::ARGMAX: - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Outputting states is not supported."); - case storm::modelchecker::FilterType::EXISTS: - case storm::modelchecker::FilterType::FORALL: - case storm::modelchecker::FilterType::COUNT: - STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Filter type only defined for qualitative results."); - } - } else { - switch (ft) { - case storm::modelchecker::FilterType::VALUES: - STORM_PRINT_AND_LOG(*result << std::endl); - break; - case storm::modelchecker::FilterType::EXISTS: - STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().existsTrue()); - break; - case storm::modelchecker::FilterType::FORALL: - STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().forallTrue()); - break; - case storm::modelchecker::FilterType::COUNT: - STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().count()); - break; - case storm::modelchecker::FilterType::ARGMIN: - case storm::modelchecker::FilterType::ARGMAX: - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Outputting states is not supported."); - case storm::modelchecker::FilterType::SUM: - case storm::modelchecker::FilterType::AVG: - case storm::modelchecker::FilterType::MIN: - case storm::modelchecker::FilterType::MAX: - STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Filter type only defined for quantitative results."); - } - } - STORM_PRINT_AND_LOG(std::endl); - } - - void printModelCheckingProperty(storm::jani::Property const& property) { - STORM_PRINT_AND_LOG(std::endl << "Model checking property " << *property.getRawFormula() << " ..." << std::endl); - } - - template - void printResult(std::unique_ptr const& result, storm::jani::Property const& property, storm::utility::Stopwatch* watch = nullptr) { - if (result) { - std::stringstream ss; - ss << "'" << *property.getFilter().getStatesFormula() << "'"; - STORM_PRINT_AND_LOG("Result (for " << (property.getFilter().getStatesFormula()->isInitialFormula() ? "initial" : ss.str()) << " states): "); - printFilteredResult(result, property.getFilter().getFilterType()); - if (watch) { - STORM_PRINT_AND_LOG("Time for model checking: " << *watch << "." << std::endl); - } - } else { - STORM_PRINT_AND_LOG(" failed, property is unsupported by selected engine/settings." << std::endl); - } - } - - struct PostprocessingIdentity { - void operator()(std::unique_ptr const&) { - // Intentionally left empty. - } - }; - - template - void verifyProperties(std::vector const& properties, std::function(std::shared_ptr const& formula, std::shared_ptr const& states)> const& verificationCallback, std::function const&)> const& postprocessingCallback = PostprocessingIdentity()) { - for (auto const& property : properties) { - printModelCheckingProperty(property); - storm::utility::Stopwatch watch(true); - std::unique_ptr result = verificationCallback(property.getRawFormula(), property.getFilter().getStatesFormula()); - watch.stop(); - postprocessingCallback(result); - printResult(result, property, &watch); - } - } - - template - void verifyWithAbstractionRefinementEngine(SymbolicInput const& input) { - STORM_LOG_ASSERT(input.model, "Expected symbolic model description."); - verifyProperties(input.properties, [&input] (std::shared_ptr const& formula, std::shared_ptr const& states) { - STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException, "Abstraction-refinement can only filter initial states."); - return storm::api::verifyWithAbstractionRefinementEngine(input.model.get(), storm::api::createTask(formula, true)); - }); - } - - template - void verifyWithExplorationEngine(SymbolicInput const& input) { - STORM_LOG_ASSERT(input.model, "Expected symbolic model description."); - STORM_LOG_THROW((std::is_same::value), storm::exceptions::NotSupportedException, "Exploration does not support other data-types than floating points."); - verifyProperties(input.properties, [&input] (std::shared_ptr const& formula, std::shared_ptr const& states) { - STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException, "Exploration can only filter initial states."); - return storm::api::verifyWithExplorationEngine(input.model.get(), storm::api::createTask(formula, true)); - }); - } - - template - void verifyWithSparseEngine(std::shared_ptr const& model, SymbolicInput const& input) { - auto sparseModel = model->as>(); - verifyProperties(input.properties, - [&sparseModel] (std::shared_ptr const& formula, std::shared_ptr const& states) { - bool filterForInitialStates = states->isInitialFormula(); - auto task = storm::api::createTask(formula, filterForInitialStates); - std::unique_ptr result = storm::api::verifyWithSparseEngine(sparseModel, task); - - std::unique_ptr filter; - if (filterForInitialStates) { - filter = std::make_unique(sparseModel->getInitialStates()); - } else { - filter = storm::api::verifyWithSparseEngine(sparseModel, storm::api::createTask(states, false)); - } - if (result && filter) { - result->filter(filter->asQualitativeCheckResult()); - } - return result; - }); - } - - template - void verifyWithHybridEngine(std::shared_ptr const& model, SymbolicInput const& input) { - verifyProperties(input.properties, [&model] (std::shared_ptr const& formula, std::shared_ptr const& states) { - bool filterForInitialStates = states->isInitialFormula(); - auto task = storm::api::createTask(formula, filterForInitialStates); - - auto symbolicModel = model->as>(); - std::unique_ptr result = storm::api::verifyWithHybridEngine(symbolicModel, task); - - std::unique_ptr filter; - if (filterForInitialStates) { - filter = std::make_unique>(symbolicModel->getReachableStates(), symbolicModel->getInitialStates()); - } else { - filter = storm::api::verifyWithHybridEngine(symbolicModel, storm::api::createTask(states, false)); - } - if (result && filter) { - result->filter(filter->asQualitativeCheckResult()); - } - return result; - }); - } - - template - void verifyWithDdEngine(std::shared_ptr const& model, SymbolicInput const& input) { - verifyProperties(input.properties, [&model] (std::shared_ptr const& formula, std::shared_ptr const& states) { - bool filterForInitialStates = states->isInitialFormula(); - auto task = storm::api::createTask(formula, filterForInitialStates); - - auto symbolicModel = model->as>(); - std::unique_ptr result = storm::api::verifyWithDdEngine(model->as>(), storm::api::createTask(formula, true)); - - std::unique_ptr filter; - if (filterForInitialStates) { - filter = std::make_unique>(symbolicModel->getReachableStates(), symbolicModel->getInitialStates()); - } else { - filter = storm::api::verifyWithDdEngine(symbolicModel, storm::api::createTask(states, false)); - } - if (result && filter) { - result->filter(filter->asQualitativeCheckResult()); - } - return result; - }); - } - - template - typename std::enable_if::value, void>::type verifySymbolicModel(std::shared_ptr const& model, SymbolicInput const& input, storm::settings::modules::CoreSettings const& coreSettings) { - bool hybrid = coreSettings.getEngine() == storm::settings::modules::CoreSettings::Engine::Hybrid; - if (hybrid) { - verifyWithHybridEngine(model, input); - } else { - verifyWithDdEngine(model, input); - } - } - - template - typename std::enable_if::value, void>::type verifySymbolicModel(std::shared_ptr const& model, SymbolicInput const& input, storm::settings::modules::CoreSettings const& coreSettings) { - STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "CUDD does not support the selected data-type."); - } - - template - void verifyModel(std::shared_ptr const& model, SymbolicInput const& input, storm::settings::modules::CoreSettings const& coreSettings) { - if (model->isSparseModel()) { - verifyWithSparseEngine(model, input); - } else { - STORM_LOG_ASSERT(model->isSymbolicModel(), "Unexpected model type."); - verifySymbolicModel(model, input, coreSettings); - } - } - - template - void processInputWithValueTypeAndDdlib(SymbolicInput const& input) { - auto coreSettings = storm::settings::getModule(); - - // For several engines, no model building step is performed, but the verification is started right away. - storm::settings::modules::CoreSettings::Engine engine = coreSettings.getEngine(); - if (engine == storm::settings::modules::CoreSettings::Engine::AbstractionRefinement) { - verifyWithAbstractionRefinementEngine(input); - } else if (engine == storm::settings::modules::CoreSettings::Engine::Exploration) { - verifyWithExplorationEngine(input); - } else { - auto ioSettings = storm::settings::getModule(); - - std::shared_ptr model; - if (!ioSettings.isNoBuildModelSet()) { - model = buildModel(engine, input, ioSettings); - } - - if (model) { - model->printModelInformationToStream(std::cout); - } - - STORM_LOG_THROW(model || input.properties.empty(), storm::exceptions::InvalidSettingsException, "No input model."); - - if (model) { - auto preprocessingResult = preprocessModel(model, input); - if (preprocessingResult.second) { - model = preprocessingResult.first; - model->printModelInformationToStream(std::cout); - } - } - - if (model) { - exportModel(model, input); - - if (coreSettings.isCounterexampleSet()) { - generateCounterexamples(model, input); - } else { - verifyModel(model, input, coreSettings); - } - } - } - } - - template - void processInputWithValueType(SymbolicInput const& input) { - auto coreSettings = storm::settings::getModule(); - - if (coreSettings.getDdLibraryType() == storm::dd::DdType::CUDD) { - processInputWithValueTypeAndDdlib(input); - } else { - STORM_LOG_ASSERT(coreSettings.getDdLibraryType() == storm::dd::DdType::Sylvan, "Unknown DD library."); - processInputWithValueTypeAndDdlib(input); - } - } void processOptions() { // Start by setting some urgent options (log levels, resources, etc.) diff --git a/src/storm-cli-utilities/model-handling.h b/src/storm-cli-utilities/model-handling.h new file mode 100644 index 000000000..48fb21c8e --- /dev/null +++ b/src/storm-cli-utilities/model-handling.h @@ -0,0 +1,639 @@ +#pragma once + +#include "storm/api/storm.h" + + +#include "storm/utility/resources.h" +#include "storm/utility/file.h" +#include "storm/utility/storm-version.h" +#include "storm/utility/macros.h" + +#include "storm/utility/initialize.h" +#include "storm/utility/Stopwatch.h" + +#include + + +#include "storm/storage/SymbolicModelDescription.h" + +#include "storm/models/ModelBase.h" + +#include "storm/exceptions/OptionParserException.h" + +#include "storm/modelchecker/results/SymbolicQualitativeCheckResult.h" + +#include "storm/models/sparse/StandardRewardModel.h" +#include "storm/models/symbolic/StandardRewardModel.h" + +#include "storm/settings/SettingsManager.h" +#include "storm/settings/modules/ResourceSettings.h" +#include "storm/settings/modules/JitBuilderSettings.h" +#include "storm/settings/modules/DebugSettings.h" +#include "storm/settings/modules/IOSettings.h" +#include "storm/settings/modules/CoreSettings.h" +#include "storm/settings/modules/ResourceSettings.h" +#include "storm/settings/modules/JaniExportSettings.h" + +#include "storm/utility/Stopwatch.h" + +namespace storm { + namespace cli { + + + struct SymbolicInput { + // The symbolic model description. + boost::optional model; + + // The properties to check. + std::vector properties; + }; + + void parseSymbolicModelDescription(storm::settings::modules::IOSettings const& ioSettings, SymbolicInput& input) { + if (ioSettings.isPrismOrJaniInputSet()) { + if (ioSettings.isPrismInputSet()) { + input.model = storm::api::parseProgram(ioSettings.getPrismInputFilename()); + } else { + auto janiInput = storm::api::parseJaniModel(ioSettings.getJaniInputFilename()); + input.model = janiInput.first; + auto const& janiPropertyInput = janiInput.second; + + if (ioSettings.isJaniPropertiesSet()) { + for (auto const& propName : ioSettings.getJaniProperties()) { + auto propertyIt = janiPropertyInput.find(propName); + STORM_LOG_THROW(propertyIt != janiPropertyInput.end(), storm::exceptions::InvalidArgumentException, "No JANI property with name '" << propName << "' is known."); + input.properties.emplace_back(propertyIt->second); + } + } + } + } + } + + void parseProperties(storm::settings::modules::IOSettings const& ioSettings, SymbolicInput& input, boost::optional> const& propertyFilter) { + if (ioSettings.isPropertySet()) { + std::vector newProperties; + if (input.model) { + newProperties = storm::api::parsePropertiesForSymbolicModelDescription(ioSettings.getProperty(), input.model.get(), propertyFilter); + } else { + newProperties = storm::api::parseProperties(ioSettings.getProperty(), propertyFilter); + } + + input.properties.insert(input.properties.end(), newProperties.begin(), newProperties.end()); + } + } + + SymbolicInput parseSymbolicInput() { + auto ioSettings = storm::settings::getModule(); + + // Parse the property filter, if any is given. + boost::optional> propertyFilter = storm::api::parsePropertyFilter(ioSettings.getPropertyFilter()); + + SymbolicInput input; + parseSymbolicModelDescription(ioSettings, input); + parseProperties(ioSettings, input, propertyFilter); + + return input; + } + + SymbolicInput preprocessSymbolicInput(SymbolicInput const& input) { + auto ioSettings = storm::settings::getModule(); + auto coreSettings = storm::settings::getModule(); + + SymbolicInput output = input; + + // Substitute constant definitions in symbolic input. + std::string constantDefinitionString = ioSettings.getConstantDefinitionString(); + std::map constantDefinitions; + if (output.model) { + constantDefinitions = output.model.get().parseConstantDefinitions(constantDefinitionString); + output.model = output.model.get().preprocess(constantDefinitions); + } + if (!output.properties.empty()) { + output.properties = storm::api::substituteConstantsInProperties(output.properties, constantDefinitions); + } + + // Check whether conversion for PRISM to JANI is requested or necessary. + if (input.model && input.model.get().isPrismProgram()) { + bool transformToJani = ioSettings.isPrismToJaniSet(); + bool transformToJaniForJit = coreSettings.getEngine() == storm::settings::modules::CoreSettings::Engine::Sparse && ioSettings.isJitSet(); + STORM_LOG_WARN_COND(transformToJani || !transformToJaniForJit, "The JIT-based model builder is only available for JANI models, automatically converting the PRISM input model."); + transformToJani |= transformToJaniForJit; + + if (transformToJani) { + storm::prism::Program const& model = output.model.get().asPrismProgram(); + auto modelAndRenaming = model.toJaniWithLabelRenaming(true); + output.model = modelAndRenaming.first; + + if (!modelAndRenaming.second.empty()) { + std::map const& labelRenaming = modelAndRenaming.second; + std::vector amendedProperties; + for (auto const& property : output.properties) { + amendedProperties.emplace_back(property.substituteLabels(labelRenaming)); + } + output.properties = std::move(amendedProperties); + } + } + } + + return output; + } + + void exportSymbolicInput(SymbolicInput const& input) { + auto ioSettings = storm::settings::getModule(); + if (input.model && input.model.get().isJaniModel()) { + storm::storage::SymbolicModelDescription const& model = input.model.get(); + if (ioSettings.isExportJaniDotSet()) { + storm::api::exportJaniModelAsDot(model.asJaniModel(), ioSettings.getExportJaniDotFilename()); + } + + if (model.isJaniModel() && storm::settings::getModule().isJaniFileSet()) { + storm::api::exportJaniModel(model.asJaniModel(), input.properties, storm::settings::getModule().getJaniFilename()); + } + } + } + + SymbolicInput parseAndPreprocessSymbolicInput() { + SymbolicInput input = parseSymbolicInput(); + input = preprocessSymbolicInput(input); + exportSymbolicInput(input); + return input; + } + + std::vector> createFormulasToRespect(std::vector const& properties) { + std::vector> result = storm::api::extractFormulasFromProperties(properties); + + for (auto const& property : properties) { + if (!property.getFilter().getStatesFormula()->isInitialFormula()) { + result.push_back(property.getFilter().getStatesFormula()); + } + } + + return result; + } + + template + std::shared_ptr buildModelDd(SymbolicInput const& input) { + return storm::api::buildSymbolicModel(input.model.get(), createFormulasToRespect(input.properties)); + } + + template + std::shared_ptr buildModelSparse(SymbolicInput const& input, storm::settings::modules::IOSettings const& ioSettings) { + auto counterexampleGeneratorSettings = storm::settings::getModule(); + storm::builder::BuilderOptions options(createFormulasToRespect(input.properties)); + options.setBuildChoiceLabels(ioSettings.isBuildChoiceLabelsSet()); + options.setBuildChoiceOrigins(counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet()); + options.setBuildAllLabels(ioSettings.isBuildFullModelSet()); + options.setBuildAllRewardModels(ioSettings.isBuildFullModelSet()); + if (ioSettings.isBuildFullModelSet()) { + options.clearTerminalStates(); + } + return storm::api::buildSparseModel(input.model.get(), options, ioSettings.isJitSet(), storm::settings::getModule().isDoctorSet()); + } + + template + std::shared_ptr buildModelExplicit(storm::settings::modules::IOSettings const& ioSettings) { + std::shared_ptr result; + if (ioSettings.isExplicitSet()) { + result = storm::api::buildExplicitModel(ioSettings.getTransitionFilename(), ioSettings.getLabelingFilename(), ioSettings.isStateRewardsSet() ? boost::optional(ioSettings.getStateRewardsFilename()) : boost::none, ioSettings.isTransitionRewardsSet() ? boost::optional(ioSettings.getTransitionRewardsFilename()) : boost::none, ioSettings.isChoiceLabelingSet() ? boost::optional(ioSettings.getChoiceLabelingFilename()) : boost::none); + } else if (ioSettings.isExplicitDRNSet()) { + result = storm::api::buildExplicitDRNModel(ioSettings.getExplicitDRNFilename()); + } else { + STORM_LOG_THROW(ioSettings.isExplicitIMCASet(), storm::exceptions::InvalidSettingsException, "Unexpected explicit model input type."); + result = storm::api::buildExplicitIMCAModel(ioSettings.getExplicitIMCAFilename()); + } + return result; + } + + template + std::shared_ptr buildModel(storm::settings::modules::CoreSettings::Engine const& engine, SymbolicInput const& input, storm::settings::modules::IOSettings const& ioSettings) { + storm::utility::Stopwatch modelBuildingWatch(true); + + std::shared_ptr result; + if (input.model) { + if (engine == storm::settings::modules::CoreSettings::Engine::Dd || engine == storm::settings::modules::CoreSettings::Engine::Hybrid) { + result = buildModelDd(input); + } else if (engine == storm::settings::modules::CoreSettings::Engine::Sparse) { + result = buildModelSparse(input, ioSettings); + } + } else if (ioSettings.isExplicitSet() || ioSettings.isExplicitDRNSet() || ioSettings.isExplicitIMCASet()) { + STORM_LOG_THROW(engine == storm::settings::modules::CoreSettings::Engine::Sparse, storm::exceptions::InvalidSettingsException, "Can only use sparse engine with explicit input."); + result = buildModelExplicit(ioSettings); + } + + modelBuildingWatch.stop(); + if (result) { + STORM_PRINT_AND_LOG("Time for model construction: " << modelBuildingWatch << "." << std::endl << std::endl); + } + + return result; + } + + template + std::shared_ptr> preprocessSparseMarkovAutomaton(std::shared_ptr> const& model) { + std::shared_ptr> result = model; + model->close(); + if (model->hasOnlyTrivialNondeterminism()) { + result = model->convertToCTMC(); + } + return result; + } + + template + std::shared_ptr> preprocessSparseModelBisimulation(std::shared_ptr> const& model, SymbolicInput const& input, storm::settings::modules::BisimulationSettings const& bisimulationSettings) { + storm::storage::BisimulationType bisimType = storm::storage::BisimulationType::Strong; + if (bisimulationSettings.isWeakBisimulationSet()) { + bisimType = storm::storage::BisimulationType::Weak; + } + + STORM_LOG_INFO("Performing bisimulation minimization..."); + return storm::api::performBisimulationMinimization(model, createFormulasToRespect(input.properties), bisimType); + } + + template + std::pair>, bool> preprocessSparseModel(std::shared_ptr> const& model, SymbolicInput const& input) { + auto generalSettings = storm::settings::getModule(); + auto bisimulationSettings = storm::settings::getModule(); + auto ioSettings = storm::settings::getModule(); + + std::pair>, bool> result = std::make_pair(model, false); + + if (result.first->isOfType(storm::models::ModelType::MarkovAutomaton)) { + result.first = preprocessSparseMarkovAutomaton(result.first->template as>()); + result.second = true; + } + + if (generalSettings.isBisimulationSet()) { + result.first = preprocessSparseModelBisimulation(result.first, input, bisimulationSettings); + result.second = true; + } + + return result; + } + + template + void exportSparseModel(std::shared_ptr> const& model, SymbolicInput const& input) { + auto ioSettings = storm::settings::getModule(); + + if (ioSettings.isExportExplicitSet()) { + storm::api::exportSparseModelAsDrn(model, ioSettings.getExportExplicitFilename(), input.model ? input.model.get().getParameterNames() : std::vector()); + } + + if (ioSettings.isExportDotSet()) { + storm::api::exportSparseModelAsDot(model, ioSettings.getExportDotFilename()); + } + } + + template + void exportDdModel(std::shared_ptr> const& model, SymbolicInput const& input) { + // Intentionally left empty. + } + + template + void exportModel(std::shared_ptr const& model, SymbolicInput const& input) { + if (model->isSparseModel()) { + exportSparseModel(model->as>(), input); + } else { + exportDdModel(model->as>(), input); + } + } + + template + std::pair, bool> preprocessDdModel(std::shared_ptr> const& model, SymbolicInput const& input) { + return std::make_pair(model, false); + } + + template + std::pair, bool> preprocessModel(std::shared_ptr const& model, SymbolicInput const& input) { + storm::utility::Stopwatch preprocessingWatch(true); + + std::pair, bool> result = std::make_pair(model, false); + if (model->isSparseModel()) { + result = preprocessSparseModel(result.first->as>(), input); + } else { + STORM_LOG_ASSERT(model->isSymbolicModel(), "Unexpected model type."); + result = preprocessDdModel(result.first->as>(), input); + } + + if (result.second) { + STORM_PRINT_AND_LOG(std::endl << "Time for model preprocessing: " << preprocessingWatch << "." << std::endl << std::endl); + } + return result; + } + + void printComputingCounterexample(storm::jani::Property const& property) { + STORM_PRINT_AND_LOG("Computing counterexample for property " << *property.getRawFormula() << " ..." << std::endl); + } + + void printCounterexample(std::shared_ptr const& counterexample, storm::utility::Stopwatch* watch = nullptr) { + if (counterexample) { + STORM_PRINT_AND_LOG(*counterexample << std::endl); + if (watch) { + STORM_PRINT_AND_LOG("Time for computation: " << *watch << "." << std::endl); + } + } else { + STORM_PRINT_AND_LOG(" failed." << std::endl); + } + } + + template + void generateCounterexamples(std::shared_ptr const& model, SymbolicInput const& input) { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Counterexample generation is not supported for this data-type."); + } + + template <> + void generateCounterexamples(std::shared_ptr const& model, SymbolicInput const& input) { + typedef double ValueType; + + STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::NotSupportedException, "Counterexample generation is currently only supported for sparse models."); + auto sparseModel = model->as>(); + + STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Mdp), storm::exceptions::NotSupportedException, "Counterexample is currently only supported for MDPs."); + auto mdp = sparseModel->template as>(); + + auto counterexampleSettings = storm::settings::getModule(); + if (counterexampleSettings.isMinimalCommandSetGenerationSet()) { + STORM_LOG_THROW(input.model && input.model.get().isPrismProgram(), storm::exceptions::NotSupportedException, "Minimal command set counterexamples are only supported for PRISM model input."); + storm::prism::Program const& program = input.model.get().asPrismProgram(); + + bool useMilp = counterexampleSettings.isUseMilpBasedMinimalCommandSetGenerationSet(); + for (auto const& property : input.properties) { + std::shared_ptr counterexample; + printComputingCounterexample(property); + storm::utility::Stopwatch watch(true); + if (useMilp) { + counterexample = storm::api::computePrismHighLevelCounterexampleMilp(program, mdp, property.getRawFormula()); + } else { + counterexample = storm::api::computePrismHighLevelCounterexampleMaxSmt(program, mdp, property.getRawFormula()); + } + watch.stop(); + printCounterexample(counterexample, &watch); + } + } else { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "The selected counterexample formalism is unsupported."); + } + } + + template + void printFilteredResult(std::unique_ptr const& result, storm::modelchecker::FilterType ft) { + if (result->isQuantitative()) { + switch (ft) { + case storm::modelchecker::FilterType::VALUES: + STORM_PRINT_AND_LOG(*result); + break; + case storm::modelchecker::FilterType::SUM: + STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().sum()); + break; + case storm::modelchecker::FilterType::AVG: + STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().average()); + break; + case storm::modelchecker::FilterType::MIN: + STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().getMin()); + break; + case storm::modelchecker::FilterType::MAX: + STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().getMax()); + break; + case storm::modelchecker::FilterType::ARGMIN: + case storm::modelchecker::FilterType::ARGMAX: + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Outputting states is not supported."); + case storm::modelchecker::FilterType::EXISTS: + case storm::modelchecker::FilterType::FORALL: + case storm::modelchecker::FilterType::COUNT: + STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Filter type only defined for qualitative results."); + } + } else { + switch (ft) { + case storm::modelchecker::FilterType::VALUES: + STORM_PRINT_AND_LOG(*result << std::endl); + break; + case storm::modelchecker::FilterType::EXISTS: + STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().existsTrue()); + break; + case storm::modelchecker::FilterType::FORALL: + STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().forallTrue()); + break; + case storm::modelchecker::FilterType::COUNT: + STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().count()); + break; + case storm::modelchecker::FilterType::ARGMIN: + case storm::modelchecker::FilterType::ARGMAX: + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Outputting states is not supported."); + case storm::modelchecker::FilterType::SUM: + case storm::modelchecker::FilterType::AVG: + case storm::modelchecker::FilterType::MIN: + case storm::modelchecker::FilterType::MAX: + STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Filter type only defined for quantitative results."); + } + } + STORM_PRINT_AND_LOG(std::endl); + } + + void printModelCheckingProperty(storm::jani::Property const& property) { + STORM_PRINT_AND_LOG(std::endl << "Model checking property " << *property.getRawFormula() << " ..." << std::endl); + } + + template + void printResult(std::unique_ptr const& result, storm::jani::Property const& property, storm::utility::Stopwatch* watch = nullptr) { + if (result) { + std::stringstream ss; + ss << "'" << *property.getFilter().getStatesFormula() << "'"; + STORM_PRINT_AND_LOG("Result (for " << (property.getFilter().getStatesFormula()->isInitialFormula() ? "initial" : ss.str()) << " states): "); + printFilteredResult(result, property.getFilter().getFilterType()); + if (watch) { + STORM_PRINT_AND_LOG("Time for model checking: " << *watch << "." << std::endl); + } + } else { + STORM_PRINT_AND_LOG(" failed, property is unsupported by selected engine/settings." << std::endl); + } + } + + struct PostprocessingIdentity { + void operator()(std::unique_ptr const&) { + // Intentionally left empty. + } + }; + + template + void verifyProperties(std::vector const& properties, std::function(std::shared_ptr const& formula, std::shared_ptr const& states)> const& verificationCallback, std::function const&)> const& postprocessingCallback = PostprocessingIdentity()) { + for (auto const& property : properties) { + printModelCheckingProperty(property); + storm::utility::Stopwatch watch(true); + std::unique_ptr result = verificationCallback(property.getRawFormula(), property.getFilter().getStatesFormula()); + watch.stop(); + postprocessingCallback(result); + printResult(result, property, &watch); + } + } + + template + void verifyWithAbstractionRefinementEngine(SymbolicInput const& input) { + STORM_LOG_ASSERT(input.model, "Expected symbolic model description."); + verifyProperties(input.properties, [&input] (std::shared_ptr const& formula, std::shared_ptr const& states) { + STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException, "Abstraction-refinement can only filter initial states."); + return storm::api::verifyWithAbstractionRefinementEngine(input.model.get(), storm::api::createTask(formula, true)); + }); + } + + template + void verifyWithExplorationEngine(SymbolicInput const& input) { + STORM_LOG_ASSERT(input.model, "Expected symbolic model description."); + STORM_LOG_THROW((std::is_same::value), storm::exceptions::NotSupportedException, "Exploration does not support other data-types than floating points."); + verifyProperties(input.properties, [&input] (std::shared_ptr const& formula, std::shared_ptr const& states) { + STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException, "Exploration can only filter initial states."); + return storm::api::verifyWithExplorationEngine(input.model.get(), storm::api::createTask(formula, true)); + }); + } + + template + void verifyWithSparseEngine(std::shared_ptr const& model, SymbolicInput const& input) { + auto sparseModel = model->as>(); + verifyProperties(input.properties, + [&sparseModel] (std::shared_ptr const& formula, std::shared_ptr const& states) { + bool filterForInitialStates = states->isInitialFormula(); + auto task = storm::api::createTask(formula, filterForInitialStates); + std::unique_ptr result = storm::api::verifyWithSparseEngine(sparseModel, task); + + std::unique_ptr filter; + if (filterForInitialStates) { + filter = std::make_unique(sparseModel->getInitialStates()); + } else { + filter = storm::api::verifyWithSparseEngine(sparseModel, storm::api::createTask(states, false)); + } + if (result && filter) { + result->filter(filter->asQualitativeCheckResult()); + } + return result; + }); + } + + template + void verifyWithHybridEngine(std::shared_ptr const& model, SymbolicInput const& input) { + verifyProperties(input.properties, [&model] (std::shared_ptr const& formula, std::shared_ptr const& states) { + bool filterForInitialStates = states->isInitialFormula(); + auto task = storm::api::createTask(formula, filterForInitialStates); + + auto symbolicModel = model->as>(); + std::unique_ptr result = storm::api::verifyWithHybridEngine(symbolicModel, task); + + std::unique_ptr filter; + if (filterForInitialStates) { + filter = std::make_unique>(symbolicModel->getReachableStates(), symbolicModel->getInitialStates()); + } else { + filter = storm::api::verifyWithHybridEngine(symbolicModel, storm::api::createTask(states, false)); + } + if (result && filter) { + result->filter(filter->asQualitativeCheckResult()); + } + return result; + }); + } + + template + void verifyWithDdEngine(std::shared_ptr const& model, SymbolicInput const& input) { + verifyProperties(input.properties, [&model] (std::shared_ptr const& formula, std::shared_ptr const& states) { + bool filterForInitialStates = states->isInitialFormula(); + auto task = storm::api::createTask(formula, filterForInitialStates); + + auto symbolicModel = model->as>(); + std::unique_ptr result = storm::api::verifyWithDdEngine(model->as>(), storm::api::createTask(formula, true)); + + std::unique_ptr filter; + if (filterForInitialStates) { + filter = std::make_unique>(symbolicModel->getReachableStates(), symbolicModel->getInitialStates()); + } else { + filter = storm::api::verifyWithDdEngine(symbolicModel, storm::api::createTask(states, false)); + } + if (result && filter) { + result->filter(filter->asQualitativeCheckResult()); + } + return result; + }); + } + + template + typename std::enable_if::value, void>::type verifySymbolicModel(std::shared_ptr const& model, SymbolicInput const& input, storm::settings::modules::CoreSettings const& coreSettings) { + bool hybrid = coreSettings.getEngine() == storm::settings::modules::CoreSettings::Engine::Hybrid; + if (hybrid) { + verifyWithHybridEngine(model, input); + } else { + verifyWithDdEngine(model, input); + } + } + + template + typename std::enable_if::value, void>::type verifySymbolicModel(std::shared_ptr const& model, SymbolicInput const& input, storm::settings::modules::CoreSettings const& coreSettings) { + STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "CUDD does not support the selected data-type."); + } + + template + void verifyModel(std::shared_ptr const& model, SymbolicInput const& input, storm::settings::modules::CoreSettings const& coreSettings) { + if (model->isSparseModel()) { + verifyWithSparseEngine(model, input); + } else { + STORM_LOG_ASSERT(model->isSymbolicModel(), "Unexpected model type."); + verifySymbolicModel(model, input, coreSettings); + } + } + + template + std::shared_ptr buildPreprocessExportModelWithValueTypeAndDdlib(SymbolicInput const& input, storm::settings::modules::CoreSettings::Engine engine) { + auto ioSettings = storm::settings::getModule(); + std::shared_ptr model; + if (!ioSettings.isNoBuildModelSet()) { + model = buildModel(engine, input, ioSettings); + } + + if (model) { + model->printModelInformationToStream(std::cout); + } + + STORM_LOG_THROW(model || input.properties.empty(), storm::exceptions::InvalidSettingsException, "No input model."); + + if (model) { + auto preprocessingResult = preprocessModel(model, input); + if (preprocessingResult.second) { + model = preprocessingResult.first; + model->printModelInformationToStream(std::cout); + } + exportModel(model, input); + } + return model; + } + + template + void processInputWithValueTypeAndDdlib(SymbolicInput const& input) { + auto coreSettings = storm::settings::getModule(); + + // For several engines, no model building step is performed, but the verification is started right away. + storm::settings::modules::CoreSettings::Engine engine = coreSettings.getEngine(); + if (engine == storm::settings::modules::CoreSettings::Engine::AbstractionRefinement) { + verifyWithAbstractionRefinementEngine(input); + } else if (engine == storm::settings::modules::CoreSettings::Engine::Exploration) { + verifyWithExplorationEngine(input); + } else { + std::shared_ptr model = buildPreprocessExportModelWithValueTypeAndDdlib(input, engine); + + if (model) { + if (coreSettings.isCounterexampleSet()) { + auto ioSettings = storm::settings::getModule(); + generateCounterexamples(model, input); + } else { + auto ioSettings = storm::settings::getModule(); + verifyModel(model, input, coreSettings); + } + } + } + } + + template + void processInputWithValueType(SymbolicInput const& input) { + auto coreSettings = storm::settings::getModule(); + + if (coreSettings.getDdLibraryType() == storm::dd::DdType::CUDD) { + processInputWithValueTypeAndDdlib(input); + } else { + STORM_LOG_ASSERT(coreSettings.getDdLibraryType() == storm::dd::DdType::Sylvan, "Unknown DD library."); + processInputWithValueTypeAndDdlib(input); + } + } + +} +} \ No newline at end of file From d2002129b7acfcc3850af3a6c3d7540b2e4d8ff1 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 22 Aug 2017 16:54:39 +0200 Subject: [PATCH 107/110] remove output --- src/storm/analysis/GraphConditions.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/storm/analysis/GraphConditions.cpp b/src/storm/analysis/GraphConditions.cpp index ef77a720b..be8073bf7 100644 --- a/src/storm/analysis/GraphConditions.cpp +++ b/src/storm/analysis/GraphConditions.cpp @@ -58,7 +58,6 @@ namespace storm { for (auto transitionIt = model.getTransitionMatrix().begin(action); transitionIt != model.getTransitionMatrix().end(action); ++transitionIt) { auto const& transition = *transitionIt; - std::cout << transition.getValue() << std::endl; sum += transition.getValue(); if (!storm::utility::isConstant(transition.getValue())) { auto const& transitionVars = transition.getValue().gatherVariables(); From d271824461acc9fd1414887308b15422962ba979 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 22 Aug 2017 16:55:44 +0200 Subject: [PATCH 108/110] prepare to initialize but not make settings known, not yet fully functioning --- src/storm/settings/SettingsManager.cpp | 15 +++++++++------ src/storm/settings/SettingsManager.h | 6 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/storm/settings/SettingsManager.cpp b/src/storm/settings/SettingsManager.cpp index 493ea71a2..e38c5daf2 100644 --- a/src/storm/settings/SettingsManager.cpp +++ b/src/storm/settings/SettingsManager.cpp @@ -271,7 +271,7 @@ namespace storm { return moduleIterator->second->getPrintLengthOfLongestOption(); } - void SettingsManager::addModule(std::unique_ptr&& moduleSettings) { + void SettingsManager::addModule(std::unique_ptr&& moduleSettings, bool doRegister) { auto moduleIterator = this->modules.find(moduleSettings->getModuleName()); STORM_LOG_THROW(moduleIterator == this->modules.end(), storm::exceptions::IllegalFunctionCallException, "Unable to register module '" << moduleSettings->getModuleName() << "' because a module with the same name already exists."); @@ -281,12 +281,15 @@ namespace storm { this->modules.emplace(moduleSettings->getModuleName(), std::move(moduleSettings)); auto iterator = this->modules.find(moduleName); std::unique_ptr const& settings = iterator->second; - - // Now register the options of the module. - this->moduleOptions.emplace(moduleName, std::vector>()); - for (auto const& option : settings->getOptions()) { - this->addOption(option); + + if (doRegister) { + // Now register the options of the module. + this->moduleOptions.emplace(moduleName, std::vector>()); + for (auto const& option : settings->getOptions()) { + this->addOption(option); + } } + } void SettingsManager::addOption(std::shared_ptr