lean2/.travis.osx.yml
Soonho Kong 3527babfee chore(travis): use consistent build name
- have build name is in the form of
       "<BRANCH>_<CXX_COMPILER>_<BUILD_TYPE>(_TC)?"
   to have consistency over time.
 - have "Generator" field in cdash XMLs which is in the form of
        "<GIT_COMMIT>###<GIT_SUBJECT>"
   it will be displayed as a small mouseover-text.
2013-09-27 12:22:44 -07:00

99 lines
3.6 KiB
YAML

language: objective-c
env:
global:
- secure: "W8vou0KRJOOboZXP9q+D/9Wl6LlBeVS2T85MHWPz7EwCMQbJq5xWnGzYLE6FmC0iILcZkXyP63vqoYMFo5MJaEQeALGx2RuIiW7XgrD+7Bn4Vfsp6BLT7K9/AJETGGTQnLs8oZJJCXHGtzbc8EPFIZd/ZPPrve4jhEE5ZNhXnRc="
matrix:
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF UPLOAD=osx PUSH_TO_CDASH=TRUE
# Turn off tcmalloc on OSX due to segmentation fault.
# Soonho filed a bug report for this:
# https://code.google.com/p/gperftools/issues/detail?id=573&thanks=573&ts=1379701793
before_script:
- mkdir -p build
- cd build
- 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:/local/lib/gcc/x86_64-apple-darwin12.4.0/4.9.0/
- export LIBRARY_PATH
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DTCMALLOC=${TCMALLOC} -DCMAKE_CXX_COMPILER=/usr/local/bin/${CMAKE_CXX_COMPILER} ../src -G Ninja
- cd ..
script:
- cd build
- SITE=OSX10.8.2@Travis
- if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
BUILD_TYPE=Release;
else
BUILD_TYPE=Debug;
fi
- BUILD_NAME=${TRAVIS_BRANCH}_g++-4.9.0_${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
- 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
- cd ..
after_script:
- if [[ $UPLOAD ]]; then
UPLOAD_DIR=bin;
BINARY=lean_${UPLOAD};
NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`;
GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`;
OS=osx;
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
- cd build
- if [[ $MEMCHECK == TRUE ]]; then
yes "C" | ctest -D ExperimentalMemCheck -VV;
fi
- if [[ $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=$(echo -e $(printf '%q' "$GIT_SUBJECT"));
find Testing -name "*.xml" -exec sed -i "" "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";";
ctest -D ExperimentalSubmit;
fi
- cd ..
install:
- if [[ $CMAKE_CXX_COMPILER == g++ ]]; then
cd /;
wget http://dl.dropboxusercontent.com/u/203889738/gcc/gcc-4.9.0_OSX.tar.bz2 -O /tmp/gcc-mlion.tar.bz2;
sudo tar xfj /tmp/gcc-mlion.tar.bz2;
cd -;
sudo chown -R `whoami` /usr/local;
brew install gmp; brew link --overwrite gmp;
brew install mpfr; brew link --overwrite mpfr;
fi
- brew install cmake ninja
- if [[ $MEMCHECK == TRUE ]]; then
brew install valgrind;
fi
- if [[ $USE_TCMALLOC == TRUE ]]; then brew install google-perftools; fi
- if [[ $UPLOAD ]]; then
brew install python; pip install dropbox;
fi
notifications:
email:
recipients:
- leansmt-dev@googlegroups.com
on_success: always
on_failure: always