feat: Upgrade Travis configuration to Ubuntu 16.04; speed up and stabilize build process (#15)

Adjust the Travis configuration to be as close as possible to that of the main repo
This commit is contained in:
Stoabrogga
2019-02-11 10:33:13 +01:00
committed by GitHub
parent f04d7ce58c
commit 6307950ab8
2 changed files with 70 additions and 29 deletions

View File

@@ -1,42 +1,82 @@
sudo: required sudo: required
dist: trusty # (14.04) dist: xenial # (16.04)
# xenial (16.04) is not supported yet # bionic (18.04) is not yet available in travis
language: cpp language: cpp
compiler:
- clang cache: ccache
addons:
apt:
update: true
services:
- mysql
git: git:
depth: 1 depth: 1
matrix:
include:
- os: linux
addons:
apt:
packages:
- clang-3.8
env:
- CCOMPILERC="clang-3.8"
- CCOMPILERCXX="clang++-3.8"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-7
packages:
- clang-7
env:
- CCOMPILERC="clang-7"
- CCOMPILERCXX="clang++-7"
before_install: before_install:
- sudo apt-get -y install build-essential libtool make cmake cmake-data openssl
- sudo apt-get -y install libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev
- git config user.email "travis@build.bot" && git config user.name "Travis CI" - git config user.email "travis@build.bot" && git config user.name "Travis CI"
- git tag -a -m "Travis build" init - git tag -a -m "Travis build" init
install: install:
- cd .. - cd ..
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore - git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
- mv mod-transmog azerothcore/modules - mv mod-transmog azerothcore-wotlk/modules
- cd azerothcore - cd azerothcore-wotlk
- git submodule update --init --recursive
- mysql -uroot -e 'create database test_mysql;' # install OS deps (apt-get)
- cd bin - bash ./acore.sh "install-deps"
- cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=0 -DSCRIPTS=1 -DSERVERS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=check_install # create config file
- cd .. - echo "CCOMPILERC=$CCOMPILERC" >> conf/config.sh
- echo "CCOMPILERCXX=$CCOMPILERCXX" >> conf/config.sh
- echo "MTHREADS=4" >> conf/config.sh
- echo "CWARNINGS=ON" >> conf/config.sh
- echo "CDEBUG=OFF" >> conf/config.sh
- echo "CTYPE=Release" >> conf/config.sh
- echo "CSCRIPTS=ON" >> conf/config.sh
- echo "CSERVERS=ON" >> conf/config.sh
- echo "CTOOLS=ON" >> conf/config.sh
- echo "CSCRIPTPCH=OFF" >> conf/config.sh
- echo "CCOREPCH=OFF" >> conf/config.sh
- echo "CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -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: script:
- $CXX --version # compile
- mysql -uroot < data/sql/create/create_mysql.sql - export CCACHE_CPP2=true
- cat data/sql/base/db_auth/*.sql | mysql -uacore -pacore auth - ccache -s
- cat data/sql/base/db_characters/*.sql | mysql -uacore -pacore characters - timeout 2580 bash ./acore.sh "compiler" "all"
- cat data/sql/base/db_world/*.sql | mysql -uacore -pacore world - ccache -s
- cat data/sql/updates/db_auth/*.sql | mysql -uacore -pacore auth - git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git /home/travis/build/azerothcore/azerothcore-wotlk/env/dist/data
- cat data/sql/updates/db_characters/*.sql | mysql -uacore -pacore characters - cp ./data/travis/worldserver.conf ./env/dist/etc/worldserver.conf
- cat data/sql/updates/db_world/*.sql | mysql -uacore -pacore world - ./env/dist/bin/worldserver --dry-run
- mysql -uroot < data/sql/create/drop_mysql.sql - ./apps/ci-error-check.sh
- cd bin
- make -j 8 -k && make install
- cd check_install/bin

View File

@@ -2,10 +2,11 @@
#define DEF_TRANSMOGRIFICATION_H #define DEF_TRANSMOGRIFICATION_H
#include <vector> #include <vector>
#include "Define.h" #include "Player.h"
#include "ScriptPCH.h"
#include "Language.h"
#include "Config.h" #include "Config.h"
#include "ScriptMgr.h"
#include "ScriptedGossip.h"
#include "GameEventMgr.h"
#define PRESETS // comment this line to disable preset feature totally #define PRESETS // comment this line to disable preset feature totally
#define MAX_OPTIONS 25 // do not alter #define MAX_OPTIONS 25 // do not alter