mirror of
https://github.com/telegramcores/mod-premium.git
synced 2026-01-13 00:58:36 +00:00
feat(CI): Travis integration (#13)
This commit is contained in:
102
.travis.yml
102
.travis.yml
@@ -1,42 +1,76 @@
|
|||||||
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: 10
|
||||||
|
|
||||||
before_install:
|
stages:
|
||||||
- sudo apt-get -y install build-essential libtool make cmake cmake-data openssl
|
- prepare_cache
|
||||||
- sudo apt-get -y install libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev
|
- run
|
||||||
- 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-duelreset azerothcore/modules
|
|
||||||
- cd azerothcore
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
|
|
||||||
- mysql -uroot -e 'create database test_mysql;'
|
jobs:
|
||||||
- cd bin
|
include:
|
||||||
- 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
|
- stage: prepare_cache
|
||||||
- cd ..
|
env: TRAVIS_BUILD_ID="1"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh OFF
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
script:
|
- stage: run
|
||||||
- $CXX --version
|
env: TRAVIS_BUILD_ID="1"
|
||||||
- mysql -uroot < data/sql/create/create_mysql.sql
|
before_install:
|
||||||
- cat data/sql/base/db_auth/*.sql | mysql -uacore -pacore auth
|
- cd ..
|
||||||
- cat data/sql/base/db_characters/*.sql | mysql -uacore -pacore characters
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
- cat data/sql/base/db_world/*.sql | mysql -uacore -pacore world
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
- cat data/sql/updates/db_auth/*.sql | mysql -uacore -pacore auth
|
- cd azerothcore-wotlk
|
||||||
- cat data/sql/updates/db_characters/*.sql | mysql -uacore -pacore characters
|
- source ./apps/ci/ci-before_install.sh
|
||||||
- cat data/sql/updates/db_world/*.sql | mysql -uacore -pacore world
|
install:
|
||||||
- mysql -uroot < data/sql/create/drop_mysql.sql
|
- source ./apps/ci/ci-install.sh ON
|
||||||
- cd bin
|
- source ./apps/ci/ci-import-db.sh
|
||||||
- make -j 8 -k && make install
|
- mysql -u root world_$DB_RND_NAME <modules/$(basename "$TRAVIS_BUILD_DIR")/sql/example_item_9017.sql
|
||||||
- cd check_install/bin
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
- source ./apps/ci/ci-worldserver-dry-run.sh
|
||||||
|
|
||||||
|
- stage: prepare_cache
|
||||||
|
env: TRAVIS_BUILD_ID="2"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh OFF
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
|
- stage: run
|
||||||
|
env: TRAVIS_BUILD_ID="2"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh ON
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Premium Account
|
# Premium Account
|
||||||
|
|
||||||
- Latest Premium Account build status with azerothcore: [](https://travis-ci.org/azerothcore/mod-duelreset)
|
- Latest Premium Account build status with azerothcore: [](https://travis-ci.org/azerothcore/mod-premium)
|
||||||
|
|
||||||
This is a module for [AzerothCore](http://www.azerothcore.org) that adds Premium account features to players.
|
This is a module for [AzerothCore](http://www.azerothcore.org) that adds Premium account features to players.
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public:
|
|||||||
return false; // Cast the spell on use normally
|
return false; // Cast the spell on use normally
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnGossipSelect(Player* player, Item* item, uint32 /*sender*/, uint32 action)
|
void OnGossipSelect(Player* player, Item* item, uint32 /*sender*/, uint32 action) override
|
||||||
{
|
{
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
@@ -318,7 +318,7 @@ public:
|
|||||||
npc->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, player->GetFollowAngle());
|
npc->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, player->GetFollowAngle());
|
||||||
npc->setFaction(player->getFaction());
|
npc->setFaction(player->getFaction());
|
||||||
|
|
||||||
if (salute && !salute[0] == '\0')
|
if (salute && !(salute[0] == '\0'))
|
||||||
npc->MonsterWhisper(salute, player, false);
|
npc->MonsterWhisper(salute, player, false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user