]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - .gitlab-ci.yml
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / .gitlab-ci.yml
index 933eb4b065b26ea2d0877e11d6e596770b35d138..d638b6e0081c663f1bae59f9fd2e08d341c6f016 100644 (file)
@@ -10,10 +10,11 @@ before_script:
   - export QCC="$PWD/gmqcc/gmqcc"
 
   - ln -s $PWD data/xonotic-data.pk3dir
-  - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
 
-build:
+test_sv_unit:
+  stage: test
   script:
+    - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
     - make
     - while read line; do
         echo $line;
@@ -21,6 +22,23 @@ build:
       done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
     - exit 1
 
+test_sv_game:
+  stage: test
+  script:
+    - wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3
+    - make
+    - EXPECT=44a15d27dcfb0bccddc73284e6d968e7
+    - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
+      | tee /dev/stderr
+      | grep '^:'
+      | grep -v '^:gamestart:'
+      | grep -v '^:anticheat:'
+      | md5sum | awk '{ print $1 }')
+    - echo 'expected:' $EXPECT
+    - echo '  actual:' $HASH
+    - test "$HASH" == "$EXPECT"
+    - exit $?
+
 doxygen:  # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
   stage: deploy
   script: