]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - .gitlab-ci.yml
Tweak doxygen commit messages
[xonotic/xonotic-data.pk3dir.git] / .gitlab-ci.yml
1 before_script:
2   - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces
3   - cd darkplaces && make sv-debug -j $(nproc)
4   - cd ..
5   - export ENGINE="$PWD/darkplaces/darkplaces-dedicated -xonotic"
6
7   - git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc
8   - cd gmqcc && make -j $(nproc)
9   - cd ..
10   - export QCC="$PWD/gmqcc/gmqcc"
11
12   - ln -s $PWD data/xonotic-data.pk3dir
13
14 test_compilation_units:
15   stage: test
16   script:
17     - ./qcsrc/tools/compilationunits.sh
18
19 test_sv_unit:
20   stage: test
21   script:
22     - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
23     - make
24     - while read line; do
25         echo $line;
26         if [[ $line == "All tests OK" ]]; then exit 0; fi;
27       done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
28     - exit 1
29
30 test_sv_game:
31   stage: test
32   script:
33     - wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3
34     - make
35     - EXPECT=ecfdcf30ddbdba504cb67a5c718b7b6c
36     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
37       | tee /dev/stderr
38       | grep '^:'
39       | grep -v '^:gamestart:'
40       | grep -v '^:anticheat:'
41       | md5sum | awk '{ print $1 }')
42     - echo 'expected:' $EXPECT
43     - echo '  actual:' $HASH
44     - test "$HASH" == "$EXPECT"
45     - exit $?
46
47 doxygen:  # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
48   stage: deploy
49   script:
50     - cd qcsrc && doxygen
51     - mv html ../public
52     - for i in {0..0}; do eval $(printf "echo \$id_rsa_%02d\n" $i) >> ~/.ssh/id_rsa_base64; done
53     - base64 --decode ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
54     - chmod 600 ~/.ssh/id_rsa
55     - echo -e "Host *\n\tStrictHostKeyChecking no\n\tLogLevel ERROR\n" >> ~/.ssh/config
56     - git config --global user.name "Gitlab CI"
57     - git config --global user.email "<>"
58     - git clone --single-branch --depth 1 ${DEPLOY_HOST}:${DEPLOY_REPO} ~/deploy_
59     - mkdir ~/deploy && mv ~/deploy_/.git ~/deploy && rm -r ~/deploy_
60     - cp -r ../public/* ~/deploy
61     - cd ~/deploy && git add -A . && git commit -m "Deploy ${CI_BUILD_REF}" && git push origin gh-pages
62   artifacts:
63     paths:
64       - public
65   only:
66     - master