forked from dreal/dreal3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (124 loc) · 4.9 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
os:
- linux
language: cpp
sudo: false
cache: apt
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3
packages:
- autoconf
- automake
- bison
- clang-3.8
- cmake
- cmake-data
- flex
- g++-5
- git
- lcov
- libstdc++-5-dev
- libtool
- make
- pkg-config
- python-software-properties
- wget
- tex-info
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++-5 CMAKE_C_COMPILER=gcc-5
CMAKE_BUILD_TYPE=Release
CTEST=ON TESTCOV=OFF STATIC=OFF
- CMAKE_CXX_COMPILER=g++-5 CMAKE_C_COMPILER=gcc-5
CMAKE_BUILD_TYPE=Debug
CTEST=ON TESTCOV=ON STATIC=OFF
- CMAKE_CXX_COMPILER=clang++-3.8 CMAKE_C_COMPILER=clang-3.8
CMAKE_BUILD_TYPE=Release
CTEST=ON TESTCOV=OFF STATIC=OFF
- CMAKE_CXX_COMPILER=clang++-3.8 CMAKE_C_COMPILER=clang-3.8
CMAKE_BUILD_TYPE=Debug
CTEST=ON TESTCOV=OFF STATIC=OFF
- CMAKE_CXX_COMPILER=g++-5 CMAKE_C_COMPILER=gcc-5
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 "notifications@travis-ci.org";
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
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 ..
after_script:
- cd build
- if [[ $TESTCOV == OFF && $CTEST == ON ]]; then
ctest -D ExperimentalTest -L normal --timeout 250 -VV -j 2;
fi
- export PATH=/usr/bin:$PATH
- if [[ $REPO == BLESSED && $TESTCOV == ON ]]; then
ctest -D ExperimentalTest -L normal --timeout 250 -VV -j 2;
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:
- dreal-build@googlegroups.com
on_success: change
on_failure: always