fixing C/C++ CI errors

This commit is contained in:
Matt Hess
2025-12-17 03:28:41 +00:00
parent 79e34fdfbb
commit 27dfd4788b
6 changed files with 14 additions and 14 deletions
+4 -4
View File
@@ -540,20 +540,20 @@ jobs:
mkdir build
cd build
cmake .. -G "${{ matrix.config.vs }}" -DCMAKE_SYSTEM_VERSION="10.0" -DWITH_RANDOMX=${{ matrix.config.rx }} -DWITH_UPNP=${{ matrix.config.upnp }} -DWITH_GRPC=${{ matrix.config.grpc }} -DWITH_TLS=${{ matrix.config.tls }} -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release p2pool.vcxproj
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release p2pool-salvium.vcxproj
- name: Check Windows 7 compatibility
shell: cmd
run: |
call "${{ matrix.config.vspath }}\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
dumpbin /IMPORTS build/Release/p2pool.exe > 1.txt
dumpbin /IMPORTS build/Release/p2pool-salvium.exe > 1.txt
findstr /R /C:"^ *[0-9A-F][0-9A-F]* [a-zA-Z][a-zA-Z0-9]*$" 1.txt > 2.txt
python tests/src/check_win7.py 2.txt
- name: Run RandomX tests
if: matrix.config.rx == 'ON'
run: |
build/Release/p2pool.exe --test
build/Release/p2pool-salvium.exe --test
cd build/external/src/RandomX
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release randomx-tests.vcxproj
Release/randomx-tests.exe
@@ -578,7 +578,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: p2pool-vs-${{ matrix.config.os }}-randomx-${{ matrix.config.rx }}-upnp-${{ matrix.config.upnp }}-grpc-${{ matrix.config.grpc }}-tls-${{ matrix.config.tls }}.exe
path: build/Release/p2pool.exe
path: build/Release/p2pool-salvium.exe
build-macos:
+4
View File
@@ -26,6 +26,10 @@ env:
build: '${{ github.workspace }}/build'
config: 'Release'
permissions:
contents: read
security-events: write
jobs:
analyze:
name: Analyze
+3 -3
View File
@@ -31,7 +31,7 @@ option(DEV_CLANG_TIDY "[Developer only] Compile for clang-tidy" OFF)
option(DEV_TRACK_MEMORY "[Developer only] Track memory allocations" OFF)
option(DEV_DEBUG "[Developer only] Compile a debug build" OFF)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool-salvium)
set(BUILD_TESTING OFF CACHE BOOL "CMake's CTest module")
@@ -424,10 +424,10 @@ if (STATIC_BINARY OR STATIC_LIBS)
endif()
endif()
set(STATIC_LIBS "")
set(STATIC_LIBS "mx25519")
if (WITH_RANDOMX)
set(STATIC_LIBS randomx)
set(STATIC_LIBS ${STATIC_LIBS} randomx)
endif()
if (WITH_UPNP)
-4
View File
@@ -1246,10 +1246,6 @@ int BlockTemplate::create_miner_tx(const MinerData& data, const std::vector<Mine
writeVarint(1, m_minerTx);
// amount_burnt = 20% of total block reward
uint64_t miner_total = 0;
for (size_t i = 0; i < num_outputs; ++i) {
miner_total += m_rewards[i];
}
uint64_t amount_burnt = full_block_reward / 5;
writeVarint(amount_burnt, m_minerTx);
m_poolBlockTemplate->m_amountBurnt = amount_burnt;
+1 -1
View File
@@ -82,7 +82,7 @@ static void debug_hex(const char* label, const uint8_t* data, size_t len)
static constexpr char log_category_prefix[] = "CarrotCrypto ";
char hex[130] = {0};
for (size_t i = 0; i < len && i < 64; ++i) {
sprintf(hex + i*2, "%02x", data[i]);
snprintf(hex + i*2, 3, "%02x", data[i]);
}
LOGINFO(6, label << ": " << static_cast<const char*>(hex));
}
+2 -2
View File
@@ -179,7 +179,7 @@ bool Wallet::decode(const char* address)
}
char hex_buf[32];
snprintf(hex_buf, sizeof(hex_buf), "0x%lx", tag);
snprintf(hex_buf, sizeof(hex_buf), "0x%llx", static_cast<unsigned long long>(tag));
m_prefix = tag;
@@ -211,7 +211,7 @@ bool Wallet::decode(const char* address)
for (int i = 0; i < std::min(data_index, 80); i++) {
sprintf(data_hex + i*2, "%02x", data[i]);
}
sprintf(prefix_hex, "0x%lx", m_prefix);
sprintf(prefix_hex, "0x%llx", static_cast<unsigned long long>(m_prefix));
LOGINFO(6, "decode varint_len=" << varint_len << " data_index=" << data_index << " prefix=" << static_cast<const char*>(prefix_hex));
LOGINFO(6, "decode raw_data: " << static_cast<const char*>(data_hex));
LOGINFO(6, "decode spend: " << static_cast<const char*>(spend_hex));