Make regress1 default, only test regress0 on Travis. (#1611)
[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 CVC4_REGRESSION_ARGS='--no-early-exit' ||
81 error "DISTCHECK (WITH NEWTHEORY TESTS) FAILED";
82 }
83 makeCheck() {
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";
87 }
88 makeExamples() {
89 make V=1 -j2 examples || error "COULD NOT BUILD EXAMPLES${normal}";
90 }
91 addNewTheoryTest() {
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";
96 }
97 run() {
98 echo "travis_fold:start:$1"
99 echo "Running $1"
100 $1 || exit 1
101 echo "travis_fold:end:$1"
102 }
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}"
112 - ccache -s
113 matrix:
114 fast_finish: true
115 include:
116 # Test with GCC
117 - compiler: gcc
118 env:
119 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='production --enable-language-bindings=java,c --with-lfsc'
120 - compiler: gcc
121 env:
122 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-lfsc --disable-debug-symbols'
123 #
124 # Test with Clang
125 - compiler: clang
126 env:
127 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-cln --enable-gpl --disable-debug-symbols --disable-proof'
128 - compiler: clang
129 env:
130 - TRAVIS_CVC4=yes TRAVIS_CVC4_DISTCHECK=yes TRAVIS_CVC4_CONFIG='--enable-proof'
131 # Rule for running Coverity Scan.
132 - os: linux
133 compiler: gcc
134 env:
135 - TRAVIS_COVERITY=yes CVC4_REGRESSION_ARGS='--no-early-exit'
136 addons:
137 # Need to duplicate as addons will be over written.
138 apt:
139 sources:
140 - ubuntu-toolchain-r-test
141 packages:
142 - *common_deps
143 coverity_scan:
144 project:
145 name: "CVC4/CVC4"
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
151 after_failure:
152 - cat /home/travis/build/CVC4/CVC4/cov-int/build-log.txt
153
154 notifications:
155 email:
156 on_success: change
157 on_failure: always