2013-07-22 13:36:02 +00:00
|
|
|
language: cpp
|
|
|
|
|
|
|
|
env:
|
2013-08-20 03:41:54 +00:00
|
|
|
global:
|
|
|
|
# BBTOKEN
|
|
|
|
- secure: "gBp3VTkChQflgWBoEnHhA2y7+KCdHS8u+uqij6kh4v+I5bj/Bu7uEeqMDZwmRRoTkrDu6eYHxCJQOr9ODAVc2BP4Y8zUFWuVKUrkvP9Qeeqe/X+7WFuQSHMy3yC5ESb8LVdiy4aAQuSt0sHC0M3BdnBMTZ9Ergkcc9lmW6bu9XQ="
|
|
|
|
# GH_TOKEN
|
|
|
|
- secure: "Zdab8c1wnKcwYWEVBvtaClCzw7sYmFPZ47urG4jSeO5FL+M4MiR6c7STeoW7wge9k3uUyMTAodD/bJ0RhskBp0wbvg0UoYQaFRm+RwsDiM7CNj+fYM8wnV0cvTJj869NsqQ92zde6L5gFEHNDrVUwC6PJpIC4JxRRfzIA4/qH5A="
|
|
|
|
# DROPBOX_KEY
|
|
|
|
- secure: "b9qdjrlr2khvQclMg12Fjg0DF3Chv46SdNRymK7cPukAhIaqaPn8g0FL4K9xW/asXRXdWcd3dYBoarjkqX43mNV9nl5Hl2VwV7T6KeGAxQSRqdYioMugIY0P8xrj4i5dwuvt8aqSlCctSozE1e/th8EWjjy6TWi890MJB//NGRE="
|
2013-09-04 23:00:53 +00:00
|
|
|
# LEANREPO
|
|
|
|
- secure: "KsbUsMxTFDbUaObKOTxfWSu0gGzbUWlJr52nI1ITMqLxswettUR9bYAa1HTA+7hXXCT1W5I+RjxeWi74C+w/eTJGPGePX0irtzjNF/XVhP1ADoJJVQCF64yv02GNBeeUzGSDiW4bmO8ZLxTzvFr2ZskJDe/bIytQd3pJAlU6M0w="
|
2013-08-20 03:41:54 +00:00
|
|
|
|
2013-07-22 13:36:02 +00:00
|
|
|
matrix:
|
2013-09-13 21:51:39 +00:00
|
|
|
# =======================================================
|
|
|
|
# DEBUG Build
|
|
|
|
# =======================================================
|
|
|
|
# D1. clang++-3.3 | DEBUG | TCMALLOC | CDASH
|
2013-07-22 13:36:02 +00:00
|
|
|
- CMAKE_CXX_COMPILER=clang++-3.3
|
|
|
|
CMAKE_BUILD_TYPE=DEBUG
|
2013-07-23 16:50:42 +00:00
|
|
|
USE_TCMALLOC=TRUE
|
2013-09-04 04:55:40 +00:00
|
|
|
PUSH_TO_CDASH=TRUE
|
2013-09-13 21:51:39 +00:00
|
|
|
# D2. g++-4.8 | DEBUG | TCMALLOC | CDASH + TRIGGERS
|
2013-07-22 13:36:02 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
|
|
|
CMAKE_BUILD_TYPE=DEBUG
|
2013-09-13 03:21:22 +00:00
|
|
|
TRIGGER_BB=TRUE
|
|
|
|
TRIGGER_OSX=TRUE
|
|
|
|
TRIGGER_WINDOWS=TRUE
|
2013-07-23 16:50:42 +00:00
|
|
|
USE_TCMALLOC=TRUE
|
2013-09-13 21:51:39 +00:00
|
|
|
PUSH_TO_CDASH=TRUE
|
|
|
|
# D3. clang++-3.3 | DEBUG
|
|
|
|
- CMAKE_CXX_COMPILER=clang++-3.3
|
|
|
|
CMAKE_BUILD_TYPE=DEBUG
|
|
|
|
# D4. g++-4.8 | DEBUG
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
|
|
|
CMAKE_BUILD_TYPE=DEBUG
|
|
|
|
# =======================================================
|
|
|
|
# RELEASE Build
|
|
|
|
# =======================================================
|
|
|
|
# R1. clang++-3.3 | RELEASE | TCMALLOC | CDASH
|
2013-07-22 13:36:02 +00:00
|
|
|
- CMAKE_CXX_COMPILER=clang++-3.3
|
|
|
|
CMAKE_BUILD_TYPE=RELEASE
|
2013-07-23 16:50:42 +00:00
|
|
|
USE_TCMALLOC=TRUE
|
2013-09-06 03:15:34 +00:00
|
|
|
PUSH_TO_CDASH=TRUE
|
2013-09-13 21:51:39 +00:00
|
|
|
# R2. g++-4.8 | RELEASE | TCMALLOC | CDASH + UPLOAD=>DROPBOX
|
2013-07-22 13:36:02 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
|
|
|
CMAKE_BUILD_TYPE=RELEASE
|
2013-07-23 16:50:42 +00:00
|
|
|
USE_TCMALLOC=TRUE
|
2013-08-20 03:41:54 +00:00
|
|
|
UPLOAD=linux_tcmalloc
|
2013-09-06 03:15:34 +00:00
|
|
|
PUSH_TO_CDASH=TRUE
|
2013-09-13 21:51:39 +00:00
|
|
|
# R3. clang++-3.3 | RELEASE
|
2013-07-23 16:50:42 +00:00
|
|
|
- CMAKE_CXX_COMPILER=clang++-3.3
|
|
|
|
CMAKE_BUILD_TYPE=RELEASE
|
2013-09-13 21:51:39 +00:00
|
|
|
# R4. g++-4.8 | RELEASE | UPLOAD=>DROPBOX
|
2013-07-23 16:50:42 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
|
|
|
CMAKE_BUILD_TYPE=RELEASE
|
2013-08-20 03:41:54 +00:00
|
|
|
UPLOAD=linux
|
2013-09-13 21:51:39 +00:00
|
|
|
# =======================================================
|
|
|
|
# MEMCHECK Build
|
|
|
|
# =======================================================
|
|
|
|
# M1. clang++-3.3 | DEBUG | MEMCHECK | CDASH
|
|
|
|
- CMAKE_CXX_COMPILER=clang++-3.3
|
|
|
|
CMAKE_BUILD_TYPE=DEBUG
|
|
|
|
MEMCHECK=TRUE
|
|
|
|
PUSH_TO_CDASH=TRUE
|
|
|
|
# M2. g++-4.8 | DEBUG | MEMCHECK | CDASH
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
|
|
|
CMAKE_BUILD_TYPE=DEBUG
|
|
|
|
MEMCHECK=TRUE
|
|
|
|
PUSH_TO_CDASH=TRUE
|
|
|
|
# =======================================================
|
|
|
|
# DOXYGEN Build
|
|
|
|
# =======================================================
|
|
|
|
# DOC. g++-4.8 | DEBUG | TCMALLOC | DOXYGEN=>DROPBOX
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
2013-09-15 08:50:23 +00:00
|
|
|
CMAKE_BUILD_TYPE=DOXYGEN
|
2013-09-15 07:39:57 +00:00
|
|
|
BUILD_DOXYGEN=TRUE
|
2013-09-13 21:51:39 +00:00
|
|
|
# =======================================================
|
|
|
|
# TESTCOV Build
|
|
|
|
# =======================================================
|
|
|
|
# TC. g++-4.8 | DEBUG | CDASH
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8
|
|
|
|
CMAKE_BUILD_TYPE=TESTCOV
|
|
|
|
PUSH_TO_CDASH=TRUE
|
2013-07-22 13:36:02 +00:00
|
|
|
|
|
|
|
install:
|
2013-08-08 21:02:09 +00:00
|
|
|
- until sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; do echo retry; done
|
|
|
|
- until sudo add-apt-repository --yes ppa:h-rayflood/llvm; do echo retry; done
|
2013-09-04 07:52:42 +00:00
|
|
|
- until sudo add-apt-repository --yes ppa:kalakris/cmake; do echo retry; done
|
2013-08-08 21:02:09 +00:00
|
|
|
- until sudo apt-get -qq update; do echo retry; done
|
2013-09-15 19:27:42 +00:00
|
|
|
- if [[ $USE_TCMALLOC == TRUE ]]; then until sudo add-apt-repository --yes ppa:agent-8131/ppa && sudo apt-get -qq update && sudo apt-get -qq install libgoogle-perftools-dev; do echo retry; done; fi
|
2013-08-08 21:02:09 +00:00
|
|
|
- until sudo apt-get -qq install libgmp-dev libmpfr-dev; do echo retry; done
|
2013-09-15 19:22:20 +00:00
|
|
|
- until sudo apt-get -qq install cmake python; do echo retry; done
|
2013-09-15 18:53:33 +00:00
|
|
|
- wget http://dl.dropboxusercontent.com/u/203889738/gcc/ninja.tar.gz;
|
|
|
|
tar xfz ninja.tar.gz;
|
|
|
|
cd ninja;
|
2013-09-15 19:22:20 +00:00
|
|
|
./bootstrap.py > /dev/null 2>&1;
|
2013-09-15 18:53:33 +00:00
|
|
|
sudo cp -v ninja /usr/bin/;
|
|
|
|
cd ..;
|
2013-08-08 21:02:09 +00:00
|
|
|
- until sudo apt-get -qq install libstdc++-4.8-dev; do echo retry; done
|
|
|
|
- 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
|
2013-09-04 23:00:53 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $MEMCHECK == TRUE ]]; then
|
2013-09-04 04:55:40 +00:00
|
|
|
sudo apt-get -qq install valgrind;
|
|
|
|
fi
|
2013-09-15 07:54:43 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && ($UPLOAD || $BUILD_DOXYGEN == TRUE) ]]; then
|
2013-08-20 03:41:54 +00:00
|
|
|
sudo apt-get -qq install python python-pip;
|
|
|
|
sudo pip install dropbox;
|
|
|
|
fi
|
|
|
|
|
2013-09-11 00:05:14 +00:00
|
|
|
before_script:
|
2013-09-13 17:09:20 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $TRIGGER_BB == TRUE ]]; then
|
2013-08-22 19:12:32 +00:00
|
|
|
git push -q https://soonhok:${BB_TOKEN}@bitbucket.org/soonhok/lean.git +master;
|
|
|
|
fi
|
2013-09-13 17:09:20 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $TRIGGER_OSX == TRUE ]]; then
|
2013-08-22 19:12:32 +00:00
|
|
|
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/lean-osx.git +HEAD:master;
|
|
|
|
mv /tmp/.travis.temp.yml .travis.yml;
|
|
|
|
git reset --hard HEAD~;
|
|
|
|
fi
|
2013-09-13 17:09:20 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $TRIGGER_WINDOWS == TRUE ]]; then
|
2013-08-22 19:12:32 +00:00
|
|
|
MSG=`git log --pretty=oneline --abbrev-commit -n 1 | cut -d ' ' -f 2-`;
|
|
|
|
cp .travis.yml /tmp/.travis.temp.yml;
|
|
|
|
cp .travis.windows.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";
|
2013-08-22 23:48:05 +00:00
|
|
|
git push -q https://soonhokong:${GH_TOKEN}@github.com/soonhokong/lean-windows.git +HEAD:master;
|
2013-08-22 19:12:32 +00:00
|
|
|
mv /tmp/.travis.temp.yml .travis.yml;
|
|
|
|
git reset --hard HEAD~;
|
|
|
|
fi
|
2013-09-11 00:05:14 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2013-09-15 19:22:20 +00:00
|
|
|
- if [[ $CMAKE_BUILD_TYPE == RELEASE && $CMAKE_CXX_COMPILER=clang++-3.3 ]];
|
|
|
|
then
|
2013-09-15 20:51:02 +00:00
|
|
|
/usr/bin/cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ../src;
|
2013-09-15 19:22:20 +00:00
|
|
|
else
|
2013-09-15 20:51:02 +00:00
|
|
|
/usr/bin/cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -G Ninja ../src;
|
2013-09-15 19:22:20 +00:00
|
|
|
fi
|
2013-09-11 00:05:14 +00:00
|
|
|
- if [[ $CMAKE_BUILD_TYPE == DEBUG || $CMAKE_BUILD_TYPE == RELEASE || $CMAKE_BUILD_TYPE == TESTCOV ]]; then
|
|
|
|
SITE=Ubuntu12.04@Travis;
|
|
|
|
GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`;
|
|
|
|
if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
|
|
|
|
BUILD_TYPE=Release;
|
|
|
|
else
|
|
|
|
BUILD_TYPE=Debug;
|
|
|
|
fi;
|
|
|
|
BUILD_NAME=${TRAVIS_BRANCH}_${GIT_COMMIT}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE};
|
|
|
|
CONFIG_FILE=DartConfiguration.tcl;
|
|
|
|
sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE;
|
|
|
|
sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE;
|
2013-09-13 21:51:39 +00:00
|
|
|
if [[ $MEMCHECK == TRUE ]]; then
|
2013-09-15 11:03:26 +00:00
|
|
|
ninja;
|
2013-09-13 21:51:39 +00:00
|
|
|
else
|
|
|
|
ctest -D ExperimentalConfigure;
|
|
|
|
sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE;
|
|
|
|
sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE;
|
|
|
|
ctest -D ExperimentalBuild -VV;
|
|
|
|
yes "C" | ctest -D ExperimentalTest -VV;
|
|
|
|
fi;
|
2013-09-11 00:05:14 +00:00
|
|
|
fi
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
after_script:
|
2013-09-04 18:00:55 +00:00
|
|
|
- cd build
|
2013-09-04 23:00:53 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $CMAKE_BUILD_TYPE == TESTCOV ]]; then
|
|
|
|
ctest -D ExperimentalCoverage;
|
|
|
|
fi
|
|
|
|
- if [[ $LEANREPO == BLESSED && $MEMCHECK == TRUE ]]; then
|
2013-09-17 01:14:55 +00:00
|
|
|
MEMCHECK_SUPP=`readlink -f ../src/memcheck.supp`;
|
|
|
|
CONFIG_FILE=DartConfiguration.tcl;
|
2013-09-17 01:51:59 +00:00
|
|
|
sed -i "s,^MemoryCheckSuppressionFile:\W*$,MemoryCheckSuppressionFile:$MEMCHECK_SUPP," $CONFIG_FILE;
|
2013-09-10 23:10:16 +00:00
|
|
|
yes "C" | ctest -D ExperimentalMemCheck -VV;
|
2013-09-04 18:00:55 +00:00
|
|
|
fi
|
2013-09-04 23:00:53 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $PUSH_TO_CDASH == TRUE ]]; then
|
2013-09-04 18:00:55 +00:00
|
|
|
ctest -D ExperimentalSubmit;
|
|
|
|
fi
|
|
|
|
- cd ..
|
2013-09-04 23:00:53 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $BUILD_DOXYGEN == TRUE ]]; then
|
2013-09-16 03:17:18 +00:00
|
|
|
sudo apt-get -qq install graphviz doxygen parallel;
|
2013-08-20 03:41:54 +00:00
|
|
|
script/doxygen.sh;
|
2013-09-15 07:39:57 +00:00
|
|
|
DOXYGEN_DIR=doc/html;
|
2013-09-16 03:17:18 +00:00
|
|
|
find $DOXYGEN_DIR -type f -name "*.md5" -exec rm {} ";";
|
2013-09-15 07:39:57 +00:00
|
|
|
find $DOXYGEN_DIR -type f | xargs shasum | sort > doxygen_shasum.txt;
|
|
|
|
cp doxygen_shasum.txt $DOXYGEN_DIR/;
|
|
|
|
wget http://dl.dropboxusercontent.com/u/203889738/${DOXYGEN_DIR}/doxygen_shasum.txt -O doxygen_shasum_old.txt;
|
2013-09-16 05:07:55 +00:00
|
|
|
comm -23 doxygen_shasum.txt doxygen_shasum_old.txt | cut -d ' ' -f 3 | split -l 100 - doxygen_new_files.txt.;
|
2013-09-16 03:17:18 +00:00
|
|
|
echo "${DOXYGEN_DIR}/doxygen_shasum.txt" >> doxygen_new_files.txt.aa;
|
2013-09-16 05:07:55 +00:00
|
|
|
comm -13 doxygen_shasum.txt doxygen_shasum_old.txt | cut -d ' ' -f 3 | split -l 100 - doxygen_old_files.txt.;
|
2013-09-20 18:34:36 +00:00
|
|
|
ls -1 doxygen_old_files.txt.* | parallel -u -j 10 'script/dropbox_upload.py --destpath /Public --dropbox-token ${DROPBOX_KEY} --deletelist {}';
|
|
|
|
ls -1 doxygen_new_files.txt.* | parallel -u -j 10 'script/dropbox_upload.py --destpath /Public --dropbox-token ${DROPBOX_KEY} --copylist {}';
|
2013-08-20 03:41:54 +00:00
|
|
|
fi
|
2013-09-04 23:00:53 +00:00
|
|
|
- if [[ $LEANREPO == BLESSED && $UPLOAD ]]; then
|
2013-08-20 03:41:54 +00:00
|
|
|
UPLOAD_DIR=bin;
|
|
|
|
BINARY=lean_${UPLOAD};
|
2013-09-15 07:54:43 +00:00
|
|
|
NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`;
|
2013-09-11 00:05:14 +00:00
|
|
|
GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`;
|
|
|
|
OS=linux;
|
|
|
|
ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE};
|
|
|
|
if [[ $USE_TCMALLOC ]]; then
|
|
|
|
ARCHIVE_BINARY=${ARCHIVE_BINARY}_tcmalloc;
|
|
|
|
fi;
|
2013-08-20 03:41:54 +00:00
|
|
|
mkdir ${UPLOAD_DIR};
|
2013-09-13 21:51:39 +00:00
|
|
|
cp -v build/shell/lean ${UPLOAD_DIR}/${BINARY};
|
2013-09-15 07:54:43 +00:00
|
|
|
tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY};
|
2013-09-15 07:39:57 +00:00
|
|
|
script/dropbox_upload.py --srcpath ${UPLOAD_DIR} --destpath /Public/${UPLOAD_DIR} --dropbox-token ${DROPBOX_KEY};
|
2013-08-20 03:41:54 +00:00
|
|
|
fi
|
2013-07-22 13:36:02 +00:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
recipients:
|
2013-08-01 20:48:15 +00:00
|
|
|
- leansmt-dev@googlegroups.com
|
2013-07-22 13:36:02 +00:00
|
|
|
on_success: always
|
|
|
|
on_failure: always
|