-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
100 lines (95 loc) · 4.23 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
language: cpp
cache: apt
env:
global:
# BB_TOKEN - encrypt "bitbucket key" with travis-ci key
- secure: "b6GXxAgYBSdiJqiQ1B2uuIQtJ4c+BNKStBLPtV+01bGntrcu3MuPNJ1iisOzpTUCA+ItV3ri3TzXKNyzEG2hTjeWGX1OMAyhxUuaMnDuhVWorVT11rAGC9bSWzsYxhRske0Fy55obf78USxKnbWWV3R1E9voqisJc3YgwunXvQc="
# REPO - encrypt "blessed" with private key (travis-ci)
- secure: "pt+5KM7wYO4IWuRd68Pcne7VlentJcCecuYu+ghK57FoYHbF99WRZqCslmyHDz8tMxpIi47NqWwM09TfpcixsIf2bXTveDnPp96M/mMn+HmV10XsGux+YhoicVf6FI1bEyQhUzjkQTJ5CZ8hpyLAthBqJYgZDovRDBkDYdfel2c="
# GH_TOKEN - for OSX repository (soonhokong/drio-osx)
- secure: "ExpgDDmFrRNvIqI6VDBQhNiuvgKrDPRInUsUEb1DdMs+kMeRBwhRygvRUZ+lhHRmheIB6V3eJ9AKSABLFcHuaLyVm0ARHr3cD3HkaiT6cAKkQPKIQ+2C+2Z9PYV9GUBOwc2jmbYJCnR9cbWMXZijMW8XbnM/XipG6Kz/GAl1atg="
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
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_C_COMPILER=gcc-4.8
CMAKE_BUILD_TYPE=Debug
CTEST=ON
- CMAKE_CXX_COMPILER=clang++-3.3 CMAKE_C_COMPILER=clang-3.3
CMAKE_BUILD_TYPE=Release
CTEST=ON
- CMAKE_CXX_COMPILER=clang++-3.3 CMAKE_C_COMPILER=clang-3.3
CMAKE_BUILD_TYPE=Debug
CTEST=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/drio.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/drio-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
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 drio
- 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}"
- 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
- export PATH=/usr/bin:$PATH
- 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