From: terencehill Date: Wed, 23 Dec 2020 09:08:52 +0000 (+0100) Subject: Gitlab CI: update and optimize yaml config X-Git-Tag: xonotic-v0.8.5~624 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=07800238e2f88c9bd663e87a1097bf68202f6107;p=xonotic%2Fxonotic-data.pk3dir.git Gitlab CI: update and optimize yaml config * update gmqcc master branch * don't build gmqcc in report_cloc and doxygen * trigger report_cloc and test_compilation_units only if something has changed in the qcsrc folder --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4dd50ea38..4cce7de00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,17 +7,25 @@ workflow: 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 @@ -66,6 +74,8 @@ 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? stage: deploy script: - cd qcsrc && doxygen