COIN-OR::LEMON - Graph Library

source: lemon-0.x/scripts/server-services/repocheck/commit-checker @ 2526:b7727edd44f2

Last change on this file since 2526:b7727edd44f2 was 2365:751a14b992f2, checked in by Alpar Juttner, 18 years ago

Check Soplex support, as well

  • Property exe set to *
File size: 3.3 KB
Line 
1#!/bin/bash
2
3ROOT=$PWD
4REV=$1
5LOGFILE=${ROOT}/logs/${REV}.log
6
7function im-not-the-next() {
8    for i in `ls queue`
9    do
10        if [ $i -lt $REV ]; then
11            true
12            return
13        fi
14    done
15    false
16}
17
18function make-dir () {
19    if [ ! -d $1 ]; then
20        mkdir $1
21    fi
22}
23
24function makecheck () {
25    if [ `which $(echo $CXX|cut -f1 -d' ' )` ]; then
26        make-dir $ODIR &&
27        cd $ODIR &&
28        time ../trunk/configure $* &&
29        time make check &&
30        cd ..
31    else
32        echo
33        echo '***************************************************************'
34        echo "  COMPILER $CXX CANNOT BE FOUND"
35        echo '***************************************************************'
36        echo
37    fi
38}
39
40function check-compilers() {
41cd trunk &&
42autoreconf -vi &&
43cd .. &&
44ODIR=gcc-3.3 CXX=g++-3.3 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark --with-soplex=/usr/local/soplex &&
45ODIR=gcc-3.4 CXX=g++-3.4 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark --with-soplex=/usr/local/soplex &&
46ODIR=gcc-4.0 CXX=g++-4.0 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark --with-soplex=/usr/local/soplex &&
47ODIR=gcc-4.1 CXX=g++-4.1 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark --with-soplex=/usr/local/soplex &&
48# # ODIR=icc-8.0 CXX=icpc-8.0 CXXFLAGS='-Werror' makecheck --enable-demo --enable-benchmark &&
49# ODIR=icc-9.0 CXX='icpc-9.0' CXXFLAGS='-Werror' makecheck --enable-demo --enable-benchmark &&
50# ODIR=mingw CXX='g++' makecheck --with-msw --target=i586-mingw32msvc --host=i586-mingw32msvc --build=i386-linux --without-glpk &&
51echo &&
52echo '**********************************************************************' &&
53echo '   REPOSITORY SEEMS OK' &&
54echo '**********************************************************************' &&
55echo
56}
57
58if [ $# -eq 0 ]; then
59    echo 'Usage:'
60    echo '   commit-checker --init'
61    echo '   commit-checker revision'
62    exit 1
63elif [ $1 = '--init' ]; then
64    rm -rf queue
65    mkdir queue
66    make-dir logs
67    rm -rf trunk
68    svn co https://lemon.cs.elte.hu/svn/hugo/trunk
69    exit 0
70fi
71
72touch ${ROOT}/queue/$REV
73
74while im-not-the-next; do
75    sleep 10
76done
77
78# echo RUN $REV
79
80svn up -r$REV trunk >${LOGFILE} 2>&1
81
82AUTHOR=`svn info trunk|grep 'Last Changed Author:'|cut -d ' ' -f 4`
83EMAIL=`awk '$1=="'${AUTHOR}'" {print $2}' <${ROOT}/e-mails`
84
85echo '
86
87*************************************************************
88Check revision '${REV}' of '${AUTHOR}' ('${EMAIL}')
89*************************************************************
90
91'>>${LOGFILE} 2>&1
92
93if check-compilers >>${LOGFILE} 2>&1
94then
95    echo -n
96else
97    echo 'Dear '${AUTHOR}',
98Your svn commit -r'${REV}' made the repository broken, or at least
99the compiler emits warnings during the build process.
100The compilation log is attached.
101Please fix the problem as soon as possible.
102
103Best regards,
104LEMON Commit Checking Service
105'|
106    mail -a ${LOGFILE} -s '[LEMON-SVN] WARNING: Revision '${REV}' is broken' \
107        ${EMAIL} alpar@cs.elte.hu
108
109    echo 'Commit -r'${REV}' made the repository broken, or at least
110the compiler emits warnings during the build process.
111Do not update until this bug is fixed, unless you really need it.
112
113Best regards,
114LEMON Commit Checking Service
115'|
116    mail -s 'WARNING: Revision '${REV}' is broken' \
117        ${EMAIL} lemon-commits@lemon.cs.elte.hu
118fi
119   
120#    rm ${LOGFILE}
121rm ${ROOT}/queue/$REV
122
Note: See TracBrowser for help on using the repository browser.