Skip to content

Commit

Permalink
Merge branch 'feature-3.6.0' into feature-3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay authored Nov 17, 2023
2 parents 501097f + 03bc23f commit b3bb107
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 35 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/workflow-self-hosted-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ jobs:
. /opt/rh/rh-perl530/enable
export LIBCLANG_PATH=/opt/rh/llvm-toolset-7.0/root/lib64/
. /opt/rh/llvm-toolset-7.0/enable
alias cmake='cmake3'
cd build && cmake3 -DALLOCATOR=jemalloc -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DTESTS=ON -DCOVERAGE=ON -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=ON -DWITH_TIKV=OFF -DWITH_TARS_SERVICES=ON .. || cat *.log
cd build && cmake -DALLOCATOR=jemalloc -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DTESTS=ON -DCOVERAGE=ON -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=ON -DWITH_TIKV=OFF -DWITH_TARS_SERVICES=ON .. || cat *.log
make -j8
- name: Test
run:
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,17 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v2
- uses: actions/cache@v3
id: cache
with:
path: |
deps/
c:/vcpkg
c:/vcpkg/buildtrees
c:/vcpkg/packages
c:/vcpkg/downloads
ccache
key: hunter-msvc-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
key: vcpkg-msvc-v3-notest-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
hunter-msvc-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
vcpkg-msvc-v3-notest-${{ hashFiles('.github/workflows/workflow.yml') }}
vcpkg-msvc-v3-notest-
- name: update vcpkg
run: |
cd ${{ env.VCPKG_ROOT }} && git fetch --all && git checkout master && git pull
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ if(NOT ONLY_CPP_SDK AND NOT WITH_SWIG_SDK)
add_subdirectory(bcos-tars-protocol)
endif ()
add_subdirectory(bcos-codec)
include(ProjectITTAPI)
include(ProjectSDF)
if(NOT ONLY_CPP_SDK AND NOT WITH_SWIG_SDK)
include(ProjectITTAPI)
endif ()

if(WITH_LIGHTNODE)
add_subdirectory(lightnode)
Expand Down
3 changes: 2 additions & 1 deletion bcos-crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
project(bcos-crypto VERSION ${VERSION})

