3 - if: '$CI_COMMIT_MESSAGE == "Transifex autosync"'
7 - ln -s $PWD data/xonotic-data.pk3dir
9 - git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc
10 - cd gmqcc && make -j $(nproc) && export QCC="$PWD/gmqcc"
16 - cloc --force-lang-def=qcsrc/tools/cloc.txt --sql 1 --sql-project xonotic qcsrc | sqlite3 code.db
17 - sqlite3 code.db 'select file,nCode from t where nCode > 1000 order by nBlank+nComment+nCode desc'
19 test_compilation_units:
22 - ./qcsrc/tools/compilationunits.sh
27 - git clone --depth=1 --branch=div0-stable https://gitlab.com/xonotic/darkplaces.git darkplaces
28 - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic"
32 - wget -O data/stormkeep.pk3 http://beta.xonotic.org/autobuild-bsp/latest/stormkeep.pk3
33 - wget -O data/maps/stormkeep.mapinfo https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.mapinfo
34 - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
35 - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
37 - EXPECT=49e05085eef413931c74d7c82666b1f4
38 - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
41 | grep -v '^:gamestart:'
42 | grep -v '^:anticheat:'
43 | md5sum | awk '{ print $1 }')
44 - echo 'expected:' $EXPECT
45 - echo ' actual:' $HASH
46 - test "$HASH" == "$EXPECT"
52 - git clone --depth=1 --branch=div0-stable https://gitlab.com/xonotic/darkplaces.git darkplaces
53 - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic"
56 - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
60 if [[ $line == "All tests OK" ]]; then exit 0; fi;
61 done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
64 # NOTE: The generated docs are incomplete - they don't contain code behind SVQC CSQC MENUQC GAMEQC ifdefs.
65 # With them added to PREDEFINED, it would take over half an hour to generate the docs and even then
66 # they might not be complete. Doxygen doesn't handle #elif and might not understand some QC definitions.
67 doxygen: # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
72 - for i in {0..0}; do eval $(printf "echo \$id_rsa_%02d\n" $i) >> ~/.ssh/id_rsa_base64; done
73 - base64 --decode ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
74 - chmod 600 ~/.ssh/id_rsa
75 - echo -e "Host *\n\tStrictHostKeyChecking no\n\tLogLevel ERROR\n" >> ~/.ssh/config
76 - git config --global user.name "Gitlab CI"
77 - git config --global user.email "<>"
78 - git clone --single-branch --depth 1 ${DEPLOY_HOST}:${DEPLOY_REPO} ~/deploy_
79 - mkdir ~/deploy && mv ~/deploy_/.git ~/deploy && rm -r ~/deploy_
80 - cp -r ../public/* ~/deploy
81 - cd ~/deploy && git add -A . && git commit -m "Deploy ${CI_BUILD_REF}" && git push origin gh-pages