Remove Coverity build from Travis (#2373)
[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 - TEST_GROUPS=2
23 - CCACHE_COMPRESS=1
24 addons:
25 apt:
26 sources:
27 - ubuntu-toolchain-r-test
28 packages: &common_deps
29 - libgmp-dev
30 - libboost-dev
31 - libboost-thread-dev
32 - swig3.0
33 - libcln-dev
34 - openjdk-7-jdk
35 - antlr3
36 - libantlr3c-dev
37 - ant-optional
38 - cxxtest
39 - libreadline-dev
40 before_install:
41 - eval "${MATRIX_EVAL}"
42 # Clang does not play nice with ccache (at least the versions offered by
43 # Travis), use a workaround:
44 # https://github.com/travis-ci/travis-ci/issues/5383#issuecomment-224630584
45 - |
46 if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then
47 export CFLAGS="-Qunused-arguments"
48 export CXXFLAGS="-Qunused-arguments"
49 sudo ln -s $(which ccache) /usr/lib/ccache/clang
50 sudo ln -s $(which ccache) /usr/lib/ccache/clang++
51 fi
52 before_script:
53 - export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
54 - export PATH=$PATH:$JAVA_HOME/bin
55 - export JAVA_CPPFLAGS=-I$JAVA_HOME/include
56 - ./autogen.sh
57 script:
58 - ccache -M 1G
59 - ccache -z
60 - ${CC} --version
61 - ${CXX} --version
62 - |
63 echo "travis_fold:start:load_script"
64 normal="$(echo -e '\033[0m')" red="$normal$(echo -e '\033[01;31m')" green="$normal$(echo -e '\033[01;32m')"
65 configureCVC4() {
66 echo "CVC4 config - $TRAVIS_CVC4_CONFIG";
67 ./configure --enable-unit-testing $TRAVIS_CVC4_CONFIG ||
68 (echo; echo "Trying to print config.log"; cat builds/config.log; error "CONFIGURE FAILED");
69 }
70 error() {
71 echo;
72 echo "${red}${1}${normal}";
73 echo;
74 exit 1;
75 }
76 makeDistcheck() {
77 make V=1 -j2 distcheck REGRESSION_LEVEL=0 CVC4_REGRESSION_ARGS='--no-early-exit' ||
78 error "DISTCHECK (WITH NEWTHEORY TESTS) FAILED";
79 }
80 makeCheck() {
81 make V=1 -j2 check REGRESSION_LEVEL=0 CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED"
82 }
83 makeExamples() {
84 make V=1 -j2 examples || error "COULD NOT BUILD EXAMPLES${normal}";
85 }
86 addNewTheoryTest() {
87 contrib/new-theory test_newtheory || error "NEWTHEORY FAILED";
88 grep -q '^THEORIES *=.* test_newtheory' src/Makefile.theories || error "NEWTHEORY FAILED";
89 contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED";
90 grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.theories || error "NEWTHEORY-ALTERNATE FAILED";
91 }
92 run() {
93 echo "travis_fold:start:$1"
94 echo "Running $1"
95 $1 || exit 1
96 echo "travis_fold:end:$1"
97 }
98 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_WITH_LFSC" ] && run contrib/get-lfsc-checker
99 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run addNewTheoryTest
100 [ -n "$TRAVIS_CVC4" ] && run configureCVC4
101 [ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run makeDistcheck
102 [ -n "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_CVC4_DISTCHECK" ] && run makeCheck && run makeExamples
103 [ -z "$TRAVIS_CVC4" ] && error "Unknown Travis-CI configuration"
104 echo "travis_fold:end:load_script"
105 - echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
106 - ccache -s
107 matrix:
108 fast_finish: true
109 include:
110 # Test with GCC
111 - compiler: gcc
112 env:
113 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='production --enable-language-bindings=java,c --with-lfsc'
114 - compiler: gcc
115 env:
116 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-lfsc --disable-debug-symbols'
117 #
118 # Test with Clang
119 - compiler: clang
120 env:
121 - TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --with-cln --enable-gpl --disable-debug-symbols --disable-proof'
122 - compiler: clang
123 env:
124 - TRAVIS_CVC4=yes TRAVIS_CVC4_DISTCHECK=yes TRAVIS_CVC4_CONFIG='--enable-proof'
125 notifications:
126 email:
127 on_success: change
128 on_failure: always