-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.windows.yml
87 lines (82 loc) · 3.31 KB
/
.travis.windows.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
language: cpp
env:
global:
# DROPBOX_KEY=[secure]
- secure: "fQ9mzDBBvId1qpEK/DhwlwRYBGrP0XG/XKUvTRTmX3kv7YIrKFZs/TGEDyvwnfaq6IY6rpHdqsnd/ic22DVsEGIGQO0BWUybZP0nmBHmL9aOqjjdUlgVs5vKhWmij8NkCp5LA3GU0fPm0tOonNmejxsxfNUdxk66hOlLLgPhzVo="
matrix:
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=RELEASE UPLOAD=windows DROPBOX=TRUE PUSH_TO_CDASH=TRUE PACKAGE=TRUE
- CMAKE_CXX_COMPILER=g++ CMAKE_BUILD_TYPE=DEBUG PUSH_TO_CDASH=TRUE
install:
- until sudo add-apt-repository --yes ppa:kalakris/cmake; do echo retry; done
- until sudo apt-get -qq update; do echo retry; done
- sudo apt-get -qq install make cmake
- 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-20131205.tar.bz2
- tar xfj mxe-gcc-4.8-20131205.tar.bz2
- cd -
script:
- mkdir -p build
- LEAN_ROOT=`pwd`
- cd build
- cmake -DCROSS_COMPILE=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../src -DTCMALLOC=OFF -DCMAKE_TOOLCHAIN_FILE=/tmp/mxe/usr/x86_64-w64-mingw32/share/cmake/mxe-conf.cmake
- SITE=Windows@Travis
- if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then
BUILD_TYPE=Release;
else
BUILD_TYPE=Debug;
fi
- BUILD_NAME=${TRAVIS_BRANCH}_w64-mingw32-g++-4.8.3_${BUILD_TYPE}
- 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
- 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 -type f -name "*.xml" -exec sed -i 's/OSName=\"Linux\"/OSName=\"Windows\"/' {} \; ;
ctest -D ExperimentalSubmit;
fi
- if [[ $PACKAGE == TRUE ]]; then
make 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=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};
if [[ $PACKAGE == TRUE ]]; then
cp -v build/lean*.zip ${UPLOAD_DIR}/;
fi;
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:
- lean-build@googlegroups.com
on_success: change
on_failure: always