# Fix Travis write errors on Clang builds. These write errors occurred after # a Travis update to new Trusty images on Dec. 12th 2017. The reason for these # write errors is unknown. Using the deprecated builds did not fix the problem. # Setting 'filter_secrets: false' as suggested here # https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-321777557 # fixes the problem. filter_secrets: false language: cpp cache: - apt - ccache sudo: false dist: trusty env: global: - CCACHE_COMPRESS=1 addons: apt: sources: - ubuntu-toolchain-r-test packages: &common_deps - antlr3 - cmake - cxxtest - junit4 - libantlr3c-dev - libboost-dev # Remove with autotools build - libboost-thread-dev # Remove with autotools build - libcln-dev - libgmp-dev - libhamcrest-java - openjdk-7-jdk - swig3.0 before_install: - eval "${MATRIX_EVAL}" # Clang does not play nice with ccache (at least the versions offered by # Travis), use a workaround: # https://github.com/travis-ci/travis-ci/issues/5383#issuecomment-224630584 - | if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then export CFLAGS="-Qunused-arguments" export CXXFLAGS="-Qunused-arguments" sudo ln -s $(which ccache) /usr/lib/ccache/clang sudo ln -s $(which ccache) /usr/lib/ccache/clang++ fi before_script: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 script: - ccache -M 1G - ccache -z - ${CC} --version - ${CXX} --version - | echo "travis_fold:start:load_script" normal="$(echo -e '\033[0m')" red="$normal$(echo -e '\033[01;31m')" green="$normal$(echo -e '\033[01;32m')" configureCVC4() { echo "CVC4 config - $TRAVIS_CVC4_CONFIG"; ./configure.sh --name=build --unit-testing $TRAVIS_CVC4_CONFIG } error() { echo; echo "${red}${1}${normal}"; echo; exit 1; } makeAutotools() { ./autogen.sh ./configure debug --with-lfsc --disable-debug-symbols make -j2 check REGRESSION_LEVEL=0 CVC4_REGRESSION_ARGS='--no-early-exit' || error "AUTOTOOLS BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED" } # makeDistcheck() { # make V=1 -j2 distcheck REGRESSION_LEVEL=0 CVC4_REGRESSION_ARGS='--no-early-exit' || # error "DISTCHECK (WITH NEWTHEORY TESTS) FAILED"; # } makeCheck() { cd build make -j2 check ARGS='-LE regress[1-4]' CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED" } makeExamples() { cd build make -j2 examples || error "COULD NOT BUILD EXAMPLES${normal}"; } # addNewTheoryTest() { # contrib/new-theory test_newtheory || error "NEWTHEORY FAILED"; # grep -q '^THEORIES *=.* test_newtheory' src/Makefile.theories || error "NEWTHEORY FAILED"; # contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED"; # grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.theories || error "NEWTHEORY-ALTERNATE FAILED"; # } run() { echo "travis_fold:start:$1" echo "Running $1" $1 || exit 1 echo "travis_fold:end:$1" } [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_WITH_LFSC" ] && run contrib/get-lfsc-checker [ -n "$TRAVIS_AUTOTOOLS" ] && run makeAutotools # [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run addNewTheoryTest [ -n "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_AUTOTOOLS" ] && run configureCVC4 # [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run makeDistcheck [ -n "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_CVC4_DISTCHECK" ] && [ -z "$TRAVIS_AUTOTOOLS" ] && run makeCheck && run makeExamples [ -z "$TRAVIS_CVC4" ] && error "Unknown Travis-CI configuration" echo "travis_fold:end:load_script" - echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}" - ccache -s matrix: fast_finish: true include: # Test with GCC - compiler: gcc env: - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='production --language-bindings=java --lfsc' - compiler: gcc env: - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --lfsc --no-debug-symbols' # Add autotools build until cmake is the default - compiler: gcc env: - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_AUTOTOOLS=yes # # Test with Clang - compiler: clang env: - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --cln --gpl --no-debug-symbols --no-proofs' - compiler: clang env: - TRAVIS_CVC4=yes TRAVIS_CVC4_DISTCHECK=yes TRAVIS_CVC4_CONFIG='--proofs' notifications: email: on_success: change on_failure: always