forked from azerothcore/azerothcore-wotlk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (37 loc) · 1.79 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
sudo: required
dist: xenial # (16.04)
# bionic (18.04) is not yet available in travis
language: cpp
compiler:
- clang
addons:
apt:
update: true
services:
- mysql
git:
depth: 1
before_install:
- git config user.email "[email protected]" && git config user.name "Travis CI"
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd bin/; fi
# import pending sql
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash acore-db-pendings; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd ..; fi
# push changes to git if any
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git fetch --unshallow; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git checkout $TRAVIS_BRANCH; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add -A . && git diff --cached --quiet || git commit -am "Importing pending sql" && git push https://[email protected]/$TRAVIS_REPO_SLUG.git $TRAVIS_BRANCH; fi
install:
# install OS deps (apt-get)
- bash ./acore.sh "install-deps"
# create config file
- echo "CCUSTOMOPTIONS='-DWITH_WARNINGS=1 -DWITH_COREDEBUG=1 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=1 -DSERVERS=1 -DWITH_PERFTOOLS=1 -DENABLE_EXTRA_LOGS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=\"-Werror\" -DCMAKE_CXX_FLAGS=\"-Werror\"';" >> conf/config.sh
- echo "DB_CHARACTERS_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh
- echo "DB_AUTH_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh
- echo "DB_WORLD_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh
# create and import mysql
- mysql -e "SET GLOBAL sql_mode = '';" # this is necessary because of mysql 5.7
- bash ./acore.sh "db-assembler" "import-all"
script:
# compile
- bash ./acore.sh "compiler" "all"