15861ef6ea
- fix commit name for OSX & Windows - fix NOW to use specific time zone, PST - upload compressed binary for archiving
73 lines
2.6 KiB
YAML
73 lines
2.6 KiB
YAML
language: cpp
|
|
|
|
env:
|
|
global:
|
|
# DROPBOX_KEY
|
|
- secure: "c9wddhUaDt9SLzsT7R15j0Qey0JSZ0C602w2cu6IU88N84bDJK2wZ1wPEd0BGxy+hYamkJsNK34+XLZFBxQ5eriyxTZnAugpqk+PCnTy7Ct03y6f4zFGADGkXyYiTrnU/A1IxAk+lQV0BYGYagGMJfgtrxKofjukVqx6qEHQSKk="
|
|
matrix:
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE UPLOAD=windows DROPBOX=TRUE PUSH_TO_CDASH=TRUE
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG PUSH_TO_CDASH=TRUE
|
|
|
|
install:
|
|
- sudo add-apt-repository --yes ppa:purplekarrot/cmake
|
|
- sudo apt-get -qq update
|
|
- sudo apt-get -qq install cmake make
|
|
- if [[ $DROPBOX == TRUE ]]; then
|
|
sudo apt-get -qq install python python-pip;
|
|
sudo pip install dropbox;
|
|
fi
|
|
- mkdir -p /tmp/mxe
|
|
- cd /tmp/mxe
|
|
- wget http://dl.dropboxusercontent.com/u/203889738/gcc/mxe-gcc-4.8.1.tar.bz2
|
|
- tar xfj mxe-gcc-4.8.1.tar.bz2
|
|
- cd -
|
|
|
|
script:
|
|
- mkdir -p build
|
|
- LEAN_ROOT=`pwd`
|
|
- cd build
|
|
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../src -DCMAKE_TOOLCHAIN_FILE=/tmp/mxe/usr/x86_64-w64-mingw32/share/cmake/mxe-conf.cmake
|
|
- SITE=Windows@Travis
|
|
- GIT_COMMIT=`git log HEAD~ --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}_w64-mingw32-g++-4.8.1_${BUILD_TYPE}
|
|
- 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
|
|
- if [[ $PUSH_TO_CDASH == TRUE ]]; then
|
|
find Testing -type f -name "*.xml" -exec sed -i 's/OSName=\"Linux\"/OSName=\"Windows\"/' {} \; ;
|
|
ctest -D ExperimentalSubmit;
|
|
fi
|
|
- 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=windows;
|
|
ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE};
|
|
if [[ $USE_TCMALLOC ]]; then
|
|
ARCHIVE_BINARY=${ARCHIVE_BINARY}_tcmalloc;
|
|
fi;
|
|
mkdir ${UPLOAD_DIR};
|
|
cp build/shell/lean.exe ${UPLOAD_DIR}/${BINARY}.exe;
|
|
tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY}.exe;
|
|
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
|