-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (86 loc) · 3.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
language: cpp
cache: apt
compiler:
- gcc
- clang
env:
- TRAVIS_CVC4=yes TRAVIS_CVC4_CONFIG='production --enable-language-bindings=java,c'
- TRAVIS_CVC4=yes TRAVIS_CVC4_CONFIG='debug --enable-language-bindings=java,c'
- TRAVIS_CVC4=yes TRAVIS_CVC4_DISTCHECK=yes
- TRAVIS_LFSC=yes
- TRAVIS_LFSC=yes TRAVIS_LFSC_DISTCHECK=yes
before_install:
# dhart/ppa is for cxxtest package, which doesn't appear officially until quantal
- travis_retry sudo apt-add-repository -y ppa:dhart/ppa
- travis_retry sudo apt-get update -qq
- travis_retry sudo apt-get install -qq libgmp-dev antlr3 libantlr3c-dev libboost-dev libboost-thread-dev swig2.0 libcln-dev openjdk-7-jdk
- travis_retry sudo apt-get install -qq --force-yes cxxtest
before_script:
- export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
- export PATH=$PATH:$JAVA_HOME/bin
- export JAVA_CPPFLAGS=-I$JAVA_HOME/include
- ./autogen.sh
script:
- |
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 --enable-unit-testing --enable-proof --with-portfolio $TRAVIS_CVC4_CONFIG ||
(echo; cat builds/config.log; error "CONFIGURE FAILED");
}
error() {
echo;
echo "${red}${1}${normal}";
echo;
exit 1;
}
makeDistcheck() {
make -j2 distcheck CVC4_REGRESSION_ARGS='--no-early-exit' ||
error "DISTCHECK (WITH NEWTHEORY TESTS) FAILED";
}
makeCheck() {
make -j2 check CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/TEST FAILED";
}
makeCheckPortfolio() {
make check BINARY=pcvc4 CVC4_REGRESSION_ARGS='--fallback-sequential --no-early-exit' RUN_REGRESSION_ARGS= ||
error "PORTFOLIO TEST FAILED";
}
makeExamples() {
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.am || error "NEWTHEORY FAILED";
contrib/new-theory --alternate test_newtheory test_newalttheory || error "NEWTHEORY-ALTERNATE FAILED";
grep -q '^THEORIES *=.* test_newalttheory' src/Makefile.am || error "NEWTHEORY-ALTERNATE FAILED";
}
LFSCchecks() {
cd proofs/lfsc_checker &&
(./configure || (echo; cat builds/config.log; echo; echo "${red}CONFIGURE FAILED${normal}"; exit 1)) &&
if [ -n "$TRAVIS_LFSC_DISTCHECK" ]; then
make -j2 distcheck || (echo; echo "${red}LFSC DISTCHECK FAILED${normal}"; echo; exit 1);
else
make -j2 || (echo; echo "${red}LFSC BUILD FAILED${normal}"; echo; exit 1);
fi;
}
run() {
echo "travis_fold:start:$1"
echo "Running $1"
$1 || exit 1
echo "travis_fold:end:$1"
}
[ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run addNewTheoryTest
[ -n "$TRAVIS_CVC4" ] && run configureCVC4
[ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_CVC4_DISTCHECK" ] && run makeDistcheck
[ -n "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_CVC4_DISTCHECK" ] && run makeCheck && run makeCheckPortfolio && run makeExamples
[ -n "$TRAVIS_LFSC" ] && run LFSCchecks
[ -z "$TRAVIS_CVC4" ] && [ -z "$TRAVIS_LFSC" ] && error "Unknown Travis-CI configuration"
echo "travis_fold:end:load_script"
- echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
matrix:
fast_finish: true
notifications:
email:
on_success: change
on_failure: always