summaryrefslogtreecommitdiff
path: root/tools/ci
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-04 04:05:51 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-04 04:05:51 +0300
commit76ad2d74012c408788473c3b495076c96666b27c (patch)
tree001b7fdca2f2a04ac0ce37de33efd2cbaa29692a /tools/ci
parent4242505e3d1f5e44fd402c4266b83fe9429369e0 (diff)
downloadplus-76ad2d74012c408788473c3b495076c96666b27c.tar.gz
plus-76ad2d74012c408788473c3b495076c96666b27c.tar.bz2
plus-76ad2d74012c408788473c3b495076c96666b27c.tar.xz
plus-76ad2d74012c408788473c3b495076c96666b27c.zip
Add pages generation with doxygen docs and git stats.
Pages can be accesed at http://stats.manaplus.org/
Diffstat (limited to 'tools/ci')
-rwxr-xr-xtools/ci/jobs/doxygen.sh13
-rwxr-xr-xtools/ci/jobs/gitstats.sh11
-rwxr-xr-xtools/ci/jobs/pages.sh20
-rwxr-xr-xtools/ci/scripts/retry.sh15
4 files changed, 59 insertions, 0 deletions
diff --git a/tools/ci/jobs/doxygen.sh b/tools/ci/jobs/doxygen.sh
new file mode 100755
index 000000000..a3e7b3a5a
--- /dev/null
+++ b/tools/ci/jobs/doxygen.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+export LOGFILE=doxygen.log
+
+source ./tools/ci/scripts/init.sh
+
+aptget_install doxygen graphviz \
+ 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
+
+doxygen tools/doxygen/doxygen.conf
+check_error $?
diff --git a/tools/ci/jobs/gitstats.sh b/tools/ci/jobs/gitstats.sh
new file mode 100755
index 000000000..a7040bd03
--- /dev/null
+++ b/tools/ci/jobs/gitstats.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+export LOGFILE=gitstats.log
+
+source ./tools/ci/scripts/init.sh
+
+aptget_install python zlib1g git-core gnuplot
+
+tools/ci/scripts/retry.sh git clone https://github.com/hoxu/gitstats.git gitstats
+gitstats/gitstats . stats
+check_error $?
diff --git a/tools/ci/jobs/pages.sh b/tools/ci/jobs/pages.sh
new file mode 100755
index 000000000..2c12253db
--- /dev/null
+++ b/tools/ci/jobs/pages.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+export LOGFILE=pages.log
+
+source ./tools/ci/scripts/init.sh
+
+aptget_install git-core
+
+tools/ci/scripts/retry.sh git clone https://gitlab.com/4144/pagesindexgen.git pagesindexgen
+
+mkdir -p public/docs
+mkdir -p public/stats
+
+cd pagesindexgen
+./pagesindexgen.py ../public
+
+cd ..
+cp -r doxygen/html/* public/docs
+cp -r stats/* public/stats
+
diff --git a/tools/ci/scripts/retry.sh b/tools/ci/scripts/retry.sh
new file mode 100755
index 000000000..b54c3b074
--- /dev/null
+++ b/tools/ci/scripts/retry.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+n=0
+
+while true; do
+ $*
+ if [ "$?" == 0 ]; then
+ exit 0
+ fi
+ if [[ $n -ge 5 ]]; then
+ exit -1
+ fi
+ sleep 5s
+ n=$((n+1))
+done