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:
|
2013-12-13 22:55:38 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=51
|
2013-12-26 07:25:09 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=51 UPLOAD=osx PACKAGE=TRUE
|
2013-12-13 22:55:38 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=52
|
2013-12-13 20:07:19 +00:00
|
|
|
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=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
|
|
|
|
|
|
|
before_script:
|
2013-08-18 18:22:36 +00:00
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2014-05-02 05:38:52 +00:00
|
|
|
- CPLUS_INCLUDE_PATH=/usr/local/include/c++/4.8.1/:/usr/local/include/c++/4.8.1/x86_64-apple-darwin12.5.0:/usr/local/include/c++/4.8.1/bits/
|
2013-08-18 18:22:36 +00:00
|
|
|
- export CPLUS_INCLUDE_PATH
|
2014-05-02 05:38:52 +00:00
|
|
|
- LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.1/
|
2013-08-18 18:22:36 +00:00
|
|
|
- export LIBRARY_PATH
|
2013-09-21 01:10:12 +00:00
|
|
|
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DTCMALLOC=${TCMALLOC} -DCMAKE_CXX_COMPILER=/usr/local/bin/${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-05-02 05:38:52 +00:00
|
|
|
- SITE=OSX10.8.5@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-05-02 05:38:52 +00:00
|
|
|
- BUILD_NAME=${TRAVIS_BRANCH}_g++-4.8.1_${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
|
|
|
|
|
|
|
install:
|
2013-08-18 18:22:36 +00:00
|
|
|
- if [[ $CMAKE_CXX_COMPILER == g++ ]]; then
|
2014-05-02 05:38:52 +00:00
|
|
|
wget http://dreal.cs.cmu.edu/required_packages/gcc-4.8-bin.tar.gz;
|
|
|
|
sudo tar xfz gcc-4.8-bin.tar.gz -C /;
|
2013-08-20 03:41:54 +00:00
|
|
|
sudo chown -R `whoami` /usr/local;
|
|
|
|
brew install gmp; brew link --overwrite gmp;
|
|
|
|
brew install mpfr; brew link --overwrite mpfr;
|
2013-12-13 20:07:19 +00:00
|
|
|
fi
|
|
|
|
- if [[ $LUA == 52 ]]; then
|
2013-12-13 22:55:38 +00:00
|
|
|
brew tap homebrew/versions; brew install lua52;
|
2013-12-13 20:07:19 +00:00
|
|
|
fi
|
|
|
|
- if [[ $LUA == 51 ]]; then
|
2013-11-08 18:54:54 +00:00
|
|
|
brew install lua;
|
2013-08-18 18:22:36 +00:00
|
|
|
fi
|
2013-12-13 20:07:19 +00:00
|
|
|
- if [[ $LUA == JIT ]]; then
|
|
|
|
brew install luajit;
|
|
|
|
fi
|
2013-08-18 18:22:36 +00:00
|
|
|
- brew install cmake ninja
|
2013-09-04 04:55:40 +00:00
|
|
|
- if [[ $MEMCHECK == TRUE ]]; then
|
|
|
|
brew install valgrind;
|
|
|
|
fi
|
2013-08-18 18:22:36 +00:00
|
|
|
- if [[ $USE_TCMALLOC == TRUE ]]; then brew install google-perftools; fi
|
2013-08-20 03:41:54 +00:00
|
|
|
- if [[ $UPLOAD ]]; then
|
|
|
|
brew install python; pip install dropbox;
|
|
|
|
fi
|
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
|