mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 20:44:17 +08:00
feat(CI): add extra_logs to build matrix and update warden ByteArrayToHexStr (#5102)
This commit is contained in:
parent
b9ae587b6b
commit
81301c67d9
14
.github/workflows/core_build.yml
vendored
14
.github/workflows/core_build.yml
vendored
@ -15,30 +15,42 @@ jobs:
|
||||
os: [ubuntu-20.04]
|
||||
compiler: [clang]
|
||||
modules: [with, without]
|
||||
extra_logs: [false]
|
||||
# we can include specific combinations here
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
compiler: clang11
|
||||
modules: without
|
||||
extra_logs: true
|
||||
- os: ubuntu-20.04
|
||||
compiler: clang11
|
||||
modules: without
|
||||
extra_logs: false
|
||||
- os: ubuntu-20.04
|
||||
compiler: clang9
|
||||
modules: without
|
||||
extra_logs: false
|
||||
- os: ubuntu-18.04
|
||||
compiler: clang # default in 18.04 is clang 6
|
||||
modules: without
|
||||
extra_logs: false
|
||||
- os: ubuntu-18.04
|
||||
compiler: gcc8
|
||||
modules: without
|
||||
extra_logs: false
|
||||
- os: ubuntu-20.04
|
||||
compiler: gcc # default in 20.04 is gcc 9
|
||||
modules: without
|
||||
extra_logs: false
|
||||
- os: ubuntu-20.04
|
||||
compiler: gcc10
|
||||
modules: without
|
||||
extra_logs: false
|
||||
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:
|
||||
COMPILER: ${{ matrix.compiler }}
|
||||
EXTRA_LOGS: ${{ matrix.extra_logs }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -76,3 +76,9 @@ case $COMPILER in
|
||||
exit 1
|
||||
;;
|
||||
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 \
|
||||
-DBUILD_TESTING=$CBUILD_TESTING \
|
||||
-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
|
||||
|
||||
|
||||
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 )
|
||||
CSCRIPTPCH=ON
|
||||
CCOREPCH=ON
|
||||
# enable/disable extra logs
|
||||
CEXTRA_LOGS=0
|
||||
|
||||
# Skip specific modules from compilation (cmake reconfigure needed)
|
||||
# use semicolon ; to separate modules
|
||||
|
||||
@ -48,17 +48,17 @@ void WardenMac::Init(WorldSession* pClient, SessionKey const& K)
|
||||
_outputCrypto.Init(_outputKey);
|
||||
#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, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed).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, false ).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
|
||||
#endif
|
||||
|
||||
_module = GetModuleForClient();
|
||||
|
||||
#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 ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id).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, false).c_str());
|
||||
#endif
|
||||
RequestModule();
|
||||
}
|
||||
|
||||
@ -105,17 +105,17 @@ void WardenWin::Init(WorldSession* session, SessionKey const& k)
|
||||
_outputCrypto.Init(_outputKey);
|
||||
#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, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed).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,false).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
|
||||
#endif
|
||||
|
||||
_module = GetModuleForClient();
|
||||
|
||||
#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 ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id).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, false).c_str());
|
||||
#endif
|
||||
RequestModule();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user