Update .travis.yml and .travis.osx.yml

On Linux:
 - push to the repo on bitbucket, to trigger email-diff
 - push to the lean-osx repo on github, to trigger osx build & test
 - run test coverage and upload to dropbox
 - run doxygen and upload to dropbox
 - upload compiled binaries to dropbox
 - secure passwords by putting "-q" option to git operations

On OSX:
 - build & test
 - upload compiled binaries to dropbox
 - roll back to HPC g++-4.9.0 + gmp & mpfr (homebrew)
 - patch the problem in <cstddef>, saved in dropbox
This commit is contained in:
Soonho Kong 2013-08-19 20:41:54 -07:00
parent b2ba0618c9
commit 4a4f7eb9e2
3 changed files with 99 additions and 43 deletions

View file

@ -3,8 +3,6 @@ env:
global:
- secure: "W8vou0KRJOOboZXP9q+D/9Wl6LlBeVS2T85MHWPz7EwCMQbJq5xWnGzYLE6FmC0iILcZkXyP63vqoYMFo5MJaEQeALGx2RuIiW7XgrD+7Bn4Vfsp6BLT7K9/AJETGGTQnLs8oZJJCXHGtzbc8EPFIZd/ZPPrve4jhEE5ZNhXnRc="
matrix:
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG USE_TCMALLOC=FALSE LCOV=TRUE
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG USE_TCMALLOC=FALSE DOXYGEN=TRUE
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG USE_TCMALLOC=TRUE
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG USE_TCMALLOC=FALSE
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE USE_TCMALLOC=TRUE UPLOAD=osx
@ -13,7 +11,7 @@ env:
before_script:
- mkdir -p build
- cd build
- CPLUS_INCLUDE_PATH=/usr/local/include/c++/4.8.1/:/usr/local/include/c++/4.8.1/x86_64-apple-darwin12.4.0:/usr/local/include/c++/4.8.1/bits/
- CPLUS_INCLUDE_PATH=/usr/local/include/c++/4.9.0/:/usr/local/include/c++/4.9.0/x86_64-apple-darwin12.4.0:/usr/local/include/c++/4.9.0/bits/
- export CPLUS_INCLUDE_PATH
- LIBRARY_PATH=/usr/local/lib
- export LIBRARY_PATH
@ -21,46 +19,34 @@ before_script:
- cd ..
script:
- if [[ -z $LCOV && -z $DOXYGEN ]]; then
cd build;
ninja && yes "C" | ctest -T test -VV;
cd ..;
fi
- cd build
- ninja && yes "C" | ctest -T test -VV
- cd ..
after_script:
- if [[ $DOXYGEN == TRUE ]]; then
brew install doxygen graphviz;
script/doxygen.sh;
brew install python;
pip install dropbox;
script/dropbox_upload.py doc /Public/doc ${DROPBOX_KEY};
fi
- if [[ $LCOV == TRUE ]]; then
brew install lcov;
script/lcov.sh;
brew install python;
pip install dropbox;
script/dropbox_upload.py build/testcov/lcov /Public/lcov ${DROPBOX_KEY};
fi
- if [[ $UPLOAD ]]; then
UPLOAD_DIR=bin;
BINARY=lean_${UPLOAD};
mkdir ${UPLOAD_DIR};
cp build/shell/lean ${UPLOAD_DIR}/${BINARY};
brew install python; pip install dropbox;
script/dropbox_upload.py ${UPLOAD_DIR} /Public/${UPLOAD_DIR} ${DROPBOX_KEY};
fi
install:
- if [[ $CMAKE_CXX_COMPILER == g++ ]]; then
cd /;
wget https://dl.dropboxusercontent.com/u/203889738/gcc/gcc-4.8.1_gmp-5.1.2_mpfr-3.1.2.tar.gz -O /tmp/gcc-mlion.tar.gz;
wget http://dl.dropboxusercontent.com/u/203889738/gcc/gcc-4.9.0_OSX.tar.gz -O /tmp/gcc-mlion.tar.gz;
sudo tar xvfz /tmp/gcc-mlion.tar.gz;
cd -;
sudo chown -R `whoami` /usr/local;
brew install gmp; brew link --overwrite gmp;
brew install mpfr; brew link --overwrite mpfr;
fi
- sudo chown -R `whoami` /usr/local
- brew install cmake ninja
- if [[ $USE_TCMALLOC == TRUE ]]; then brew install google-perftools; fi
- if [[ $UPLOAD ]]; then
brew install python; pip install dropbox;
fi
notifications:
email:

View file

