lean2/.travis.yml
2013-11-17 03:04:37 -05:00

273 lines
11 KiB
YAML

language: cpp
env:
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="
# LEANREPO
- secure: "KsbUsMxTFDbUaObKOTxfWSu0gGzbUWlJr52nI1ITMqLxswettUR9bYAa1HTA+7hXXCT1W5I+RjxeWi74C+w/eTJGPGePX0irtzjNF/XVhP1ADoJJVQCF64yv02GNBeeUzGSDiW4bmO8ZLxTzvFr2ZskJDe/bIytQd3pJAlU6M0w="
# COVERALLS.IO TOKEN
- secure: "UaRz6E3zZeOG/2UzrGrsofYPkQG3qWzooYV6cRm5G+pMYReee8MdosnP6GtmPFhoFlkHeLQl21BpoJu3yFtrQoD2qpdrnb2uOJMYlSHLJtcZ5+pOl3DuX1qu06xXtz4PrZUSTx4WyaYynBP5kpky2Ghzmm1B5LKLUBcpCyP7uaw="
matrix:
# =======================================================
# TESTCOV Build
# =======================================================
# TC. g++-4.8 | DEBUG | CDASH
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=Debug
TESTCOV=ON
PUSH_TO_CDASH=TRUE
TCMALLOC=OFF
# =======================================================
# DEBUG Build
# =======================================================
# D1. clang++-3.3 | DEBUG | TCMALLOC | CDASH
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=ON
PUSH_TO_CDASH=TRUE
# D2. g++-4.8 | DEBUG | TCMALLOC | CDASH + TRIGGERS
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DEBUG
TRIGGER_BB=TRUE
TRIGGER_OSX=TRUE
TRIGGER_WINDOWS=TRUE
TCMALLOC=ON
PUSH_TO_CDASH=TRUE
# D3. clang++-3.3 | DEBUG
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=OFF
PUSH_TO_CDASH=TRUE
# D4. g++-4.8 | DEBUG
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=OFF
PUSH_TO_CDASH=TRUE
# =======================================================
# RELEASE Build
# =======================================================
# R1. clang++-3.3 | RELEASE | TCMALLOC | CDASH
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=RELEASE
TCMALLOC=ON
PUSH_TO_CDASH=TRUE
# R2. g++-4.8 | RELEASE | TCMALLOC | CDASH + UPLOAD=>DROPBOX
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=RELEASE
TCMALLOC=ON
UPLOAD=linux_tcmalloc
PUSH_TO_CDASH=TRUE
# R3. clang++-3.3 | RELEASE
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=RELEASE
TCMALLOC=OFF
PUSH_TO_CDASH=TRUE
# R4. g++-4.8 | RELEASE | UPLOAD=>DROPBOX
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=RELEASE
TCMALLOC=OFF
UPLOAD=linux
PUSH_TO_CDASH=TRUE
# =======================================================
# MEMCHECK Build
# =======================================================
# M1-1. clang++-3.3 | DEBUG | MEMCHECK | CDASH
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=OFF
MEMCHECK=TRUE
MEMCHECK_RANGE=1,40
PUSH_TO_CDASH=TRUE
# M1-2. clang++-3.3 | DEBUG | MEMCHECK | CDASH
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=OFF
MEMCHECK=TRUE
MEMCHECK_RANGE=40,80
PUSH_TO_CDASH=TRUE
# M2-1. g++-4.8 | DEBUG | MEMCHECK | CDASH
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=ON
MEMCHECK=TRUE
MEMCHECK_RANGE=1,40
PUSH_TO_CDASH=TRUE
# M2-2. g++-4.8 | DEBUG | MEMCHECK | CDASH
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DEBUG
TCMALLOC=ON
MEMCHECK=TRUE
MEMCHECK_RANGE=40,80
PUSH_TO_CDASH=TRUE
# =======================================================
# DOXYGEN Build
# =======================================================
# DOC. g++-4.8 | DEBUG | TCMALLOC | DOXYGEN=>DROPBOX
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DOXYGEN
BUILD_DOXYGEN=TRUE
TCMALLOC=OFF
install:
- 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
- until sudo add-apt-repository --yes ppa:kalakris/cmake; do echo retry; done
- until sudo apt-get -qq update; do echo retry; done
- if [[ $TCMALLOC == ON ]]; 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
- until sudo apt-get -qq install libgmp-dev libmpfr-dev; do echo retry; done
- until sudo apt-get -qq install cmake python; do echo retry; done
- until sudo apt-get -qq install liblua5.2.0 lua5.2-0 lua5.2-dev; do echo retry; done
- wget http://dl.dropboxusercontent.com/u/203889738/gcc/ninja.tar.gz;
tar xfz ninja.tar.gz;
cd ninja;
./bootstrap.py > /dev/null 2>&1;
sudo cp -v ninja /usr/bin/;
cd ..;
- 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
- if [[ $LEANREPO == BLESSED && $MEMCHECK == TRUE ]]; then
sudo apt-get -qq install valgrind;
fi
- if [[ $LEANREPO == BLESSED && ($UPLOAD || $BUILD_DOXYGEN == TRUE) ]]; then
sudo apt-get -qq install python python-pip;
sudo pip install dropbox;
fi
- 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 /usg/bin/gendesc;
rm -rf lcov-1.10.tar.gz lcov-1.10;
sudo mv -v `which gcov-4.8` `which gcov`;
fi
before_script:
- if [[ $LEANREPO == BLESSED && $TRIGGER_BB == TRUE ]]; then
git push -q https://soonhok:${BB_TOKEN}@bitbucket.org/soonhok/lean.git +master;
fi
- if [[ $LEANREPO == BLESSED && $TRIGGER_OSX == TRUE ]]; 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/lean-osx.git +HEAD:master;
mv /tmp/.travis.temp.yml .travis.yml;
git reset --hard HEAD~;
fi
- if [[ $LEANREPO == BLESSED && $TRIGGER_WINDOWS == TRUE ]]; then
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";
git push -q https://soonhokong:${GH_TOKEN}@github.com/soonhokong/lean-windows.git +HEAD:master;
mv /tmp/.travis.temp.yml .travis.yml;
git reset --hard HEAD~;
fi
script:
- mkdir -p build
- cd build
- if [[ $CMAKE_BUILD_TYPE == RELEASE && $CMAKE_CXX_COMPILER=clang++-3.3 ]]; then
GENERATOR=;
else
GENERATOR=-GNinja;
fi
- if [[ $TESTCOV != ON ]]; then
TESTCOV=OFF;
fi
- /usr/bin/cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DTESTCOV=${TESTCOV} -DTCMALLOC=${TCMALLOC} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ${GENERATOR} -DCMAKE_PROGRAM_PATH=/usr/bin ../src;
- if [[ $CMAKE_BUILD_TYPE == DEBUG || $CMAKE_BUILD_TYPE == RELEASE || $TESTCOV == ON ]]; then
SITE=Ubuntu12.04@Travis;
if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
BUILD_TYPE=Release;
else
BUILD_TYPE=Debug;
fi;
BUILD_NAME=${TRAVIS_BRANCH}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE};
if [[ $TCMALLOC == ON ]]; then
BUILD_NAME=${BUILD_NAME}_TC;
fi;
CONFIG_FILE=DartConfiguration.tcl;
sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE;
sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE;
if [[ $MEMCHECK == TRUE ]]; then
ninja;
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 | ../script/demangle_cpptype.py;
fi;
fi
- cd ..
after_script:
- cd build
- if [[ $LEANREPO == BLESSED && $TESTCOV == ON ]]; then
ctest -D ExperimentalCoverage;
ninja cov;
npm install coveralls --save;
cat coverage.info.cleaned | ./node_modules/coveralls/bin/coveralls.js;
fi
- if [[ $LEANREPO == BLESSED && $MEMCHECK == TRUE ]]; then
MEMCHECK_SUPP=`readlink -f ../src/memcheck.supp`;
CONFIG_FILE=DartConfiguration.tcl;
sed -i "s,^MemoryCheckSuppressionFile:\W*$,MemoryCheckSuppressionFile:$MEMCHECK_SUPP," $CONFIG_FILE;
ulimit -s unlimited;
yes "C" | ctest -D ExperimentalMemCheck -VV -I $MEMCHECK_RANGE | ../script/demangle_cpptype.py;
fi
- if [[ $LEANREPO == BLESSED && $PUSH_TO_CDASH == TRUE ]]; then
GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`;
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"));
find Testing -name "*.xml" -exec sed -i "s,Generator=\".*\",Generator=\"${GIT_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;
fi
- cd ..
- if [[ $LEANREPO == BLESSED && $BUILD_DOXYGEN == TRUE ]]; then
sudo apt-get -qq install graphviz doxygen parallel;
script/doxygen.sh > /dev/null;
DOXYGEN_DIR=doc/html;
find $DOXYGEN_DIR -type f -name "*.md5" -exec rm {} ";";
find $DOXYGEN_DIR -type f | split -l 100 - doxygen_files.txt.;
ls -1 doxygen_files.txt.* | parallel -u -j 10 ./script/dropbox_upload.py --destpath /Public --dropbox-token ${DROPBOX_KEY} --copylist {};
fi
- if [[ $LEANREPO == BLESSED && $UPLOAD ]]; then
UPLOAD_DIR=bin;
BINARY=lean_${UPLOAD};
NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`;
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 [[ $TCMALLOC == ON ]]; then
ARCHIVE_BINARY=${ARCHIVE_BINARY}_tcmalloc;
fi;
mkdir ${UPLOAD_DIR};
cp -v build/shell/lean ${UPLOAD_DIR}/${BINARY};
tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY};
script/dropbox_upload.py --srcpath ${UPLOAD_DIR} --destpath /Public/${UPLOAD_DIR} --dropbox-token ${DROPBOX_KEY};
fi
notifications:
email:
recipients:
- leansmt-dev@googlegroups.com
on_success: always
on_failure: always