mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(CI): add extra_logs to build matrix and update warden ByteArrayToHexStr (#5102)
This commit is contained in:
14
.github/workflows/core_build.yml
vendored
14
.github/workflows/core_build.yml
vendored
@@ -15,30 +15,42 @@ jobs:
|
|||||||
os: [ubuntu-20.04]
|
os: [ubuntu-20.04]
|
||||||
compiler: [clang]
|
compiler: [clang]
|
||||||
modules: [with, without]
|
modules: [with, without]
|
||||||
|
extra_logs: [false]
|
||||||
# we can include specific combinations here
|
# we can include specific combinations here
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
compiler: clang11
|
compiler: clang11
|
||||||
modules: without
|
modules: without
|
||||||
|
extra_logs: true
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
compiler: clang11
|
||||||
|
modules: without
|
||||||
|
extra_logs: false
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
compiler: clang9
|
compiler: clang9
|
||||||
modules: without
|
modules: without
|
||||||
|
extra_logs: false
|
||||||
- os: ubuntu-18.04
|
- os: ubuntu-18.04
|
||||||
compiler: clang # default in 18.04 is clang 6
|
compiler: clang # default in 18.04 is clang 6
|
||||||
modules: without
|
modules: without
|
||||||
|
extra_logs: false
|
||||||
- os: ubuntu-18.04
|
- os: ubuntu-18.04
|
||||||
compiler: gcc8
|
compiler: gcc8
|
||||||
modules: without
|
modules: without
|
||||||
|
extra_logs: false
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
compiler: gcc # default in 20.04 is gcc 9
|
compiler: gcc # default in 20.04 is gcc 9
|
||||||
modules: without
|
modules: without
|
||||||
|
extra_logs: false
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
compiler: gcc10
|
compiler: gcc10
|
||||||
modules: without
|
modules: without
|
||||||
|
extra_logs: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules
|
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules-extra_logs-${{ matrix.extra_logs }}
|
||||||
env:
|
env:
|
||||||
COMPILER: ${{ matrix.compiler }}
|
COMPILER: ${{ matrix.compiler }}
|
||||||
|
EXTRA_LOGS: ${{ matrix.extra_logs }}
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -76,3 +76,9 @@ case $COMPILER in
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [[ $EXTRA_LOGS ]]; then
|
||||||
|
echo "CEXTRA_LOGS=1" >> ./conf/config.sh
|
||||||
|
else
|
||||||
|
echo "CEXTRA_LOGS=0" >> ./conf/config.sh
|
||||||
|
fi
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ function comp_configure() {
|
|||||||
-DSCRIPTS=$CSCRIPTS \
|
-DSCRIPTS=$CSCRIPTS \
|
||||||
-DBUILD_TESTING=$CBUILD_TESTING \
|
-DBUILD_TESTING=$CBUILD_TESTING \
|
||||||
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
|
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
|
||||||
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
|
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX -DENABLE_EXTRA_LOGS=$CEXTRA_LOGS "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
|
||||||
|
|
||||||
cd $CWD
|
cd $CWD
|
||||||
|
|
||||||
|
|||||||
2
conf/dist/config.sh
vendored
2
conf/dist/config.sh
vendored
@@ -56,6 +56,8 @@ CTOOLS=OFF
|
|||||||
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
|
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
|
||||||
CSCRIPTPCH=ON
|
CSCRIPTPCH=ON
|
||||||
CCOREPCH=ON
|
CCOREPCH=ON
|
||||||
|
# enable/disable extra logs
|
||||||
|
CEXTRA_LOGS=0
|
||||||
|
|
||||||
# Skip specific modules from compilation (cmake reconfigure needed)
|
# Skip specific modules from compilation (cmake reconfigure needed)
|
||||||
# use semicolon ; to separate modules
|
# use semicolon ; to separate modules
|
||||||
|
|||||||
@@ -48,17 +48,17 @@ void WardenMac::Init(WorldSession* pClient, SessionKey const& K)
|
|||||||
_outputCrypto.Init(_outputKey);
|
_outputCrypto.Init(_outputKey);
|
||||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", pClient->GetAccountId());
|
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", pClient->GetAccountId());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey, false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey, false ).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
|
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_module = GetModuleForClient();
|
_module = GetModuleForClient();
|
||||||
|
|
||||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key, false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id, false).c_str());
|
||||||
#endif
|
#endif
|
||||||
RequestModule();
|
RequestModule();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,17 +105,17 @@ void WardenWin::Init(WorldSession* session, SessionKey const& k)
|
|||||||
_outputCrypto.Init(_outputKey);
|
_outputCrypto.Init(_outputKey);
|
||||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", session->GetAccountId());
|
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", session->GetAccountId());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey, false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey,false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
|
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_module = GetModuleForClient();
|
_module = GetModuleForClient();
|
||||||
|
|
||||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key, false).c_str());
|
||||||
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id).c_str());
|
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id, false).c_str());
|
||||||
#endif
|
#endif
|
||||||
RequestModule();
|
RequestModule();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user