mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
Merge branch 'refactoring' of github.com:mutouyun/cpp-ipc into refactoring
This commit is contained in:
commit
7ff608e101
16
.github/workflows/c-cpp.yml
vendored
16
.github/workflows/c-cpp.yml
vendored
@ -12,10 +12,16 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Code
|
||||||
- name: cmake
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
run: cmake -DCMAKE_BUILD_TYPE=Release -DLIBIPC_BUILD_TESTS=ON .
|
run: cmake -DCMAKE_BUILD_TYPE=Release -DLIBIPC_BUILD_TESTS=ON .
|
||||||
- name: make
|
|
||||||
|
- name: Build
|
||||||
run: make -j
|
run: make -j
|
||||||
- name: test
|
|
||||||
run: export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH && ./bin/test-ipc
|
- name: Test
|
||||||
|
env:
|
||||||
|
LD_LIBRARY_PATH: ./lib
|
||||||
|
run: ./bin/test-ipc
|
||||||
|
|||||||
34
.github/workflows/codecov.yml
vendored
Normal file
34
.github/workflows/codecov.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Upload CodeCov Report
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ refactoring ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ refactoring ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: cmake -DCMAKE_BUILD_TYPE=Debug -DLIBIPC_BUILD_TESTS=ON -DLIBIPC_CODECOV=ON .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: make -j
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
env:
|
||||||
|
LD_LIBRARY_PATH: ./lib
|
||||||
|
run: ./bin/test-ipc
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v4.0.1
|
||||||
|
with:
|
||||||
|
verbose: true
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.11)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
project(cpp-ipc)
|
project(cpp-ipc)
|
||||||
|
|
||||||
option(LIBIPC_BUILD_TESTS "Build all of libipc's own tests." OFF)
|
option(LIBIPC_BUILD_TESTS "Build all of libipc's own tests." OFF)
|
||||||
@ -6,6 +6,7 @@ option(LIBIPC_BUILD_DEMOS "Build all of libipc's own demos."
|
|||||||
option(LIBIPC_BUILD_BENCHMARK "Build all of libipc's own benchmark tests." OFF)
|
option(LIBIPC_BUILD_BENCHMARK "Build all of libipc's own benchmark tests." OFF)
|
||||||
option(LIBIPC_BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
option(LIBIPC_BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
||||||
option(LIBIPC_USE_STATIC_CRT "Set to ON to build with static CRT on Windows (/MT)." OFF)
|
option(LIBIPC_USE_STATIC_CRT "Set to ON to build with static CRT on Windows (/MT)." OFF)
|
||||||
|
option(LIBIPC_CODECOV "Build with unit test coverage." OFF)
|
||||||
|
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
@ -31,8 +32,15 @@ if (MSVC)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -O2")
|
add_compile_options(
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -rdynamic -fsanitize=address")
|
"$<$<BOOL:${LIBIPC_CODECOV}>:SHELL:--coverage>"
|
||||||
|
"$<$<CONFIG:Release>:SHELL:-DNDEBUG -O2>"
|
||||||
|
"$<$<CONFIG:Debug>:SHELL:-g -rdynamic -fsanitize=address>"
|
||||||
|
)
|
||||||
|
add_link_options(
|
||||||
|
"$<$<BOOL:${LIBIPC_CODECOV}>:SHELL:-lgcov --coverage>"
|
||||||
|
"$<$<CONFIG:Debug>:SHELL:-fsanitize=address>"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||||
@ -73,4 +81,4 @@ endif()
|
|||||||
install(
|
install(
|
||||||
DIRECTORY "include/"
|
DIRECTORY "include/"
|
||||||
DESTINATION "include"
|
DESTINATION "include"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/mutouyun/cpp-ipc/blob/master/LICENSE)
|
[](https://github.com/mutouyun/cpp-ipc/blob/master/LICENSE)
|
||||||
[](https://github.com/mutouyun/cpp-ipc/actions)
|
[](https://github.com/mutouyun/cpp-ipc/actions)
|
||||||
|
[](https://codecov.io/github/mutouyun/cpp-ipc)
|
||||||
[](https://github.com/microsoft/vcpkg/tree/master/ports/cpp-ipc)
|
[](https://github.com/microsoft/vcpkg/tree/master/ports/cpp-ipc)
|
||||||
|
|
||||||
A high-performance inter-process communication using shared memory on Linux/Windows.
|
A high-performance inter-process communication using shared memory on Linux/Windows.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user