summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml11
-rwxr-xr-xtools/ci/jobs/validate.sh18
-rwxr-xr-xtools/ci/scripts/init.sh25
3 files changed, 51 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 204b2e5..f271691 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
stages:
- build
+ - test
- success
- failure
@@ -8,12 +9,20 @@ before_script:
# simple builds
-gcc-5:
+.gcc-5:
stage: build
script:
- ./tools/ci/jobs/gcc5.sh --enable-werror
image: debian:unstable
+# tests
+
+"plugin validator":
+ stage: test
+ script:
+ - ./tools/ci/jobs/validate.sh
+ image: debian:unstable
+
# reports
success:
diff --git a/tools/ci/jobs/validate.sh b/tools/ci/jobs/validate.sh
new file mode 100755
index 0000000..5c1c7ab
--- /dev/null
+++ b/tools/ci/jobs/validate.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+export CC=gcc-5
+export CXX=g++-5
+export LOGFILE=gcc5.log
+
+source ./tools/ci/scripts/init.sh
+
+aptget_install git-core ca-certificates \
+ make python
+
+do_init
+clone_tool
+clone_servercode
+cd evol-hercules
+
+make validate
+check_error $?
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index 455673e..c935d31 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -11,8 +11,8 @@ cat /etc/os-release
rm ${ERRFILE}
function do_init {
- $CC --version
- $CXX --version
+ cd ..
+ ln -s evol-hercules server-plugin
}
function aptget_update {
@@ -49,6 +49,19 @@ function aptget_install {
fi
}
+function gitclone {
+ git clone $*
+ if [ "$?" != 0 ]; then
+ sleep 1s
+ git clone $*
+ if [ "$?" != 0 ]; then
+ sleep 3s
+ git clone $*
+ fi
+ fi
+ check_error $?
+}
+
function check_error {
if [ "$1" != 0 ]; then
echo "error $1"
@@ -119,4 +132,12 @@ function run_mplint {
run_check_warnings
}
+function clone_tool {
+ gitclone https://gitlab.com/evol/evol-tools.git tools
+}
+
+function clone_servercode {
+ gitclone https://gitlab.com/evol/hercules.git server-code
+}
+
aptget_update