diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-28 00:02:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-28 00:04:40 +0300 |
commit | ee9d33fcb7ca31920ff7b7e019fe3707f0475907 (patch) | |
tree | 2b473a315ff20fd3fafd78eedb68645e0ec66f3e /tools | |
parent | 6fd8ab7369fcd4e119b6ff624ccadb3bcc542411 (diff) | |
download | evol-hercules-ee9d33fcb7ca31920ff7b7e019fe3707f0475907.tar.gz evol-hercules-ee9d33fcb7ca31920ff7b7e019fe3707f0475907.tar.bz2 evol-hercules-ee9d33fcb7ca31920ff7b7e019fe3707f0475907.tar.xz evol-hercules-ee9d33fcb7ca31920ff7b7e019fe3707f0475907.zip |
Add simple gcc 5 build.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci/jobs/gcc5.sh | 16 | ||||
-rwxr-xr-x | tools/ci/scripts/init.sh | 122 |
2 files changed, 138 insertions, 0 deletions
diff --git a/tools/ci/jobs/gcc5.sh b/tools/ci/jobs/gcc5.sh new file mode 100755 index 0000000..d095016 --- /dev/null +++ b/tools/ci/jobs/gcc5.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5.log + +source ./tools/ci/scripts/init.sh + +#aptget_install gcc-5 g++-5 \ +# make autoconf automake autopoint gettext libphysfs-dev \ +# libxml2-dev libcurl4-gnutls-dev libpng-dev \ +# libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +do_init +run_configure $* +run_make diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh new file mode 100755 index 0000000..455673e --- /dev/null +++ b/tools/ci/scripts/init.sh @@ -0,0 +1,122 @@ +#!/bin/bash + +pwd +mkdir logs + +export dir=$(pwd) +export ERRFILE=${dir}/logs/${LOGFILE} + +cat /etc/os-release + +rm ${ERRFILE} + +function do_init { + $CC --version + $CXX --version +} + +function aptget_update { + echo "apt-get update" + apt-get update + if [ "$?" != 0 ]; then + sleep 1s + apt-get update + if [ "$?" != 0 ]; then + sleep 2s + apt-get update + if [ "$?" != 0 ]; then + sleep 5s + apt-get update + fi + fi + fi +} + +function aptget_install { + echo "apt-get -y -qq install $*" + apt-get -y -qq install $* + if [ "$?" != 0 ]; then + sleep 1s + apt-get -y -qq install $* + if [ "$?" != 0 ]; then + sleep 2s + if [ "$?" != 0 ]; then + sleep 5s + apt-get -y -qq install $* + fi + apt-get -y -qq install $* + fi + fi +} + +function check_error { + if [ "$1" != 0 ]; then + echo "error $1" + exit $result + fi +} + +function run_configure_simple { + echo "autoreconf -i" + autoreconf -i + check_error $? + mkdir build + cd build + echo "../configure $*" + ../configure $* + check_error $? +} + +function run_configure { + run_configure_simple $* +} + +function run_make { + echo "make -j2 V=0 $*" + make -j2 V=0 $* + check_error $? +} + +function run_check_warnings { + DATA=$(cat $ERRFILE) + if [ "$DATA" != "" ]; + then + cat $ERRFILE + exit 1 + fi +} + +function run_h { + rm $ERRFILE + echo "$CC -c -x c++ $* $includes */*/*/*.h */*/*.h */*.h *.h" + $CC -c -x c++ $* $includes */*/*/*.h */*/*.h */*.h *.h 2>$ERRFILE + DATA=$(cat $ERRFILE) + if [ "$DATA" != "" ]; + then + cat $ERRFILE + exit 1 + fi +} + +function run_tarball { + rm $ERRFILE + echo "make dist-xz" + make dist-xz 2>$ERRFILE + check_error $? + + mkdir $1 + cd $1 + echo "tar xf ../*.tar.xz" + tar xf ../*.tar.xz + cd manaplus* +} + +function run_mplint { + rm $ERRFILE + echo "mplint/src/mplint $*" + mplint/src/mplint $* >$ERRFILE + check_error $? + run_check_warnings +} + +aptget_update |