Skip to content

Commit

Permalink
Merge 171e3de into a635da3
Browse files Browse the repository at this point in the history
  • Loading branch information
iceseer authored Nov 24, 2022
2 parents a635da3 + 171e3de commit 7646fa8
Show file tree
Hide file tree
Showing 93 changed files with 392 additions and 1,310 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
GITHUB_HUNTER_TOKEN: ${{ secrets.HUNTER_TOKEN }}
# Change all container: values to this variable once this feature is available
# https://github.saobby.my.eu.orgmunity/t/how-to-set-and-access-a-workflow-variable/17335/6
INDOCKER_IMAGE: soramitsu/kagome-dev:4-minideb
INDOCKER_IMAGE: soramitsu/kagome-dev:4.1-minideb
CACHE_VERSION: v07
CACHE_PATHS: |
~/Library/Caches/pip
Expand Down Expand Up @@ -53,25 +53,27 @@ jobs:
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-11_cxx17.cmake -DUBSAN=ON
- name: "Linux: clang-11 External Project"
run: ./housekeeping/make_external_build.sh -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-11_cxx17.cmake
- name: "Linux: clang-15 UBSAN"
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx17.cmake -DUBSAN=ON
- name: "Linux: clang-14 UBSAN"
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-14_cxx17.cmake -DUBSAN=ON

name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4-minideb
container: soramitsu/kagome-dev:4.1-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ matrix.options.name }}-${{ env.CACHE_VERSION }}
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: "${{ matrix.options.name }}"
run: "${{ matrix.options.run }}"

clang-tidy:
name: "Linux: clang-tidy"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4-minideb
container: soramitsu/kagome-dev:4.1-minideb
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -91,13 +93,15 @@ jobs:
coverage:
name: "Linux: gcc-10 coverage/sonar"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4-minideb
container: soramitsu/kagome-dev:4.1-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: makeBuild
env:
BUILD_FINAL_TARGET: ctest_coverage
Expand Down Expand Up @@ -127,7 +131,7 @@ jobs:
build-type: "Release"
name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4-minideb
container: soramitsu/kagome-dev:4.1-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -151,7 +155,7 @@ jobs:
- name: "Push Release Docker image"
build-type: "Release"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4-minideb
container: soramitsu/kagome-dev:4.1-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion cmake/toolchain/clang-11_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-11.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 0 additions & 3 deletions cmake/toolchain/clang-11_mold_cxx17.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions cmake/toolchain/clang-14_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-14.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
2 changes: 0 additions & 2 deletions cmake/toolchain/clang-15_cxx17.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions cmake/toolchain/clang-15_mold_cxx17.cmake

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if(DEFINED POLLY_COMPILER_CLANG_15_CMAKE)
if(DEFINED POLLY_COMPILER_CLANG_14_CMAKE)
return()
else()
set(POLLY_COMPILER_CLANG_15_CMAKE 1)
set(POLLY_COMPILER_CLANG_14_CMAKE 1)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/../../print.cmake)
Expand All @@ -13,15 +13,15 @@ if(XCODE_VERSION)
fatal_error(${_err})
endif()

find_program(CMAKE_C_COMPILER clang-15)
find_program(CMAKE_CXX_COMPILER clang++-15)
find_program(CMAKE_C_COMPILER clang-14)
find_program(CMAKE_CXX_COMPILER clang++-14)

if(NOT CMAKE_C_COMPILER)
fatal_error("clang-15 not found")
fatal_error("clang-14 not found")
endif()

if(NOT CMAKE_CXX_COMPILER)
fatal_error("clang++-15 not found")
fatal_error("clang++-14 not found")
endif()

