Skip to content

Commit

Permalink
fix arm ci (FISCO-BCOS#4414)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust authored Apr 26, 2024
1 parent 480cd6a commit ffa2634
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 26 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/arm_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmake/ProjectCryptopp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ ExternalProject_Add(cryptopp
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config Release
INSTALL_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --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}"
Expand Down
17 changes: 4 additions & 13 deletions cmake/ProjectTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions cmake/ProjectTCMalloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion libsync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit ffa2634

Please sign in to comment.