diff --git a/.github/workflows/arm_runner.yml b/.github/workflows/arm_runner.yml index c361391dbb..69bd8f39f4 100644 --- a/.github/workflows/arm_runner.yml +++ b/.github/workflows/arm_runner.yml @@ -44,22 +44,20 @@ jobs: run: sudo apt install -y g++ libssl-dev openssl git build-essential autoconf texinfo flex patch bison libgmp-dev zlib1g-dev automake libtool curl && sudo apt -y remove libtbb-dev - name: Setup cmake run: curl -sSL https://cmake.org/files/v3.21/cmake-3.21.0-linux-aarch64.tar.gz | sudo tar -xzC /usr - - name: configure - run: export PATH=$PATH:/usr/cmake-3.21.0-linux-aarch64/bin;cmake . - - name: compile - run: make -j4 + - name: configure without tbb + run: export PATH=$PATH:/usr/cmake-3.21.0-linux-aarch64/bin;cmake . -DWITH_TBB=OFF + - name: compile fisco-bcos + run: make fisco-bcos -j4 - name: tar fisco-bcos for ubuntu run: cp tools/build_chain.sh bin/ && cd bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos build_chain.sh - uses: actions/upload-artifact@v4 with: name: fisco-bcos.tar.gz path: bin/fisco-bcos.tar.gz - - name: run uint tests - run: CTEST_OUTPUT_ON_FAILURE=TRUE make test - - name: configure without tbb - run: export PATH=$PATH:/usr/cmake-3.21.0-linux-aarch64/bin;cmake . -DWITH_TBB=OFF - - name: compile - run: make -j4 + - name: configure + run: export PATH=$PATH:/usr/cmake-3.21.0-linux-aarch64/bin;cmake . -DWITH_TBB=ON + - name: compile all + run: make fisco-bcos -j4 - name: tar fisco-bcos for ubuntu run: cp tools/build_chain.sh bin/ && cd bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos build_chain.sh - uses: actions/upload-artifact@v4 diff --git a/cmake/ProjectCryptopp.cmake b/cmake/ProjectCryptopp.cmake index e4538ccead..1118a5e0b8 100644 --- a/cmake/ProjectCryptopp.cmake +++ b/cmake/ProjectCryptopp.cmake @@ -152,8 +152,8 @@ ExternalProject_Add(cryptopp # -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} BUILD_COMMAND ${CMAKE_COMMAND} --build --config Release INSTALL_COMMAND ${CMAKE_COMMAND} --build --config Release --target install - LOG_CONFIGURE 0 - LOG_BUILD 0 + LOG_CONFIGURE 1 + LOG_BUILD 1 LOG_INSTALL 1 ${_overwrite_install_command} BUILD_BYPRODUCTS "${CRYPTOPP_LIBRARY}" diff --git a/cmake/ProjectTBB.cmake b/cmake/ProjectTBB.cmake index 88945c1ac1..77555449fa 100644 --- a/cmake/ProjectTBB.cmake +++ b/cmake/ProjectTBB.cmake @@ -5,11 +5,7 @@ if (APPLE) set(ENABLE_STD_LIB stdlib=libc++) endif() -if(WITH_TBB) - set(TBB_BUILD_CMD make extra_inc=big_iron.inc ${ENABLE_STD_LIB}) -else() - set(TBB_BUILD_CMD "") -endif() +set(TBB_BUILD_CMD make extra_inc=big_iron.inc ${ENABLE_STD_LIB}) ExternalProject_Add(tbb PREFIX ${CMAKE_SOURCE_DIR}/deps @@ -43,13 +39,8 @@ set(TBB_INCLUDE_DIR ${SOURCE_DIR}/include) set(TBB_LIBRARY ${CMAKE_SOURCE_DIR}/deps/lib/libtbb.${TBB_LIB_SUFFIX}) file(MAKE_DIRECTORY ${TBB_INCLUDE_DIR}) # Must exist. file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/deps/lib/) # Must exist. -if (WITH_TBB) - add_library(TBB STATIC IMPORTED) - set_property(TARGET TBB PROPERTY IMPORTED_LOCATION ${TBB_LIBRARY}) - set_property(TARGET TBB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIR}) -else() - add_library(TBB INTERFACE) - target_include_directories(TBB INTERFACE ${TBB_INCLUDE_DIR}) -endif() +add_library(TBB STATIC IMPORTED) +set_property(TARGET TBB PROPERTY IMPORTED_LOCATION ${TBB_LIBRARY}) +set_property(TARGET TBB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIR}) add_dependencies(TBB tbb) unset(SOURCE_DIR) diff --git a/cmake/ProjectTCMalloc.cmake b/cmake/ProjectTCMalloc.cmake index 3d1ae028d7..305f22f602 100644 --- a/cmake/ProjectTCMalloc.cmake +++ b/cmake/ProjectTCMalloc.cmake @@ -40,3 +40,4 @@ set_property(TARGET TCMalloc PROPERTY IMPORTED_LOCATION ${TCMALLOC_LIBRARY}) set_property(TARGET TCMalloc PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TCMALLOC_INCLUDE_DIR}) unset(SOURCE_DIR) +add_dependencies(TCMalloc gperftools) diff --git a/libsync/CMakeLists.txt b/libsync/CMakeLists.txt index beaa77ef8d..0ec306d2a8 100644 --- a/libsync/CMakeLists.txt +++ b/libsync/CMakeLists.txt @@ -6,4 +6,4 @@ file(GLOB HEADERS "*.h") add_library(sync ${SRC_LIST} ${HEADERS}) target_include_directories(sync SYSTEM BEFORE PRIVATE ${TCMALLOC_INCLUDE_DIR}) -target_link_libraries(sync PUBLIC blockchain txpool p2p) +target_link_libraries(sync PUBLIC blockchain txpool p2p TCMalloc)