Module of module types for OrderedType,ComparableType,Printable,Serializable,Discrete...
[ocaml.git] / build / buildbot
blobe9b2579eb083b6595777029619ce960e00073308
1 #!/bin/sh
3 # If you want to help me by participating to the build/test effort:
4 # http://gallium.inria.fr/~pouillar/ocaml-testing.html
5 # -- Nicolas Pouillard
7 usage() {
8 echo "Usage: $0 (make|ocb|ocamlbuild) (win (mingw|msvc|msvc64) | <configure-arg>*)"
9 exit 1
12 logfile="buildbot.log"
14 finish() {
15 curl -s -0 -F "log=@$logfile" \
16 -F "host=`hostname`" \
17 -F "mode=$mode-$opt_win-$opt_win2" \
18 http://buildbot.feydakins.org/dropbox || :
21 rm -f buildbot.failed
22 rm -f $logfile
24 bad() {
25 touch buildbot.failed
28 finish_if_bad() {
29 if [ -f buildbot.failed ]; then
30 finish
31 exit 2
35 if figlet "test" > /dev/null 2> /dev/null; then
36 draw="figlet"
37 else
38 draw="echo ----------- "
41 if echo | tee -a tee.log > /dev/null 2> /dev/null; then
42 tee="tee -a $logfile"
43 else
44 tee=:
47 rm -f tee.log
49 log() {
50 $draw $@
51 $tee
54 mode=$1
55 shift 1
57 case "$mode" in
58 make|ocb|ocamlbuild) : ;;
59 *) usage;;
60 esac
62 case "$1" in
63 win)
64 opt_win=win
65 opt_win2=$2
66 shift 2
67 Makefile=Makefile.nt;;
68 *) Makefile=Makefile;;
69 esac
71 ( [ -f config/Makefile ] && make -f $Makefile clean || : ) 2>&1 | log clean
73 ( ./build/distclean.sh || : ) 2>&1 | log distclean
75 (cvs -q up -dP -r release310 || bad) 2>&1 | log cvs up
76 finish_if_bad
78 case "$opt_win" in
79 win)
81 # FIXME
82 sed -e 's/\(OTHERLIBRARIES=.*\) labltk/\1/' \
83 < "config/Makefile.$opt_win2" > config/Makefile || bad
84 finish_if_bad
86 cp config/m-nt.h config/m.h || bad
87 finish_if_bad
88 cp config/s-nt.h config/s.h || bad
89 finish_if_bad
93 (./configure --prefix `pwd`/_install $@ || bad) 2>&1 | log configure
94 finish_if_bad
96 esac
98 case "$mode" in
99 make)
100 (make -f $Makefile world opt opt.opt install || bad) 2>&1 | log build install
101 finish_if_bad
103 ocb|ocamlbuild)
104 (./build/fastworld.sh || bad) 2>&1 | log build
105 finish_if_bad
106 (./build/install.sh || bad) 2>&1 | log install
107 finish_if_bad
109 esac
111 (cat _build/not_installed || bad) 2>&1 | log not_installed
113 finish