X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=.gitlab-ci.yml;h=3c4126b01d23bcbf383052bdaaffb6592f85ef32;hb=5f0ef69ea5186e47ffad77949db5c5df2b9ad8b2;hp=b04a579df7ea1048be7fe4c9e19c7f132834596b;hpb=c2800810023930a956fd2ecdb23407edd87cd722;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b04a579df..3c4126b01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,38 +1,36 @@ before_script: - - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces - - cd darkplaces && make sv-debug -j $(nproc) - - cd .. - - export ENGINE="$PWD/darkplaces/darkplaces-dedicated -xonotic" + - ln -s $PWD data/xonotic-data.pk3dir - git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc - - cd gmqcc && make -j $(nproc) + - cd gmqcc && make -j $(nproc) && export QCC="$PWD/gmqcc" - cd .. - - export QCC="$PWD/gmqcc/gmqcc" - - - ln -s $PWD data/xonotic-data.pk3dir -test_compilation_units: +report_cloc: stage: test script: - - ./qcsrc/tools/compilationunits.sh + - cloc --force-lang-def=qcsrc/tools/cloc.txt --sql 1 --sql-project xonotic qcsrc | sqlite3 code.db + - sqlite3 code.db 'select file,nCode from t where nCode > 1000 order by nBlank+nComment+nCode desc' -test_sv_unit: +test_compilation_units: 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; - if [[ $line == "All tests OK" ]]; then exit 0; fi; - done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit) - - exit 1 + - ./qcsrc/tools/compilationunits.sh test_sv_game: stage: test script: + - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces + - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic" + - cd .. + + - mkdir -p data/maps - wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3 + - wget -O data/maps/g-23.mapinfo https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.mapinfo + - wget -O data/maps/g-23.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints + - wget -O data/maps/g-23.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.cache + - wget -O data/maps/g-23.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.hardwired - make - - EXPECT=8573348372f9b9f82183b01598950eb5 + - EXPECT=93decd0a82cf911f02fb5572197db7f3 - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg | tee /dev/stderr | grep '^:' @@ -44,6 +42,21 @@ test_sv_game: - test "$HASH" == "$EXPECT" - exit $? +test_sv_unit: + stage: test + script: + - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces + - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic" + - cd .. + + - 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; + if [[ $line == "All tests OK" ]]; then exit 0; fi; + done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit) + - exit 1 + doxygen: # rename to 'pages' when gitlab.com allows pages to exceed 100MiB stage: deploy script: