Skip to content

Commit d8f1764

Browse files
Working in shared buffer repo
1 parent 48a2108 commit d8f1764

File tree

7 files changed

+69
-6
lines changed

7 files changed

+69
-6
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Build, run unit tests
2+
name: CMake build and run unit test matrix
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
env:
10+
BUILD_TYPE: Release
11+
jobs:
12+
build_matrix:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-14]
16+
runs-on: ${{ matrix.os }}
17+
defaults:
18+
run:
19+
shell: bash
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@v4
23+
- name: create-build-dir
24+
run: mkdir build
25+
- name: configure-cmake
26+
run: cd build && cmake -D SHARED_BUFFER_BUILD_TESTS:BOOL=ON -D SHARED_BUFFER_BUILD_EXAMPLES:BOOL=ON ..
27+
- name: build
28+
run: cd build && cmake --build . --config $BUILD_TYPE
29+
- name: run-unit-test
30+
run: cd build && ctest -C $BUILD_TYPE

.github/workflows/gen_docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Build, run unit tests
2+
name: Generate documentation
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
build_matrix:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest]
13+
runs-on: ${{ matrix.os }}
14+
defaults:
15+
run:
16+
shell: bash
17+
steps:
18+
- name: checkout
19+
uses: actions/checkout@v4
20+
- name: run-doxygen
21+
uses: mattnotmitt/doxygen-action@v1.9.8
22+
with:
23+
working-directory: doc
24+
- name: deploy-pages
25+
uses: peaceiris/actions-gh-pages@v4
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./doc/doc_output/html

example/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ cmake_minimum_required ( VERSION 3.14 FATAL_ERROR )
88
# create project
99
project ( shared_buffer_example LANGUAGES CXX )
1010

11+
# add dependencies
12+
include ( ../cmake/download_cpm.cmake )
13+
14+
CPMAddPackage ( "gh:connectivecpp/utility-rack@1.0.0" )
15+
CPMAddPackage ( "gh:connectivecpp/binary-serialize@1.0.0" )
16+
1117
# add executable
1218
add_executable ( shared_buffer_example shared_buffer_example.cpp )
1319
target_compile_features ( shared_buffer_example PRIVATE cxx_std_20 )

example/shared_buffer_example.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* @c chops::repeat. See @c threaded_wait_shared_demo.cpp for multithreaded
55
* example.
66
*
7-
* @ingroup example_module
8-
*
97
* @author Thurman Gillespy
108
*
119
* @copyright (c) 2019 by Thurman Gillespy
@@ -28,8 +26,8 @@
2826
#include <cstdint> // std::uint16_t
2927
#include <string>
3028

31-
#include "marshall/extract_append.hpp"
32-
#include "marshall/shared_buffer.hpp"
29+
#include "serialize/extract_append.hpp"
30+
#include "buffer/shared_buffer.hpp"
3331
#include "utility/repeat.hpp"
3432

3533
// tasty utility lambda function

include/buffer/shared_buffer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ class const_shared_buffer {
573573
* @return Spaceship operator comparison result.
574574
*
575575
*/
576-
bool operator<=> (const const_shared_buffer& lhs, const const_shared_buffer& rhs) noexcept {
576+
auto operator<=> (const const_shared_buffer& rhs) noexcept {
577577
return *m_data <=> *rhs.m_data;
578578
}
579579

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CPMAddPackage ( "gh:catchorg/Catch2@3.5.4" )
1919
CPMAddPackage ( "gh:connectivecpp/utility-rack@1.0.0" )
2020

2121
# link dependencies
22-
target_link_libraries ( shared_buffer_test PRIVATE utility_rack Catch2::Catch2WithMain )
22+
target_link_libraries ( shared_buffer_test PRIVATE shared_buffer utility_rack Catch2::Catch2WithMain )
2323

2424
enable_testing()
2525

test/shared_buffer_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414

1515
#include "catch2/catch_test_macros.hpp"
16+
#include "catch2/catch_template_test_macros.hpp"
1617

1718

1819
#include <cstddef> // std::byte

0 commit comments

Comments
 (0)