2013-08-22 19:12:50 +00:00
|
|
|
language: cpp
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2014-05-02 04:10:17 +00:00
|
|
|
# DROPBOX_KEY=[secure]
|
2013-11-17 04:43:47 +00:00
|
|
|
- secure: "fQ9mzDBBvId1qpEK/DhwlwRYBGrP0XG/XKUvTRTmX3kv7YIrKFZs/TGEDyvwnfaq6IY6rpHdqsnd/ic22DVsEGIGQO0BWUybZP0nmBHmL9aOqjjdUlgVs5vKhWmij8NkCp5LA3GU0fPm0tOonNmejxsxfNUdxk66hOlLLgPhzVo="
|
2013-08-22 19:12:50 +00:00
|
|
|
matrix:
|
2013-12-26 07:25:09 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE UPLOAD=windows DROPBOX=TRUE PUSH_TO_CDASH=TRUE PACKAGE=TRUE
|
2013-09-06 03:15:34 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG PUSH_TO_CDASH=TRUE
|
2013-08-22 19:12:50 +00:00
|
|
|
|
|
|
|
install:
|
2013-11-06 02:35:50 +00:00
|
|
|
- sudo apt-get -qq install make cmake
|
2013-08-22 19:12:50 +00:00
|
|
|
- if [[ $DROPBOX == TRUE ]]; then
|
|
|
|
sudo apt-get -qq install python python-pip;
|
|
|
|
sudo pip install dropbox;
|
|
|
|
fi
|
2013-08-22 23:48:05 +00:00
|
|
|
- mkdir -p /tmp/mxe
|
|
|
|
- cd /tmp/mxe
|
2013-12-12 21:27:58 +00:00
|
|
|
- wget http://dl.dropboxusercontent.com/u/203889738/gcc/mxe-gcc-4.8-20131205.tar.bz2
|
|
|
|
- tar xfj mxe-gcc-4.8-20131205.tar.bz2
|
2013-08-22 23:48:05 +00:00
|
|
|
- cd -
|
2013-08-22 19:12:50 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- mkdir -p build
|
2013-08-22 23:48:05 +00:00
|
|
|
- LEAN_ROOT=`pwd`
|
2013-08-22 19:12:50 +00:00
|
|
|
- cd build
|
2013-09-20 20:41:26 +00:00
|
|
|
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../src -DTCMALLOC=OFF -DCMAKE_TOOLCHAIN_FILE=/tmp/mxe/usr/x86_64-w64-mingw32/share/cmake/mxe-conf.cmake
|
2013-09-06 03:15:34 +00:00
|
|
|
- SITE=Windows@Travis
|
|
|
|
- if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
|
|
|
|
BUILD_TYPE=Release;
|
|
|
|
else
|
|
|
|
BUILD_TYPE=Debug;
|
|
|
|
fi
|
2013-12-12 21:27:58 +00:00
|
|
|
- BUILD_NAME=${TRAVIS_BRANCH}_w64-mingw32-g++-4.8.3_${BUILD_TYPE}
|
2013-09-27 19:22:44 +00:00
|
|
|
- if [[ $TCMALLOC == ON ]]; then
|
|
|
|
BUILD_NAME=${BUILD_NAME}_TC;
|
|
|
|
fi;
|
2013-09-06 03:15:34 +00:00
|
|
|
- CONFIG_FILE=DartConfiguration.tcl
|
|
|
|
- sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE
|
|
|
|
- sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE
|
2013-09-04 10:41:57 +00:00
|
|
|
- ctest -D ExperimentalConfigure
|
2013-09-06 03:15:34 +00:00
|
|
|
- sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE
|
|
|
|
- sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE
|
2013-09-04 10:41:57 +00:00
|
|
|
- ctest -D ExperimentalBuild -VV
|
2013-09-04 07:52:42 +00:00
|
|
|
- if [[ $PUSH_TO_CDASH == TRUE ]]; then
|
2013-09-28 20:33:13 +00:00
|
|
|
GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`;
|
|
|
|
GIT_SUBJECT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 2-`;
|
|
|
|
GIT_SUBJECT=${GIT_SUBJECT//\"/\\\"};
|
|
|
|
GIT_SUBJECT=${GIT_SUBJECT//,/\,};
|
2013-09-27 19:22:44 +00:00
|
|
|
GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT"));
|
2013-09-28 20:33:13 +00:00
|
|
|
find Testing -name "*.xml" -exec sed -i "s,Generator=\".*\",Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"," {} ";";
|
2013-09-06 03:15:34 +00:00
|
|
|
find Testing -type f -name "*.xml" -exec sed -i 's/OSName=\"Linux\"/OSName=\"Windows\"/' {} \; ;
|
2013-09-04 04:55:40 +00:00
|
|
|
ctest -D ExperimentalSubmit;
|
2013-09-04 07:52:42 +00:00
|
|
|
fi
|
2013-12-26 07:25:09 +00:00
|
|
|
- if [[ $PACKAGE == TRUE ]]; then
|
|
|
|
make package;
|
|
|
|
fi
|
2013-08-22 23:48:05 +00:00
|
|
|
- cd ..
|
2013-08-22 19:12:50 +00:00
|
|
|
|
|
|
|
after_script:
|
|
|
|
- if [[ $UPLOAD ]]; then
|
|
|
|
UPLOAD_DIR=bin;
|
2013-09-11 00:05:14 +00:00
|
|
|
BINARY=lean_${UPLOAD};
|
2013-09-15 07:54:43 +00:00
|
|
|
NOW=`TZ='America/Los_Angeles' date +"%Y%m%d_%H%M"`;
|
|
|
|
GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`;
|
2013-09-11 00:05:14 +00:00
|
|
|
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;
|
2013-08-22 19:12:50 +00:00
|
|
|
mkdir ${UPLOAD_DIR};
|
2013-12-26 07:25:09 +00:00
|
|
|
if [[ $PACKAGE == TRUE ]]; then
|
2013-12-26 07:38:16 +00:00
|
|
|
cp -v build/lean*.zip ${UPLOAD_DIR}/;
|
|
|
|
fi;
|
2013-09-11 00:05:14 +00:00
|
|
|
cp build/shell/lean.exe ${UPLOAD_DIR}/${BINARY}.exe;
|
2013-09-15 07:54:43 +00:00
|
|
|
tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY}.exe;
|
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-22 19:12:50 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
recipients:
|
2013-08-22 23:48:05 +00:00
|
|
|
- leansmt-dev@googlegroups.com
|
2013-08-22 19:12:50 +00:00
|
|
|
on_success: always
|
|
|
|
on_failure: always
|