-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.osx.yml
134 lines (127 loc) · 5.73 KB
/
.travis.osx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
language: objective-c
env:
global:
# DROPBOX_KEY=[secure]
- secure: "W8vou0KRJOOboZXP9q+D/9Wl6LlBeVS2T85MHWPz7EwCMQbJq5xWnGzYLE6FmC0iILcZkXyP63vqoYMFo5MJaEQeALGx2RuIiW7XgrD+7Bn4Vfsp6BLT7K9/AJETGGTQnLs8oZJJCXHGtzbc8EPFIZd/ZPPrve4jhEE5ZNhXnRc="
matrix:
- CMAKE_CXX_COMPILER=g++-4.9 CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=51 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=g++-4.9 CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=51 MULTI_THREAD=ON UPLOAD=osx PACKAGE=TRUE
- CMAKE_CXX_COMPILER=g++-4.9 CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=52 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=g++-4.9 CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=52 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=g++-4.9 CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=JIT MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=g++-4.9 CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=JIT MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=51 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=51 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=52 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=52 MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=DEBUG TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=JIT MULTI_THREAD=ON
- CMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=RELEASE TCMALLOC=OFF PUSH_TO_CDASH=TRUE LUA=JIT MULTI_THREAD=ON
# 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
install:
- brew update
- if [[ $CMAKE_CXX_COMPILER == g++-4.9 ]]; then
brew install gcc;
brew link gcc;
COMPILER=g++-`${CMAKE_CXX_COMPILER} --version | head -n 1 | grep -o '[0-9]*\.[0-9]*\.[0-9]*$'`;
fi
- if [[ $CMAKE_CXX_COMPILER == clang++ ]]; then
COMPILER=${CMAKE_CXX_COMPILER}`${CMAKE_CXX_COMPILER} --version | head -n 1 | grep -o '[0-9]*\.[0-9]*\.[0-9]*'`;
fi
- brew install gmp; brew link --overwrite gmp
- brew install mpfr; brew link --overwrite mpfr
- if [[ $LUA == 52 ]]; then
brew install lua;
fi
- if [[ $LUA == 51 ]]; then
brew install lua51;
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
before_script:
- mkdir -p build
- cd build
- cmake -DIGNORE_SORRY=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DTCMALLOC=${TCMALLOC} -DMULTI_THREAD=${MULTI_THREAD} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ../src -G Ninja
- cd ..
# Remark:
# Added flag "-E leanslowtests" to ctest when in Debug mode
# Reason: one of the tests was producing a stackoverflow.
script:
- cd build
- OSX_VERSION=`sw_vers | grep 'ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'`
- SITE=${OSX_VERSION}@Travis
- if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
BUILD_TYPE=Release;
else
BUILD_TYPE=Debug;
CTEST_FLAGS="-E leanslowtests";
fi
- LUA_VERSION=LUA_${LUA}
- BUILD_NAME=${TRAVIS_BRANCH}_${COMPILER}_${BUILD_TYPE}_${LUA_VERSION}
- 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 ${CTEST_FLAGS} -VV | ../script/demangle_cpptype.py;
- if [[ $PACKAGE == TRUE ]]; then
ninja package;
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=osx;
LUA_VERSION=LUA_${LUA};
ARCHIVE_BINARY=${NOW}_${TRAVIS_BRANCH}_${GIT_COMMIT}_${OS}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}_${LUA_VERSION};
if [[ $TCMALLOC == ON ]]; then
ARCHIVE_BINARY=${ARCHIVE_BINARY}_tcmalloc;
fi;
mkdir ${UPLOAD_DIR};
if [[ $PACKAGE == TRUE ]]; then
cp -v build/lean*.zip ${UPLOAD_DIR}/;
fi;
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 | ../script/demangle_cpptype.py;
fi
- if [[ $PUSH_TO_CDASH == TRUE ]]; then
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//,/\,};
GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT"));
find Testing -name "*.xml" -exec sed -i "" "s,Generator=\".*\",Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"," {} ";";
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 {}' ";";
ctest -D ExperimentalSubmit;
fi
- cd ..
notifications:
email:
recipients:
- lean-build@googlegroups.com
on_success: change
on_failure: always