mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
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:
92
.travis.yml
92
.travis.yml
@@ -1,42 +1,82 @@
|
||||
sudo: required
|
||||
dist: trusty # (14.04)
|
||||
# xenial (16.04) is not supported yet
|
||||
dist: xenial # (16.04)
|
||||
# bionic (18.04) is not yet available in travis
|
||||
|
||||
language: cpp
|
||||
compiler:
|
||||
- clang
|
||||
|
||||
cache: ccache
|
||||
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
git:
|
||||
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:
|
||||
- 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 tag -a -m "Travis build" init
|
||||
|
||||
install:
|
||||
- cd ..
|
||||
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore
|
||||
- mv mod-transmog azerothcore/modules
|
||||
- cd azerothcore
|
||||
- git submodule update --init --recursive
|
||||
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||
- mv mod-transmog azerothcore-wotlk/modules
|
||||
- cd azerothcore-wotlk
|
||||
|
||||
- mysql -uroot -e 'create database test_mysql;'
|
||||
- cd bin
|
||||
- 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
|
||||
- cd ..
|
||||
# install OS deps (apt-get)
|
||||
- bash ./acore.sh "install-deps"
|
||||
# create config file
|
||||
- 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:
|
||||
- $CXX --version
|
||||
- mysql -uroot < data/sql/create/create_mysql.sql
|
||||
- cat data/sql/base/db_auth/*.sql | mysql -uacore -pacore auth
|
||||
- cat data/sql/base/db_characters/*.sql | mysql -uacore -pacore characters
|
||||
- cat data/sql/base/db_world/*.sql | mysql -uacore -pacore world
|
||||
- cat data/sql/updates/db_auth/*.sql | mysql -uacore -pacore auth
|
||||
- cat data/sql/updates/db_characters/*.sql | mysql -uacore -pacore characters
|
||||
- cat data/sql/updates/db_world/*.sql | mysql -uacore -pacore world
|
||||
- mysql -uroot < data/sql/create/drop_mysql.sql
|
||||
- cd bin
|
||||
- make -j 8 -k && make install
|
||||
- cd check_install/bin
|
||||
# compile
|
||||
- export CCACHE_CPP2=true
|
||||
- ccache -s
|
||||
- timeout 2580 bash ./acore.sh "compiler" "all"
|
||||
- ccache -s
|
||||
- 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
|
||||
- cp ./data/travis/worldserver.conf ./env/dist/etc/worldserver.conf
|
||||
- ./env/dist/bin/worldserver --dry-run
|
||||
- ./apps/ci-error-check.sh
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
#define DEF_TRANSMOGRIFICATION_H
|
||||
|
||||
#include <vector>
|
||||
#include "Define.h"
|
||||
#include "ScriptPCH.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "Config.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "GameEventMgr.h"
|
||||
|
||||
#define PRESETS // comment this line to disable preset feature totally
|
||||
#define MAX_OPTIONS 25 // do not alter
|
||||
|
||||
Reference in New Issue
Block a user