2013-08-12 22:34:42 +00:00
|
|
|
language: objective-c
|
|
|
|
env:
|
2013-08-18 18:22:36 +00:00
|
|
|
global:
|
2014-05-02 04:10:17 +00:00
|
|
|
# DROPBOX_KEY=[secure]
|
2013-08-18 18:22:36 +00:00
|
|
|
- secure: "W8vou0KRJOOboZXP9q+D/9Wl6LlBeVS2T85MHWPz7EwCMQbJq5xWnGzYLE6FmC0iILcZkXyP63vqoYMFo5MJaEQeALGx2RuIiW7XgrD+7Bn4Vfsp6BLT7K9/AJETGGTQnLs8oZJJCXHGtzbc8EPFIZd/ZPPrve4jhEE5ZNhXnRc="
|
2013-08-12 22:34:42 +00:00
|
|
|
matrix:
|
2014-07-18 13:24:02 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF MULTI_THREAD=OFF PUSH_TO_CDASH=TRUE LUA=51
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF MULTI_THREAD=OFF PUSH_TO_CDASH=TRUE LUA=51 UPLOAD=osx PACKAGE=TRUE
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF MULTI_THREAD=OFF PUSH_TO_CDASH=TRUE LUA=52
|
|
|
|
- CMAKE_CXX_COMPILER=g++-4.8 CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF MULTI_THREAD=OFF PUSH_TO_CDASH=TRUE LUA=JIT
|
2013-09-20 18:37:42 +00:00
|
|
|
|
|
|
|
# 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
|
2013-08-12 22:34:42 +00:00
|
|
|
|
2014-06-03 01:23:22 +00:00
|
|
|
# Turn off Thread on OSX due to segmantation fault.
|
|
|
|
# This is due to a bug in clang C++11 on OSX.
|
|
|
|
# Soonho has reported the issue to the clang developers.
|
|
|
|
# It is a known bug.
|
|
|
|
|
2014-07-18 13:24:02 +00:00
|
|
|
install:
|
|
|
|
- brew update
|
|
|
|
- if [[ $CMAKE_CXX_COMPILER == g++ ]]; then
|
|
|
|
brew install gcc;
|
|
|
|
brew link gcc;
|
|
|
|
COMPILER=g++-4.8.3;
|
|
|
|
fi
|
|
|
|
- brew install gmp; brew link --overwrite gmp
|
|
|
|
- brew install mpfr; brew link --overwrite mpfr
|
|
|
|
- if [[ $LUA == 52 ]]; then
|
|
|
|
brew tap homebrew/versions; brew install lua52;
|
|
|
|
fi
|
|
|
|
- if [[ $LUA == 51 ]]; then
|
|
|
|
brew install lua;
|
|
|
|
fi
|
|
|
|
- if [[ $LUA == JIT ]]; then
|
|
|
|
brew install luajit;
|
|
|
|
fi
|
|
|
|
- brew list | grep "cmake" || brew install cmake
|
|
|
|
- brew list | grep "ninja" || brew install 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
|
|
|
|
|
2013-08-12 22:34:42 +00:00
|
|
|
before_script:
|
2013-08-18 18:22:36 +00:00
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2014-07-18 13:24:02 +00:00
|
|
|
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DTCMALLOC=${TCMALLOC} -DMULTI_THREAD=${MULTI_THREAD} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ../src -G Ninja
|
2013-08-18 18:22:36 +00:00
|
|
|
- cd ..
|
2013-08-12 22:34:42 +00:00
|
|
|
|
2013-11-13 02:48:19 +00:00
|
|
|
# Remark:
|
|
|
|
# Added flag "-E leanslowtests" to ctest when in Debug mode
|
|
|
|
# Reason: one of the tests was producing a stackoverflow.
|
|
|
|
|
2013-08-12 22:34:42 +00:00
|
|
|
script:
|
2013-08-20 03:41:54 +00:00
|
|
|
- cd build
|
2014-07-18 13:24:02 +00:00
|
|
|
- SITE=OSX10.9.2@Travis
|
2013-09-06 03:15:34 +00:00
|
|
|
- if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
|
|
|
|
BUILD_TYPE=Release;
|
|
|
|
else
|
|
|
|
BUILD_TYPE=Debug;
|
2013-11-13 04:15:03 +00:00
|
|
|
CTEST_FLAGS="-E leanslowtests";
|
2013-09-06 03:15:34 +00:00
|
|
|
fi
|
2013-12-13 20:07:19 +00:00
|
|
|
- LUA_VERSION=LUA_${LUA}
|
2014-07-18 13:24:02 +00:00
|
|
|
- BUILD_NAME=${TRAVIS_BRANCH}_${COMPILER}_${BUILD_TYPE}_${LUA_VERSION}
|
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
|
2013-09-06 03:53:21 +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 ExperimentalConfigure
|
2013-09-06 03:53:21 +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-11-13 02:48:19 +00:00
|
|
|
- yes "C" | ctest -D ExperimentalTest ${CTEST_FLAGS} -VV | ../script/demangle_cpptype.py;
|
2013-12-26 07:25:09 +00:00
|
|
|
- if [[ $PACKAGE == TRUE ]]; then
|
|
|
|
ninja package;
|
|
|
|
fi
|
2013-08-20 03:41:54 +00:00
|
|
|
- cd ..
|
2013-08-19 03:21:25 +00:00
|
|
|
|
|
|
|
after_script:
|
|
|
|
- if [[ $UPLOAD ]]; then
|
|
|
|
UPLOAD_DIR=bin;
|
|
|
|
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=osx;
|
2013-12-13 20:07:19 +00:00
|
|
|
LUA_VERSION=LUA_${LUA};
|
|
|
|
ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}_${LUA_VERSION};
|
2013-09-21 01:10:12 +00:00
|
|
|
if [[ $TCMALLOC == ON ]]; then
|
2013-09-11 00:05:14 +00:00
|
|
|
ARCHIVE_BINARY=${ARCHIVE_BINARY}_tcmalloc;
|
|
|
|
fi;
|
2013-08-19 03:21:25 +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-15 07:54:43 +00:00
|
|
|
cp -v build/shell/lean ${UPLOAD_DIR}/${BINARY};
|
|
|
|
tar cvfz ${UPLOAD_DIR}/${ARCHIVE_BINARY}.tar.gz ${UPLOAD_DIR}/${BINARY};
|
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-19 03:21:25 +00:00
|
|
|
fi
|
2013-09-04 18:00:55 +00:00
|
|
|
- cd build
|
|
|
|
- if [[ $MEMCHECK == TRUE ]]; then
|
2013-09-29 23:29:02 +00:00
|
|
|
yes "C" | ctest -D ExperimentalMemCheck -VV | ../script/demangle_cpptype.py;
|
2013-09-04 18:00:55 +00:00
|
|
|
fi
|
|
|
|
- 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-29 23:29:02 +00:00
|
|
|
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 {}' ";";
|
2013-09-04 18:00:55 +00:00
|
|
|
ctest -D ExperimentalSubmit;
|
|
|
|
fi
|
|
|
|
- cd ..
|
2013-08-12 22:34:42 +00:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
recipients:
|
2014-05-02 21:21:18 +00:00
|
|
|
- lean-build@googlegroups.com
|
2013-08-12 22:34:42 +00:00
|
|
|
on_success: always
|
|
|
|
on_failure: always
|