forked from OregonCore/OregonCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (66 loc) · 2.24 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: cpp
compiler:
- clang
# whitelisted packages can be obtained quickly without downloading
# doxygen is out of date, tho so we download its binaries
addons:
mariadb: '10.0'
apt:
packages:
- cmake
- build-essential
- cppcheck
- git
- make
- binutils-dev
- openssl
- libssl-dev
- zlib1g-dev
- zip
- unzip
- php5-cli
- php5-mysql
git:
depth: 1
before_install:
- sudo apt-get -qq install mariadb-client libace-dev
- if [[ $TRAVIS_PULL_REQUEST == 'true' ]]; then exit; fi
- curl -o doxygen.tar.gz https://oregon-core.net/travis/doxygen.tar.gz
- tar xzf doxygen.tar.gz
- sudo install -m 755 doxygen /usr/bin
- sudo install -m 755 doxyindexer /usr/bin
install:
- mkdir build
- cd build
- cmake .. -DSERVERS=1 -DTOOLS=1 -DSCRIPTS=1 -DWITH_DOCS=1 -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0
# we have 1.5 cpu so 2 jobs at a time are sufficient
- make -j2
# apply all updates to db and catch possible errors
script:
- cd $TRAVIS_BUILD_DIR/sql
- mysql -u root --password='' < create_mysql.sql
- mysql -u oregon -poregon realmd < realmd.sql
- mysql -u oregon -poregon characters < characters.sql
- mysql -u oregon -poregon world < world.sql
- curl --retry 3 -o OregonDatabase.zip https://oregon-core.net/travis/OregonDatabase.zip
- unzip OregonDatabase.zip
- mysql -u oregon -poregon world < OregonDatabase.sql
- cat updates/realmd/*.sql | mysql -u oregon -poregon realmd
- cat updates/characters/*.sql | mysql -u oregon -poregon characters
- cat updates/world/*.sql | mysql -u oregon -poregon world
- curl --retry 3 -o documentation.sql https://oregon-core.net/travis/documentation.sql
# generate and deploy doxygen documentation now
after_success:
- if [[ $TRAVIS_PULL_REQUEST == 'true' ]]; then exit; fi
- echo 'create database documentation' | mysql -u root --password=''
- mysql -u root --password='' documentation < documentation.sql
- cd $TRAVIS_BUILD_DIR/build
- make docs 2> /dev/null
- cd ../doc/doxygen/Database
- php generator.php
- cd ../../../build
- make docs 2> /dev/null
- cd doc/html
- zip -q -r -9 html.zip ./*
- export URL="https://oregon-core.net/Deploy?secret=$TRAVIS_SECRET"
- curl -F '[email protected]' $URL