forked from github/server
Merge branch 'feature/travis-migration' into develop
This commit is contained in:
commit
cc263ed6c8
|
@ -1,3 +1,4 @@
|
|||
*.orig
|
||||
eressea.ini
|
||||
Debug
|
||||
Release
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
sudo: false
|
||||
language: c
|
||||
compiler:
|
||||
<<<<<<< HEAD
|
||||
- gcc
|
||||
- clang
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
install:
|
||||
- sudo apt-get install -qq zlib1g-dev libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind clang
|
||||
script:
|
||||
- s/travis-build
|
||||
=======
|
||||
- gcc
|
||||
- clang
|
||||
script: s/travis-build
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- liblua5.2-dev
|
||||
- libncurses5-dev
|
||||
- libsqlite3-dev
|
||||
- libxml2-dev
|
||||
>>>>>>> hotfix-3.4.1
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
notifications:
|
||||
slack:
|
||||
secure: F89aXLWaE125PaJIlETv12jT4EfH6wLXJmGCPZzrN3OcLn2ahDWqjwuzR7lOEDf2nAISmeMPyDZMhEHXLNHAE5qP6lg9yliYQw5hzGmDK9m1xUq/pPEne/b2Y7K3my1mkRZ6n3asbHgSmBWAfCIk1JN8R5Rv+rmbLuWLc+zofts=
|
48
s/build.orig
48
s/build.orig
|
@ -1,48 +0,0 @@
|
|||
#!/bin/sh
|
||||
ROOT=`pwd`
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=`dirname $ROOT`
|
||||
done
|
||||
|
||||
<<<<<<< HEAD
|
||||
[ -z $BUILD ] && BUILD=Debug
|
||||
MACHINE=`uname -m`
|
||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
BIN_DIR="build-$MACHINE-$CC-$BUILD"
|
||||
=======
|
||||
[ -z "$CC" ] && CC=clang
|
||||
[ -z "$BUILD" ] && BUILD=Debug
|
||||
>>>>>>> hotfix-3.4.1
|
||||
|
||||
[ -z "$JOBS" ] && [ "" != "which nproc" ] && JOBS=`nproc`
|
||||
DISTCC=`which distcc`
|
||||
if [ ! -z "$DISTCC" ] ; then
|
||||
JOBS=`distcc -j`
|
||||
if [ -z "$JOBS" ] ; then
|
||||
JOBS=1
|
||||
elif [ $JOBS -gt 1 ] ; then
|
||||
CC="$DISTCC $CC"
|
||||
MAKEOPTS=-j$JOBS
|
||||
fi
|
||||
fi
|
||||
echo "Building with CC=$CC and $JOBS jobs"
|
||||
|
||||
if [ ! -d $ROOT/$BUILD ]; then
|
||||
echo "cannot find build directory $BUILD in $ROOT. did you run cmake-init?"
|
||||
exit
|
||||
fi
|
||||
|
||||
git submodule update
|
||||
|
||||
if [ -z `which tolua` ]; then
|
||||
echo "build tolua"
|
||||
cd $ROOT/tolua ; make
|
||||
fi
|
||||
|
||||
echo "build eressea"
|
||||
cd $ROOT/$BUILD
|
||||
make $MAKEOPTS && make test
|
||||
cd $OLDPWD
|
|
@ -1,80 +0,0 @@
|
|||
#!/bin/sh
|
||||
ROOT=$(pwd)
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=$(dirname $ROOT)
|
||||
if [ "$ROOT" == "/" ; then
|
||||
echo "could not find root, are you in the git repository?"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
[ -z $BUILD ] && BUILD=Debug
|
||||
MACHINE=`uname -m`
|
||||
<<<<<<< HEAD
|
||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||
=======
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="clang"
|
||||
>>>>>>> hotfix-3.4.1
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD"
|
||||
mkdir -p $BIN_DIR
|
||||
ln -sf $BIN_DIR $BUILD
|
||||
|
||||
MACHINE=$(gcc -dumpmachine)
|
||||
rm -f CMakeCache.txt
|
||||
|
||||
# use anything installed in /opt or /usr
|
||||
LIBRARY_PATH=/opt/lib:/opt/lib/$MACHINE:/usr/lib/$MACHINE
|
||||
INCLUDE_PATH=/opt/include:/usr/include
|
||||
PREFIX_PATH=/opt
|
||||
|
||||
# I like to put stuff in ~/usr if I don't have permission to install packages on the machine:
|
||||
if [ -d $HOME/usr ]; then
|
||||
LIBRARY_PATH=$HOME/usr/lib:$HOME/usr/lib/$MACHINE:$LIBRARY_PATH
|
||||
INCLUDE_PATH=$HOME/usr/include:$HOME/usr/include/$MACHINE:$INCLUDE_PATH
|
||||
PREFIX_PATH=$HOME/usr:$HOME/usr/local:$PREFIX_PATH
|
||||
fi
|
||||
|
||||
<<<<<<< HEAD
|
||||
if [ -z $PC_LUA ] && [ -e /opt/include/lua.h ]; then
|
||||
PC_LUA=/opt/include
|
||||
fi
|
||||
if [ -z $PC_TOLUA ] && [ -e /opt/include/tolua.h ]; then
|
||||
PC_TOLUA=/opt/include
|
||||
fi
|
||||
if [ ! -z $PC_TOLUA ]; then
|
||||
PC_ARGS="$PC_ARGS -DPC_TOLUA_INCLUDEDIR=$PC_TOLUA/include -DPC_TOLUA_LIBDIR=$PC_TOLUA/lib"
|
||||
fi
|
||||
if [ ! -z $PC_LUA ]; then
|
||||
PC_ARGS="$PC_ARGS -DPC_LUA_INCLUDEDIR=$PC_LUA/include -DPC_LUA_LIBDIR=$PC_LUA/lib"
|
||||
fi
|
||||
|
||||
cmake .. $PC_ARGS \
|
||||
-DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \
|
||||
=======
|
||||
ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \
|
||||
>>>>>>> hotfix-3.4.1
|
||||
-DCMAKE_BUILD_TYPE=$BUILD \
|
||||
-DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \
|
||||
-DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \
|
||||
-DCMAKE_PREFIX_PATH=$PREFIX_PATH \
|
||||
-DCMAKE_INSTALL_PREFIX=$HOME/eressea/server"
|
||||
|
||||
path="$(which tolua)"
|
||||
if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
|
||||
echo "tolua is not installed, building from source"
|
||||
cd $ROOT/tolua ; make
|
||||
ARGS="$ARGS -DPC_TOLUA_DIR=$ROOT/tolua"
|
||||
else
|
||||
echo "tolua is $path"
|
||||
fi
|
||||
unset path
|
||||
|
||||
set -e
|
||||
|
||||
cd $BIN_DIR
|
||||
cmake .. $ARGS $*
|
||||
cd $OLDPWD
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ROOT=$(pwd)
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=$(dirname $ROOT)
|
||||
done
|
||||
|
||||
<<<<<<< HEAD
|
||||
MACHINE=`uname -m`
|
||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
BIN_DIR="build-$MACHINE-$CC-Debug"
|
||||
=======
|
||||
[ -z $BUILD ] && BUILD=Debug ; export BUILD
|
||||
>>>>>>> hotfix-3.4.1
|
||||
|
||||
if [ ! -e $ROOT/$BUILD ]; then
|
||||
echo "cannot find build directory $BUILD in $ROOT. did you run cmake-init?"
|
||||
exit
|
||||
fi
|
||||
|
||||
$ROOT/$BUILD/eressea/test_eressea
|
||||
cd $ROOT
|
||||
[ -e eressea.ini ] || ln -sf conf/eressea.ini
|
||||
<<<<<<< HEAD
|
||||
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests.lua
|
||||
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e2.lua
|
||||
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e3.lua
|
||||
|
||||
=======
|
||||
$ROOT/$BUILD/eressea/eressea -v0 sacripts/run-tests.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua
|
||||
>>>>>>> hotfix-3.4.1
|
||||
cd $OLDWPD
|
|
@ -1,83 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
<<<<<<< HEAD
|
||||
set -e
|
||||
ROOT=`pwd`
|
||||
SUPP=../share/ubuntu-12_04.supp
|
||||
MACHINE=`uname -m`
|
||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
BUILD="$ROOT/build-$MACHINE-$CC-Debug"
|
||||
=======
|
||||
ROOT=`pwd`
|
||||
>>>>>>> hotfix-3.4.1
|
||||
|
||||
inifile() {
|
||||
cd $ROOT
|
||||
if [ ! -e eressea.ini ]; then
|
||||
cp conf/eressea.ini .
|
||||
$BUILD/iniparser/inifile eressea.ini add lua:paths lunit:scripts
|
||||
fi
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
build() {
|
||||
cd $BUILD
|
||||
cmake -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules -DCMAKE_BUILD_TYPE=Debug ..
|
||||
scan-build make
|
||||
}
|
||||
|
||||
test_valgrind_report () {
|
||||
cd $ROOT/tests
|
||||
ln -sf ../scripts/config.lua
|
||||
valgrind --suppressions=$SUPP --error-exitcode=1 $BUILD/eressea/eressea -v0 -t184 ../scripts/reports.lua
|
||||
}
|
||||
|
||||
test_valgrind_turn () {
|
||||
cd $ROOT/tests
|
||||
ln -sf ../scripts/config.lua
|
||||
valgrind --suppressions=$SUPP --error-exitcode=1 $BUILD/eressea/eressea -v0 -t184 ../scripts/run-turn.lua
|
||||
}
|
||||
|
||||
test_unittests() {
|
||||
$BUILD/eressea/test_eressea
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
cd $ROOT/tests
|
||||
rm -rf reports score eressea.log* config.lua data/185.dat datum passwd parteien parteien.full turn
|
||||
}
|
||||
|
||||
test_server() {
|
||||
cd $ROOT
|
||||
inifile
|
||||
$BUILD/eressea/eressea -v0 scripts/run-tests.lua
|
||||
$BUILD/eressea/eressea -v0 scripts/run-tests-e2.lua
|
||||
$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua
|
||||
}
|
||||
# information
|
||||
echo "* base directory: $ROOT"
|
||||
echo "* build directory: $BUILD"
|
||||
echo "* lsb_release:"
|
||||
lsb_release -a
|
||||
echo "* zlib1g-dev package:"
|
||||
dpkg -l zlib1g-dev
|
||||
echo
|
||||
|
||||
# build the code
|
||||
[ -d $BUILD ] || mkdir $BUILD
|
||||
build
|
||||
test_unittests
|
||||
test_server
|
||||
test_valgrind_report
|
||||
test_valgrind_turn
|
||||
|
||||
cleanup
|
||||
=======
|
||||
[ -z $BUILD ] && BUILD=Debug ; export BUILD
|
||||
s/cmake-init
|
||||
s/build
|
||||
cd $ROOT
|
||||
inifile
|
||||
s/runtests
|
||||
>>>>>>> hotfix-3.4.1
|
File diff suppressed because it is too large
Load Diff
|
@ -76,6 +76,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
|
||||
const char *magic_school[MAXMAGIETYP] = {
|
||||
|
|
Loading…
Reference in New Issue