@ -1,11 +1,29 @@
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="
matrix:
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=TESTCOV
TESTCOV_TOOL=gcov-4.8
USE_TCMALLOC=TRUE
DROPBOX=TRUE
TRIGGER_BB=TRUE
TRIGGER_OSX=TRUE
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DOXYGEN
BUILD_DOXYGEN=TRUE
DROPBOX=TRUE
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=DEBUG
USE_TCMALLOC=TRUE
BUILD_DOXYGEN=FALSE
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=DEBUG
USE_TCMALLOC=TRUE
@ -15,6 +33,8 @@ env:
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=RELEASE
USE_TCMALLOC=TRUE
DROPBOX=TRUE
UPLOAD=linux_tcmalloc
- CMAKE_CXX_COMPILER=clang++-3.3
CMAKE_BUILD_TYPE=DEBUG
USE_TCMALLOC=FALSE
@ -27,18 +47,24 @@ env:
- CMAKE_CXX_COMPILER=g++-4.8
CMAKE_BUILD_TYPE=RELEASE
USE_TCMALLOC=FALSE
DROPBOX=TRUE
UPLOAD=linux
before_script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ../src
script:
- make && yes "C" | ctest -T test -VV
after_success:
- cd ..
- if [[ $BUILD_DOXYGEN == TRUE ]]; then ./script/update_doxygen.sh; fi
- if [[ $TRIGGER_BB == TRUE ]]; then
git push -q https://soonhok:${BB_TOKEN}@bitbucket.org/soonhok/lean.git +master;
fi
- if [[ $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;
fi
install:
- until sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; do echo retry; done
@ -51,6 +77,48 @@ install:
- 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 [[ $CMAKE_BUILD_TYPE == TESTCOV ]]; then
wget http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz;
tar xvfz lcov-1.10.tar.gz;
mkdir ~/bin;
cp -v lcov-1.10/bin/{lcov,genpng,gendesc,genhtml,geninfo} ~/bin/;
rm -rf lcov-1.10.tar.gz lcov-1.10;
fi
- if [[ $DROPBOX == TRUE ]]; then
sudo apt-get -qq install python python-pip;
sudo pip install dropbox;
fi
- if [[ $BUILD_DOXYGEN == TRUE ]]; then
sudo apt-get -qq install doxygen graphviz;
fi
script:
- if [[ $CMAKE_BUILD_TYPE == DEBUG || $CMAKE_BUILD_TYPE == RELEASE ]]; then
mkdir -p build;
cd build;
cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ../src;
make && yes "C" | ctest -T test -VV;
fi
after_script:
- if [[ $CMAKE_BUILD_TYPE == DEBUG ]] || [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
cd ..;
fi
- if [[ $BUILD_DOXYGEN == TRUE ]]; then
script/doxygen.sh;
script/dropbox_upload.py doc /Public/doc ${DROPBOX_KEY};
fi
- if [[ $CMAKE_BUILD_TYPE == TESTCOV ]]; then
script/lcov.sh ${CMAKE_CXX_COMPILER} ${TESTCOV_TOOL};
script/dropbox_upload.py build/testcov/lcov /Public/lcov ${DROPBOX_KEY};
fi
- if [[ $UPLOAD ]]; then
UPLOAD_DIR=bin;
BINARY=lean_${UPLOAD};
mkdir ${UPLOAD_DIR};
cp build/shell/lean ${UPLOAD_DIR}/${BINARY};
script/dropbox_upload.py ${UPLOAD_DIR} /Public/${UPLOAD_DIR} ${DROPBOX_KEY};
fi
notifications:
email:

View file

@ -1,14 +1,16 @@
#!/bin/bash
CXX=g++
GCOV_TOOL=gcov
CXX=$1
GCOV_TOOL=$2
LCOV=~/bin/lcov
GENHTML=~/bin/genhtml
rm -rf build
mkdir -p build/testcov
cd build/testcov
cmake -DCMAKE_BUILD_TYPE=TESTCOV -DCMAKE_CXX_COMPILER=$CXX -G Ninja ../../src
ninja
cmake -DCMAKE_BUILD_TYPE=TESTCOV -DCMAKE_CXX_COMPILER=$CXX ../../src
make
ctest
lcov -c -b ../../src -d . -o cov.info --no-external --gcov-tool $GCOV_TOOL
lcov --remove cov.info "tests/*" -o cov.info
genhtml cov.info --output-directory lcov
$LCOV -c -b ../../src -d . -o cov.info --no-external --gcov-tool $GCOV_TOOL
$LCOV --remove cov.info "tests/*" -o cov.info
$GENHTML cov.info --output-directory lcov
cd ../../