file(GLOB_RECURSE ALL_SRCS bcos-crypto/*.cpp)
set(LIB_LIST OpenSSL::SSL OpenSSL::Crypto wedprcrypto::crypto wedprcrypto::zkp bcos-utilities bcos-concepts TBB::tbb SDF unofficial::secp256k1 unofficial::secp256k1_precomputed)
set(LIB_LIST OpenSSL::SSL OpenSSL::Crypto wedprcrypto::crypto wedprcrypto::zkp bcos-utilities bcos-concepts TBB::tbb HSM-CRYPTO::sdf-crypto unofficial::secp256k1 unofficial::secp256k1_precomputed)

find_package(OpenSSL REQUIRED)
find_package(TBB REQUIRED)
find_package(wedprcrypto REQUIRED)
find_package(unofficial-secp256k1 REQUIRED)
find_package(HSM-CRYPTO REQUIRED)

add_library(bcos-crypto STATIC ${ALL_SRCS})
target_link_libraries(bcos-crypto PUBLIC ${LIB_LIST})
Expand Down
5 changes: 2 additions & 3 deletions bcos-framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ target_include_directories(bcos-framework INTERFACE
$<INSTALL_INTERFACE:include/bcos-framework>)

if (PRECOMPILED_HEADER)
target_link_libraries(bcos-framework INTERFACE bcos-crypto bcos-task Microsoft.GSL::GSL precompiled-headers)
target_link_libraries(bcos-framework INTERFACE bcos-task Microsoft.GSL::GSL precompiled-headers)
target_precompile_headers(bcos-framework REUSE_FROM precompiled-headers)
else()
target_link_libraries(bcos-framework INTERFACE bcos-crypto bcos-task Microsoft.GSL::GSL fmt::fmt)
target_link_libraries(bcos-framework INTERFACE bcos-task Microsoft.GSL::GSL fmt::fmt)
endif()

if (TESTS)
enable_testing()
set(CTEST_OUTPUT_ON_FAILURE TRUE)
add_subdirectory(test)
add_subdirectory(benchmark)
endif()

# for code coverage
Expand Down
7 changes: 0 additions & 7 deletions bcos-framework/benchmark/CMakeLists.txt

This file was deleted.

3 changes: 1 addition & 2 deletions bcos-framework/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ set(TEST_BINARY_NAME test-bcos-framework)
add_executable(${TEST_BINARY_NAME} ${SOURCES})

find_package(Boost REQUIRED serialization unit_test_framework)
find_package(fmt REQUIRED)

target_link_libraries(${TEST_BINARY_NAME} PRIVATE ${UTILITIES_TARGET} bcos-framework Boost::serialization fmt::fmt-header-only Boost::unit_test_framework)
target_link_libraries(${TEST_BINARY_NAME} PRIVATE ${UTILITIES_TARGET} bcos-framework Boost::serialization Boost::unit_test_framework)
add_test(NAME test-framework WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TEST_BINARY_NAME})
7 changes: 6 additions & 1 deletion benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ add_executable(merkleBench merkleBench.cpp)
target_link_libraries(merkleBench ${TOOL_TARGET} ${PROTOCOL_TARGET} bcos-crypto Boost::program_options)

add_executable(storageBenchmark storageBenchmark.cpp)
target_link_libraries(storageBenchmark bcos-framework)
target_link_libraries(storageBenchmark bcos-framework)

find_package(fmt REQUIRED)
find_package(benchmark REQUIRED)
add_executable(benchmark-memory-storage benchmarkMemoryStorage.cpp)
target_link_libraries(benchmark-memory-storage bcos-framework benchmark::benchmark benchmark::benchmark_main fmt::fmt-header-only)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <bcos-framework/storage/Entry.h>
#include <bcos-framework/storage2/MemoryStorage.h>
#include <bcos-task/Wait.h>
#include "bcos-framework/bcos-framework/storage/Entry.h"
#include "bcos-framework/bcos-framework/storage2/MemoryStorage.h"
#include "bcos-framework/bcos-framework/transaction-executor/TransactionExecutor.h"
#include "libtask/bcos-task/Wait.h"
#include <benchmark/benchmark.h>
#include <fmt/format.h>
#include <tbb/concurrent_hash_map.h>
#include <tbb/concurrent_map.h>
#include <tbb/concurrent_unordered_map.h>
#include <transaction-executor/TransactionExecutor.h>
#include <boost/container_hash/hash_fwd.hpp>
#include <any>
#include <variant>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* @file ConsensusNodeTest.cpp
*/
#include "bcos-framework/consensus/ConsensusNode.h"
#include "bcos-crypto/bcos-crypto/signature/key/KeyImpl.h"
#include "bcos-crypto/bcos-crypto/signature/secp256k1/Secp256k1Crypto.h"
#include "bcos-framework/consensus/ConsensusNodeInterface.h"
#include "bcos-framework/protocol/Protocol.h"
#include <bcos-crypto/signature/key/KeyImpl.h>
#include <bcos-crypto/signature/secp256k1/Secp256k1Crypto.h>
#include <bcos-utilities/testutils/TestPromptFixture.h>
#include "bcos-utilities/testutils/TestPromptFixture.h"
#include <boost/test/unit_test.hpp>
using namespace bcos;
using namespace bcos::consensus;
Expand Down
5 changes: 3 additions & 2 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"kind": "git",
"repository": "https://github.com/FISCO-BCOS/registry",
"baseline": "a24727866a467378e73db194f43a8c0978093b62",
"baseline": "4e355080e2742a679e1ce5fddb8a3b9a7fd559fd",
"packages": [
"openssl",
"evmone",
Expand All @@ -16,7 +16,8 @@
"wedprcrypto",
"jemalloc",
"secp256k1",
"tbb"
"tbb",
"hsm-crypto"
]
}
]
Expand Down
6 changes: 4 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"features": []
},
"wedprcrypto",
"range-v3"
"range-v3",
"hsm-crypto"
],
"features": {
"fullnode": {
Expand Down Expand Up @@ -118,7 +119,8 @@
{
"name": "tarscpp",
"version>=": "3.0.3-1#1"
}
},
"hsm-crypto"
]
},
"etcd": {
Expand Down

0 comments on commit b3bb107

Please sign in to comment.