Improvements and fixes in cegqi arithmetic (#2247)
[cvc5.git] / .travis.yml
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
6 # fixes the problem.
7 filter_secrets: false
8
9 language: cpp
10 cache:
11 - apt
12 - ccache
13
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.
17 sudo: required
18 dist: trusty
19
20 env:
21 global:
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="
25 - TEST_GROUPS=2
26 - CCACHE_COMPRESS=1
27 addons:
28 apt:
29 sources:
30 - ubuntu-toolchain-r-test
31 packages: &common_deps
32 - libgmp-dev
33 - libboost-dev
34 - libboost-thread-dev
35 - swig
36 - libcln-dev
37 - openjdk-7-jdk
38 - antlr3
39 - libantlr3c-dev
40 - ant-optional
41 - cxxtest
42 - libreadline-dev
43 before_install:
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
48 - |
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++
54 fi
55 before_script:
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
59 - ./autogen.sh
60 script:
61 - ccache -M 1G
62 - ccache -z
63 - ${CC} --version
64 - ${CXX} --version
65 - |
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')"
68 configureCVC4() {
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");
72 }
73 error() {
74 echo;
75 echo "${red}${1}${normal}";
76 echo;
77 exit 1;
78 }
79 makeDistcheck() {
80 make V=1 -j2 distcheck REGRESSION_LEVEL=0 CVC4_REGRESSION_ARGS='--no-early-exit' ||
81 error "DISTCHECK (WITH NEWTHEORY TESTS) FAILED";
82 }
83 makeCheck() {
84 make V=1 -j2 check REGRESSION_LEVEL=0 CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED"
85 }
86 makeExamples() {
87 make V=1 -j2 examples || error "COULD NOT BUILD EXAMPLES${normal}";
88 }
89 addNewTheoryTest() {
90 contrib/new-theory test_newtheory || error "NEWTHEORY FAILED";
91 grep -q '^THEORIES *=.* test_newtheory' src/Makefile.theories || error "NEWTHEORY FAILED";
92 contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED";
93 grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.theories || error "NEWTHEORY-ALTERNATE FAILED";
94 }
95 run() {
96 echo "travis_fold:start:$1"
97 echo "Running $1"
98 $1 || exit 1
99 echo "travis_fold:end:$1"
100 }
101 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_WITH_LFSC" ] && run contrib/get-lfsc-checker
102 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run addNewTheoryTest
103 [ -n "$TRAVIS_CVC4" ] && run configureCVC4
104 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run makeDistcheck
105 [ -n "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_CVC4_DISTCHECK" ] && run makeCheck && run makeExamples
106 [ -n "$TRAVIS_COVERITY" ] && echo "Running coverity. Skipping the normal build."
107 [ -z "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_COVERITY" ] && error "Unknown Travis-CI configuration"
108 echo "travis_fold:end:load_script"
109 - echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
110 - ccache -s
111 matrix:
112 fast_finish: true
113 include:
114 # Test with GCC
115 - compiler: gcc
116 env:
117 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='production --enable-language-bindings=java,c --with-lfsc'
118 - compiler: gcc
119 env:
120 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-lfsc --disable-debug-symbols'
121 #
122 # Test with Clang
123 - compiler: clang
124 env:
125 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-cln --enable-gpl --disable-debug-symbols --disable-proof'
126 - compiler: clang
127 env:
128 - TRAVIS_CVC4=yes TRAVIS_CVC4_DISTCHECK=yes TRAVIS_CVC4_CONFIG='--enable-proof'
129 # Rule for running Coverity Scan.
130 - os: linux
131 compiler: gcc
132 env:
133 - TRAVIS_COVERITY=yes CVC4_REGRESSION_ARGS='--no-early-exit'
134 addons:
135 # Need to duplicate as addons will be over written.
136 apt:
137 sources:
138 - ubuntu-toolchain-r-test
139 packages:
140 - *common_deps
141 coverity_scan:
142 project:
143 name: "CVC4/CVC4"
144 description: "Build submitted via Travis CI"
145 notification_email: timothy.alan.king@gmail.com
146 build_command_prepend: "./autogen.sh; ./configure --enable-unit-testing --enable-proof"
147 build_command: "make V=1 -j4"
148 branch_pattern: coverity_scan
149 after_failure:
150 - cat /home/travis/build/CVC4/CVC4/cov-int/build-log.txt
151
152 notifications:
153 email:
154 on_success: change
155 on_failure: always