1 # Fix Travis write errors on Clang builds. These write errors occurred after
2 # a Travis update to new Trusty images on Dec. 12th 2017. The reason for these
3 # write errors is unknown. Using the deprecated builds did not fix the problem.
4 # Setting 'filter_secrets: false' as suggested here
5 # https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-321777557
14 # We need more than 4G memory for compiling CVC4. Hence, we cannot switch
15 # to container-based virtualization environments since they only provide 4G of
16 # memory. We will stick with the VM-based environments for now.
22 # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
23 # via the "travis encrypt" command using the project repo's public key
24 - secure: "fRfdzYwV10VeW5tVSvy5qpR8ZlkXepR7XWzCulzlHs9SRI2YY20BpzWRjyMBiGu2t7IeJKT7qdjq/CJOQEM8WS76ON7QJ1iymKaRDewDs3OhyPJ71fsFKEGgLky9blk7I9qZh23hnRVECj1oJAVry9IK04bc2zyIEjUYpjRkUAQ="
30 - ubuntu-toolchain-r-test
31 packages: &common_deps
44 - eval "${MATRIX_EVAL}"
45 # Clang does not play nice with ccache (at least the versions offered by
46 # Travis), use a workaround:
47 # https://github.com/travis-ci/travis-ci/issues/5383#issuecomment-224630584
49 if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then
50 export CFLAGS="-Qunused-arguments"
51 export CXXFLAGS="-Qunused-arguments"
52 sudo ln -s $(which ccache) /usr/lib/ccache/clang
53 sudo ln -s $(which ccache) /usr/lib/ccache/clang++
56 - export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
57 - export PATH=$PATH:$JAVA_HOME/bin
58 - export JAVA_CPPFLAGS=-I$JAVA_HOME/include
66 echo "travis_fold:start:load_script"
67 normal="$(echo -e '\033[0m')" red="$normal$(echo -e '\033[01;31m')" green="$normal$(echo -e '\033[01;32m')"
69 echo "CVC4 config - $TRAVIS_CVC4_CONFIG";
70 ./configure --enable-unit-testing $TRAVIS_CVC4_CONFIG ||
71 (echo; echo "Trying to print config.log"; cat builds/config.log; error "CONFIGURE FAILED");
75 echo "${red}${1}${normal}";
80 make V=1 -j2 distcheck CVC4_REGRESSION_ARGS='--no-early-exit' ||
81 error "DISTCHECK (WITH NEWTHEORY TESTS) FAILED";
84 make V=1 -j2 units || error "BUILD/UNIT TEST FAILED";
85 make V=1 -j2 systemtests || error "BUILD/SYSTEM TEST FAILED";
86 make V=1 -j2 regress0 CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/REGRESSION TEST FAILED";
89 make V=1 -j2 examples || error "COULD NOT BUILD EXAMPLES${normal}";
92 contrib/new-theory test_newtheory || error "NEWTHEORY FAILED";
93 grep -q '^THEORIES *=.* test_newtheory' src/Makefile.theories || error "NEWTHEORY FAILED";
94 contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED";
95 grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.theories || error "NEWTHEORY-ALTERNATE FAILED";
98 echo "travis_fold:start:$1"
101 echo "travis_fold:end:$1"
103 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_WITH_LFSC" ] && run contrib/get-lfsc-checker
104 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run addNewTheoryTest
105 [ -n "$TRAVIS_CVC4" ] && run configureCVC4
106 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run makeDistcheck
107 [ -n "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_CVC4_DISTCHECK" ] && run makeCheck && run makeExamples
108 [ -n "$TRAVIS_COVERITY" ] && echo "Running coverity. Skipping the normal build."
109 [ -z "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_COVERITY" ] && error "Unknown Travis-CI configuration"
110 echo "travis_fold:end:load_script"
111 - echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
119 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='production --enable-language-bindings=java,c --with-lfsc'
122 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-lfsc --disable-debug-symbols'
127 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-cln --enable-gpl --disable-debug-symbols --disable-proof'
130 - TRAVIS_CVC4=yes TRAVIS_CVC4_DISTCHECK=yes TRAVIS_CVC4_CONFIG='--enable-proof'
131 # Rule for running Coverity Scan.
135 - TRAVIS_COVERITY=yes CVC4_REGRESSION_ARGS='--no-early-exit'
137 # Need to duplicate as addons will be over written.
140 - ubuntu-toolchain-r-test
146 description: "Build submitted via Travis CI"
147 notification_email: timothy.alan.king@gmail.com
148 build_command_prepend: "./autogen.sh; ./configure --enable-unit-testing --enable-proof"
149 build_command: "make V=1 -j4"
150 branch_pattern: coverity_scan
152 - cat /home/travis/build/CVC4/CVC4/cov-int/build-log.txt