-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (106 loc) · 3.28 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Fix Travis write errors on Clang builds. These write errors occurred after
# a Travis update to new Trusty images on Dec. 12th 2017. The reason for these
# write errors is unknown. Using the deprecated builds did not fix the problem.
# Setting 'filter_secrets: false' as suggested here
# https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-321777557
# fixes the problem.
filter_secrets: false
language: cpp
cache:
- apt
- ccache
sudo: false
dist: trusty
env:
global:
- CCACHE_COMPRESS=1
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages: &common_deps
- antlr3
- cmake
- cxxtest
- junit4
- libantlr3c-dev
- libcln-dev
- libgmp-dev
- libhamcrest-java
- openjdk-7-jdk
- swig3.0
before_install:
- eval "${MATRIX_EVAL}"
# Clang does not play nice with ccache (at least the versions offered by
# Travis), use a workaround:
# https://github.com/travis-ci/travis-ci/issues/5383#issuecomment-224630584
- |
if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then
export CFLAGS="-Qunused-arguments"
export CXXFLAGS="-Qunused-arguments"
sudo ln -s $(which ccache) /usr/lib/ccache/clang
sudo ln -s $(which ccache) /usr/lib/ccache/clang++
fi
before_script:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
script:
- ccache -M 1G
- ccache -z
- ${CC} --version
- ${CXX} --version
- |
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.sh --name=build --prefix=$(pwd)/build/install --unit-testing $TRAVIS_CVC4_CONFIG
}
error() {
echo;
echo "${red}${1}${normal}";
echo;
exit 1;
}
makeCheck() {
cd build
make -j2 check ARGS='-LE regress[1-4]' CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED"
ctest -j2 -L example || error "RUNNING EXAMPLES FAILED"
}
makeInstallCheck() {
cd build
make install -j2
echo -e "#include <cvc4/cvc4.h>\nint main() { CVC4::ExprManager em; return 0; }" > /tmp/test.cpp
$CXX -std=c++11 /tmp/test.cpp -I install/include -L install/lib -lcvc4 -lcln || exit 1
}
run() {
echo "travis_fold:start:$1"
echo "Running $1"
$1 || exit 1
echo "travis_fold:end:$1"
}
[ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_WITH_LFSC" ] && run contrib/get-lfsc-checker
[ -n "$TRAVIS_CVC4" ] && run configureCVC4
[ -n "$TRAVIS_CVC4" ] && run makeCheck && run makeInstallCheck
[ -z "$TRAVIS_CVC4" ] && error "Unknown Travis-CI configuration"
echo "travis_fold:end:load_script"
- echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
- ccache -s
matrix:
fast_finish: true
include:
# Test with GCC
- compiler: gcc
env:
- TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='production --language-bindings=java --lfsc'
- compiler: gcc
env:
- TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --lfsc --no-debug-symbols'
#
# Test with Clang
- compiler: clang
env:
- TRAVIS_CVC4=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --cln --gpl --no-debug-symbols --no-proofs'
notifications:
email:
on_success: change
on_failure: always