set(
Expand Down
2 changes: 1 addition & 1 deletion cmake/toolchain/gcc-10_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-10.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 0 additions & 3 deletions cmake/toolchain/gcc-10_mold_cxx17.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/toolchain/gcc-12_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-12.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 0 additions & 3 deletions cmake/toolchain/gcc-12_mold_cxx17.cmake

This file was deleted.

16 changes: 0 additions & 16 deletions cmake/toolchain/linker/mold.cmake

This file was deleted.

77 changes: 74 additions & 3 deletions core/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,77 @@
# SPDX-License-Identifier: Apache-2.0
#

add_subdirectory(jrpc)
add_subdirectory(service)
add_subdirectory(transport)
add_library(api
service/impl/api_service_impl.cpp
service/chain/impl/chain_api_impl.cpp
service/chain/requests/get_block_hash.cpp
service/chain/chain_jrpc_processor.cpp
service/child_state/child_state_jrpc_processor.cpp
service/child_state/impl/child_state_api_impl.cpp
service/child_state/requests/get_storage_hash.cpp
service/child_state/requests/get_storage_size.cpp
service/child_state/requests/get_keys.cpp
service/child_state/requests/get_keys_paged.cpp
service/child_state/requests/get_storage.cpp
service/rpc/impl/rpc_api_impl.cpp
service/rpc/requests/methods.cpp
service/rpc/rpc_jrpc_processor.cpp
service/state/impl/state_api_impl.cpp
service/state/requests/call.cpp
service/state/requests/get_runtime_version.cpp
service/state/requests/unsubscribe_storage.cpp
service/state/requests/get_keys_paged.cpp
service/state/requests/get_storage.cpp
service/state/requests/subscribe_storage.cpp
service/state/state_jrpc_processor.cpp
service/internal/impl/internal_api_impl.cpp
service/internal/internal_jrpc_processor.cpp
service/author/impl/author_api_impl.cpp
service/author/author_jrpc_processor.cpp
service/system/impl/system_api_impl.cpp
service/system/requests/health.cpp
service/system/requests/version.cpp
service/system/requests/properties.cpp
service/system/requests/chain.cpp
service/system/requests/chain_type.cpp
service/system/requests/name.cpp
service/system/system_jrpc_processor.cpp
service/payment/impl/payment_api_impl.cpp
service/payment/payment_jrpc_processor.cpp
transport/impl/http/http_listener_impl.cpp
transport/impl/http/http_session.cpp
transport/impl/ws/ws_session.cpp
transport/impl/ws/ws_listener_impl.cpp
transport/tuner.cpp
transport/rpc_thread_pool.cpp
transport/error.cpp
jrpc/jrpc_handle_batch.cpp
jrpc/jrpc_server_impl.cpp
)

target_link_libraries(api
Boost::boost
RapidJSON::rapidjson
metrics
logger
app_state_manager
p2p::p2p_peer_id
crypto_store
hexutil
scale::scale
storage
blob
metadata_api
consensus
ss58_codec
outcome
build_version
)
kagome_install(api)

add_custom_command(TARGET api
POST_BUILD
COMMAND find ${CMAKE_CURRENT_BINARY_DIR} -name "*.o" -type f -delete
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Removing object files from '${CMAKE_CURRENT_BINARY_DIR}'"
)
14 changes: 0 additions & 14 deletions core/api/jrpc/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion core/api/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target_link_libraries(api_service
Boost::boost
logger
app_state_manager
rpc_thread_pool
api
p2p::p2p_peer_id
)

Expand Down
19 changes: 0 additions & 19 deletions core/api/service/author/CMakeLists.txt

This file was deleted.

16 changes: 0 additions & 16 deletions core/api/service/chain/CMakeLists.txt

This file was deleted.

12 changes: 0 additions & 12 deletions core/api/service/chain/requests/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions core/api/service/child_state/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions core/api/service/child_state/requests/CMakeLists.txt

This file was deleted.

12 changes: 0 additions & 12 deletions core/api/service/internal/CMakeLists.txt

This file was deleted.

8 changes: 0 additions & 8 deletions core/api/service/payment/CMakeLists.txt

This file was deleted.

15 changes: 0 additions & 15 deletions core/api/service/rpc/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 7646fa8

Please sign in to comment.