forked from dreal/dreal2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
133 lines (128 loc) · 5.8 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
language: cpp
cache: apt
env:
global:
# BB_TOKEN - encrypt "bitbucket key" with travis-ci key
- secure: "XhVgXQDJzjBBpzDpb2KeUf70xveR1sRQevU//k/mK/2ZLPnhZz/F9iMUC0vB3D0FNa+duA+euqZF+uJpwmsHxFQE4WCeLQVlUkQESoFGWxQp96Ql8uZ9xyMNCCrzc9oAYG1SBrno/yUtglWiLkhY15+wLWnMNTSmMm2Ap+4/kzM="
# REPO - encrypt "blessed" with private key (travis-ci)
- secure: "RGIRCTuB/1hOQmhVdkNJ6DUttbPOXhT/EQAB7+m/OWHsJsUP7ecvoFM6+tzfORZCZ++cpAyIB768UKKvV3FfpbWNLyDqOiZbgT9vKxnQqoJaJEg/dvzJHRHmxscoBYI0L72BA6Qb5298i+SG4PnryddtTw/AuqlHdIOsRg8O5hc="
# GH_TOKEN - for OSX repository (soonhokong/dreal-osx)
- secure: "amz2nrE/TakMzDk1CvvpKLjznkS2m1Gzl3gEB+w05YcmCUUS3iP9UAFTJgIVQJTYQ4MjkfGj7NgyO6ZM0kyxXqtL+GQ5vs0rlMKQZNm1LkymKzsRKhrm5PgDrh3uJbucsIwlLLmethlw1i+99sx5FlEXp4UBEX/o0JDJsYtDXR4="
# COVERALLS_REPO_TOKEN
- secure: "euBGQ3urx4mL5tZVuN2uQ9Lt2NGMaaTOytMrSzJxvCVql+THYeK80SUDM6eaZ0XQwnKnKugA7vgrH5APhVER5Szzp14V53UnYNykzhVzXzJDU7UeUlqCEedPLy+WjUtIJc4VQWeELBpDh0o2dF4jfObBhcKlhjwjLH0k1CHH1Yg="
matrix:
- TRIGGER_OSX=ON
TRIGGER_BB=ON
CMAKE_CXX_COMPILER=g++-4.8 CMAKE_C_COMPILER=gcc-4.8
CMAKE_BUILD_TYPE=Release
CTEST=ON TESTCOV=OFF STATIC=OFF
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_C_COMPILER=gcc-4.8
CMAKE_BUILD_TYPE=Debug
CTEST=ON TESTCOV=ON STATIC=OFF
- CMAKE_CXX_COMPILER=clang++-3.3 CMAKE_C_COMPILER=clang-3.3
CMAKE_BUILD_TYPE=Release
CTEST=ON TESTCOV=OFF STATIC=OFF
- CMAKE_CXX_COMPILER=clang++-3.3 CMAKE_C_COMPILER=clang-3.3
CMAKE_BUILD_TYPE=Debug
CTEST=ON TESTCOV=OFF STATIC=OFF
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_C_COMPILER=gcc-4.8
CMAKE_BUILD_TYPE=Release
STATIC=ON
install:
# PUSH TO BACKUP REPO
- if [[ $REPO == BLESSED && $TRIGGER_BB == ON ]]; then
git fetch --unshallow;
git push -q https://soonhok:${BB_TOKEN}@bitbucket.org/dreal/dreal.git +HEAD:refs/heads/${TRAVIS_BRANCH};
fi
# TRIGGER OSX Build
- if [[ $REPO == BLESSED && $TRIGGER_OSX == ON ]]; then
MSG=`git log --pretty=oneline --abbrev-commit -n 1 | cut -d ' ' -f 2-`;
cp .travis.yml /tmp/.travis.temp.yml;
cp .travis.osx.yml .travis.yml;
git config --global user.email "[email protected]";
git config --global user.name "Travis CI";
git add .travis.yml;
git commit -m "$MSG";
git push -q https://soonhokong:${GH_TOKEN}@github.com/soonhokong/dReal-osx.git +HEAD:refs/heads/${TRAVIS_BRANCH};
mv /tmp/.travis.temp.yml .travis.yml;
git reset --hard HEAD~;
fi
# Add ppas
- sudo add-apt-repository --yes ppa:h-rayflood/llvm
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository --yes ppa:dns/gnu
- sudo add-apt-repository --yes ppa:avsm/ppa
- sudo add-apt-repository --yes ppa:kalakris/cmake
- sudo apt-get -qq update
- sudo apt-get -qq install libstdc++-4.8-dev
- if [[ $CMAKE_CXX_COMPILER == g++-4.8 ]]; then until sudo apt-get -qq install g++-4.8; do echo retry; done fi
- if [[ $CMAKE_CXX_COMPILER == clang++-3.3 ]]; then until sudo apt-get -qq install clang-3.3; do echo retry; done fi
# Install Bison, Flex, CMAKE
- sudo apt-get -qq install bison flex wget cmake
# Ocaml
- sudo apt-get -qq install ocaml opam camlp4-extra
- opam init --yes
- eval `opam config env`
- opam update
- opam install ocamlfind batteries oasis --yes
# TESTCOV - lcov
- if [[ $TESTCOV == ON ]]; then
wget http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz;
tar xvfz lcov-1.10.tar.gz;
sudo cp -v lcov-1.10/bin/{lcov,genpng,gendesc,genhtml,geninfo} /usr/bin/;
sudo chmod 777 /usr/bin/lcov /usr/bin/genhtml /usr/bin/geninfo /usr/bin/genpng /usr/bin/gendesc;
rm -rf lcov-1.10.tar.gz lcov-1.10;
sudo cp -v `which gcov-4.8` `which gcov`;
fi
before_script:
- SITE=Ubuntu12.04@Travis
- BUILD_NAME=${TRAVIS_BRANCH}_${CMAKE_CXX_COMPILER}_${CMAKE_BUILD_TYPE}
- GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`
- GIT_SUBJECT=${GIT_SUBJECT//\"/\\\"}
- GIT_SUBJECT=${GIT_SUBJECT//,/\,}
- GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT"))
script:
# compile dReal
- mkdir build
- cd build
- CMAKE_CMD_OPTION="-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_PROGRAM_PATH=/usr/bin -DSTATIC=${STATIC}"
- if [[ $TESTCOV == ON ]]; then
CMAKE_CMD_OPTION="$CMAKE_CMD_OPTION -DTESTCOV=ON";
fi
- cmake $CMAKE_CMD_OPTION ../src
- ctest -D ExperimentalConfigure
- CONFIG_FILE=DartConfiguration.tcl
- sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE
- sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE
- ctest -D ExperimentalConfigure
- sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE
- sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE
- ctest -D ExperimentalBuild -VV
- cd ..
# compile tools
- make -C tools
# compile proof checker
- make -C tools/proofcheck/checker
after_script:
- cd build
- if [[ $TESTCOV == OFF && $CTEST == ON ]]; then
ctest -D ExperimentalTest -L normal --timeout 250 -VV;
fi
- export PATH=/usr/bin:$PATH
- if [[ $REPO == BLESSED && $TESTCOV == ON ]]; then
ctest -D ExperimentalTest -L normal --timeout 250 -VV;
ctest -D ExperimentalCoverage -L normal;
travis_wait make cov;
npm install coveralls --save;
cat coverage.info.cleaned | ./node_modules/coveralls/bin/coveralls.js;
fi
- find Testing -name "*.xml" -exec sed -i "s,Generator=\".*\",Generator=\"${TRAVIS_COMMIT}###${GIT_SUBJECT}\"," {} ";"
- find Testing \( -name "LastTest_*.log" -o -name "LastDynamicAnalysis_*.log" \) -exec sh -c 'TMP=`mktemp /tmp/ctesttmp_XXXX`; ../script/demangle_cpptype.py {} > $TMP; mv -v $TMP {}' ";"
- ctest -D ExperimentalSubmit
- cd ..
notifications:
email:
recipients:
on_success: change
on_failure: always