X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=.gitlab-ci.yml;h=d99efeda631d0e8e67bc8eec9a9fd28ddb1d301f;hb=700cb7f6dac496ea3a9c3eaa39d03bc139db3724;hp=8724d06617940c0ed8cf76c67ad0fc94a25cb5a9;hpb=565754a35f9e84a3b8e6eac08635ec27145b369a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8724d0661..d99efeda6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,31 @@ +workflow: + rules: + - if: $CI_COMMIT_MESSAGE =~ /Transifex autosync/ + when: never + - when: always + before_script: - ln -s $PWD data/xonotic-data.pk3dir - - git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc + - git clone --depth=1 --branch=main https://gitlab.com/xonotic/gmqcc.git gmqcc - cd gmqcc && make -j $(nproc) && export QCC="$PWD/gmqcc" - cd .. report_cloc: + before_script: + - ln -s $PWD data/xonotic-data.pk3dir # is this needed? + rules: + - changes: + - qcsrc/**/* stage: test script: - 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_compilation_units: + rules: + - changes: + - qcsrc/**/* stage: test script: - ./qcsrc/tools/compilationunits.sh @@ -29,9 +43,10 @@ test_sv_game: - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache - make - - EXPECT=892e447048e051e51f30cff2affc729a - - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg + - EXPECT=b27cc55a559011432946530e9a594aed + - HASH=$(${ENGINE} -noconfig -nohome +timestamps 1 +exec serverbench.cfg | tee /dev/stderr + | sed -e 's,^\[[^]]*\] ,,' | grep '^:' | grep -v '^:gamestart:' | grep -v '^:anticheat:' @@ -60,6 +75,10 @@ test_sv_unit: # With them added to PREDEFINED, it would take over half an hour to generate the docs and even then # they might not be complete. Doxygen doesn't handle #elif and might not understand some QC definitions. doxygen: # rename to 'pages' when gitlab.com allows pages to exceed 100MiB + before_script: + - ln -s $PWD data/xonotic-data.pk3dir # is this needed? + - apt-get update + - apt-get -y install doxygen graphviz stage: deploy script: - cd qcsrc && doxygen