Fixed CI errors

This commit is contained in:
SChernykh 2024-02-11 10:52:50 +01:00
parent 0801d607a1
commit 6263c0bbda
8 changed files with 26 additions and 15 deletions

View file

@ -12,7 +12,7 @@ on:
jobs: jobs:
build-alpine-static: build-alpine-static:
timeout-minutes: 75 timeout-minutes: 120
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
@ -243,7 +243,7 @@ jobs:
build-ubuntu-aarch64: build-ubuntu-aarch64:
timeout-minutes: 15 timeout-minutes: 60
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.config.os }}
strategy: strategy:
@ -466,7 +466,7 @@ jobs:
build-macos: build-macos:
timeout-minutes: 20 timeout-minutes: 60
runs-on: macos-11 runs-on: macos-11
steps: steps:
@ -532,7 +532,7 @@ jobs:
build-macos-aarch64: build-macos-aarch64:
timeout-minutes: 20 timeout-minutes: 60
runs-on: macos-11 runs-on: macos-11
steps: steps:

View file

@ -26,7 +26,7 @@ on:
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
timeout-minutes: 30 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
actions: read actions: read

View file

@ -28,7 +28,7 @@ env:
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
timeout-minutes: 30 timeout-minutes: 60
runs-on: windows-latest runs-on: windows-latest
steps: steps:

View file

@ -12,7 +12,7 @@ on:
jobs: jobs:
sync-test-ubuntu-tsan: sync-test-ubuntu-tsan:
timeout-minutes: 30 timeout-minutes: 60
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
@ -83,7 +83,7 @@ jobs:
build/data/ build/data/
sync-test-ubuntu-msan: sync-test-ubuntu-msan:
timeout-minutes: 30 timeout-minutes: 60
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
@ -172,7 +172,7 @@ jobs:
sync-test-ubuntu-ubsan: sync-test-ubuntu-ubsan:
timeout-minutes: 30 timeout-minutes: 60
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
@ -221,7 +221,7 @@ jobs:
sync-test-ubuntu-asan: sync-test-ubuntu-asan:
timeout-minutes: 30 timeout-minutes: 60
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
@ -270,7 +270,7 @@ jobs:
sync-test-macos: sync-test-macos:
timeout-minutes: 30 timeout-minutes: 60
runs-on: macos-11 runs-on: macos-11
steps: steps:
@ -341,7 +341,7 @@ jobs:
sync-test-windows-debug-asan: sync-test-windows-debug-asan:
timeout-minutes: 30 timeout-minutes: 60
runs-on: windows-2022 runs-on: windows-2022
steps: steps:
@ -389,7 +389,7 @@ jobs:
sync-test-windows-leaks: sync-test-windows-leaks:
timeout-minutes: 30 timeout-minutes: 60
runs-on: windows-2022 runs-on: windows-2022
steps: steps:

View file

@ -27,6 +27,10 @@ option(DEV_TRACK_MEMORY "[Developer only] Track memory allocations" 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)
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION 10.0)
endif()
include(cmake/grpc.cmake) include(cmake/grpc.cmake)
add_subdirectory(external/src/Tari) add_subdirectory(external/src/Tari)

View file

@ -29,6 +29,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT /GL") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT /GL")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT /GL") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT /GL")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
else() else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -w") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -w")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -w") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -w")

View file

@ -18,17 +18,23 @@
#include "common.h" #include "common.h"
#include "merge_mining_client.h" #include "merge_mining_client.h"
#include "merge_mining_client_json_rpc.h" #include "merge_mining_client_json_rpc.h"
#ifndef P2POOL_UNIT_TESTS
#include "merge_mining_client_tari.h" #include "merge_mining_client_tari.h"
#endif
namespace p2pool { namespace p2pool {
IMergeMiningClient* IMergeMiningClient::create(p2pool* pool, const std::string& host, const std::string& wallet) noexcept IMergeMiningClient* IMergeMiningClient::create(p2pool* pool, const std::string& host, const std::string& wallet) noexcept
{ {
try { try {
#ifndef P2POOL_UNIT_TESTS
if (host.find(MergeMiningClientTari::TARI_PREFIX) == 0) { if (host.find(MergeMiningClientTari::TARI_PREFIX) == 0) {
return new MergeMiningClientTari(pool, host, wallet); return new MergeMiningClientTari(pool, host, wallet);
} }
else { else
#endif
{
return new MergeMiningClientJSON_RPC(pool, host, wallet); return new MergeMiningClientJSON_RPC(pool, host, wallet);
} }
} }

View file

@ -57,7 +57,6 @@ set(SOURCES
../src/mempool.cpp ../src/mempool.cpp
../src/merge_mining_client.cpp ../src/merge_mining_client.cpp
../src/merge_mining_client_json_rpc.cpp ../src/merge_mining_client_json_rpc.cpp
../src/merge_mining_client_tari.cpp
../src/merkle.cpp ../src/merkle.cpp
../src/miner.cpp ../src/miner.cpp
../src/p2p_server.cpp ../src/p2p_server.cpp