ported double tracking from TC
This commit is contained in:
11
apps/ci/ci-compile.sh
Normal file
11
apps/ci/ci-compile.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "compile core"
|
||||
export CCACHE_CPP2=true
|
||||
export CCACHE_MAXSIZE='500MB'
|
||||
export CCACHE_COMPRESS=1
|
||||
ccache -s
|
||||
./acore.sh "compiler" "all"
|
||||
ccache -s
|
||||
17
apps/ci/ci-error-check.sh
Normal file
17
apps/ci/ci-error-check.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DB_ERRORS_FILE="./env/dist/bin/DBErrors.log";
|
||||
|
||||
if [[ ! -f ${DB_ERRORS_FILE} ]]; then
|
||||
echo "File ${DB_ERRORS_FILE} not found!";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -s ${DB_ERRORS_FILE} ]]; then
|
||||
printf "The DBErrors.log file contains startup errors:\n\n";
|
||||
cat ${DB_ERRORS_FILE};
|
||||
printf "\nPlease solve the startup errors listed above!\n";
|
||||
exit 1;
|
||||
else
|
||||
echo "No startup errors found in DBErrors.log, good job!";
|
||||
fi
|
||||
14
apps/ci/ci-import-db.sh
Normal file
14
apps/ci/ci-import-db.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo systemctl start mysql
|
||||
./acore.sh "db-assembler" "import-all"
|
||||
|
||||
if [ -s modules/mod-premium/sql/example_item_9017.sql ]
|
||||
then
|
||||
echo "Import custom module item..."
|
||||
# if the premium module is available insert the example item or else the worldserver dry run will fail
|
||||
mysql -uroot -proot acore_world < modules/mod-premium/sql/example_item_9017.sql
|
||||
echo "Done!"
|
||||
fi
|
||||
11
apps/ci/ci-install-modules.sh
Normal file
11
apps/ci/ci-install-modules.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "install modules"
|
||||
git clone --depth=1 --branch=master --recursive https://github.com/azerothcore/mod-eluna-lua-engine.git modules/mod-eluna-lua-engine
|
||||
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-autobalance.git modules/mod-autobalance
|
||||
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-transmog.git modules/mod-transmog
|
||||
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-npc-beastmaster.git modules/mod-npc-beastmaster
|
||||
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-duel-reset.git modules/mod-duel-reset
|
||||
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-premium modules/mod-premium
|
||||
58
apps/ci/ci-install.sh
Normal file
58
apps/ci/ci-install.sh
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cat >>conf/config.sh <<CONFIG_SH
|
||||
MTHREADS=$(($(grep -c ^processor /proc/cpuinfo) + 2))
|
||||
CWARNINGS=ON
|
||||
CDEBUG=OFF
|
||||
CTYPE=Release
|
||||
CSCRIPTS=ON
|
||||
CUNIT_TESTS=ON
|
||||
CSERVERS=ON
|
||||
CTOOLS=ON
|
||||
CSCRIPTPCH=OFF
|
||||
CCOREPCH=OFF
|
||||
CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
|
||||
DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||
DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||
CONFIG_SH
|
||||
|
||||
time sudo apt-get update -y
|
||||
# time sudo apt-get upgrade -y
|
||||
time sudo apt-get install -y git lsb-release sudo ccache
|
||||
time ./acore.sh install-deps
|
||||
|
||||
case $COMPILER in
|
||||
|
||||
# this is in order to use the "default" clang version of the OS, without forcing a specific version
|
||||
"clang" )
|
||||
time sudo apt-get install -y clang
|
||||
echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh
|
||||
echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh
|
||||
;;
|
||||
|
||||
"clang6" )
|
||||
time sudo apt-get install -y clang-6.0
|
||||
echo "CCOMPILERC=\"clang-6.0\"" >> ./conf/config.sh
|
||||
echo "CCOMPILERCXX=\"clang++-6.0\"" >> ./conf/config.sh
|
||||
;;
|
||||
|
||||
"clang9" )
|
||||
time sudo apt-get install -y clang-9
|
||||
echo "CCOMPILERC=\"clang-9\"" >> ./conf/config.sh
|
||||
echo "CCOMPILERCXX=\"clang++-9\"" >> ./conf/config.sh
|
||||
;;
|
||||
|
||||
"clang10" )
|
||||
time sudo apt-get install -y clang-10
|
||||
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
|
||||
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown compiler $COMPILER"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
3
apps/ci/ci-run-unit-tests.sh
Normal file
3
apps/ci/ci-run-unit-tests.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
time var/build/obj/src/test/unit_tests
|
||||
11
apps/ci/ci-worldserver-dry-run.sh
Normal file
11
apps/ci/ci-worldserver-dry-run.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "[worldserver]" >> ./env/dist/etc/worldserver.conf
|
||||
echo "DataDir = \"../data/\"" >> ./env/dist/etc/worldserver.conf
|
||||
echo "LoginDatabaseInfo = \"localhost;3306;root;root;acore_auth\"" >> ./env/dist/etc/worldserver.conf
|
||||
echo "WorldDatabaseInfo = \"localhost;3306;root;root;acore_world\"" >> ./env/dist/etc/worldserver.conf
|
||||
echo "CharacterDatabaseInfo = \"localhost;3306;root;root;acore_characters\"" >> ./env/dist/etc/worldserver.conf
|
||||
git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git ./env/dist/data
|
||||
(cd ./env/dist/bin/ && timeout 5m ./worldserver --dry-run)
|
||||
11
apps/ci/docker/.env.dist
Normal file
11
apps/ci/docker/.env.dist
Normal file
@@ -0,0 +1,11 @@
|
||||
WORLDSERVER_DATA=./docker/worldserver/data
|
||||
WORLDSERVER_ETC=./docker/worldserver/etc
|
||||
WORLDSERVER_LOGS=./docker/worldserver/logs
|
||||
|
||||
AUTHSERVER_ETC=./docker/authserver/etc
|
||||
AUTHSERVER_LOGS=./docker/authserver/logs
|
||||
|
||||
WORLD_EXTERNAL_PORT=8085
|
||||
AUTH_EXTERNAL_PORT=3724
|
||||
DB_EXTERNAL_PORT=9000
|
||||
DB_ROOT_PASSWORD=password
|
||||
3
apps/ci/docker/ci-docker-config.sh
Normal file
3
apps/ci/docker/ci-docker-config.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp apps/ci/docker/.env.dist .env
|
||||
30
apps/ci/mac/ci-compile.sh
Normal file
30
apps/ci/mac/ci-compile.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export CCACHE_CPP2=true
|
||||
export CCACHE_MAXSIZE='2G'
|
||||
export CCACHE_COMPRESS=1
|
||||
ccache -s
|
||||
|
||||
mkdir var/build/obj && cd var/build/obj;
|
||||
|
||||
time cmake ../../../ \
|
||||
-DTOOLS=1 \
|
||||
-DUNIT_TESTS=1 \
|
||||
-DSCRIPTS=1 \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
|
||||
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib \
|
||||
-DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include \
|
||||
-DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib \
|
||||
-DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include \
|
||||
-DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl/lib/libssl.dylib \
|
||||
-DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl/lib/libcrypto.dylib \
|
||||
-DCMAKE_C_FLAGS="-Werror" \
|
||||
-DCMAKE_CXX_FLAGS="-Werror" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
;
|
||||
|
||||
time make -j $(($(sysctl -n hw.ncpu ) + 2))
|
||||
|
||||
ccache -s
|
||||
4
apps/ci/mac/ci-install.sh
Normal file
4
apps/ci/mac/ci-install.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
time brew update
|
||||
time brew install openssl readline ace coreutils bash bash-completion mysql ccache
|
||||
Reference in New Issue
Block a user