Skip to content

Commit 141b662

Browse files
remove macos from CI build, example apps now build
1 parent 45ec3e4 commit 141b662

File tree

7 files changed

+22
-27
lines changed

7 files changed

+22
-27
lines changed

.github/workflows/build_run_unit_test_cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
build_matrix:
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, windows-latest, macos-15]
16-
# os: [ubuntu-latest]
15+
# os: [ubuntu-latest, windows-latest, macos-15]
16+
os: [ubuntu-latest, windows-latest]
1717
runs-on: ${{ matrix.os }}
1818
defaults:
1919
run:

cmake/example_app_creation.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ foreach ( example_app_name IN LISTS example_app_names )
99
add_executable ( ${example_app_name} ${example_app_name}.cpp )
1010
target_compile_features ( ${example_app_name} PRIVATE cxx_std_20 )
1111
target_link_libraries ( ${example_app_name} PRIVATE
12-
Threads::Threads chops_net_ip asio shared_buffer expected-lite Catch2::Catch2WithMain )
12+
Threads::Threads
13+
chops_net_ip asio expected-lite shared_buffer
14+
utility_rack wait_queue binary_serialize )
1315
endforeach()
1416

example/CMakeLists.txt

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,15 @@
77

88
cmake_minimum_required ( VERSION 3.14 FATAL_ERROR )
99

10-
project ( chops-net-ip-example VERSION 1.0 LANGUAGES CXX )
10+
project ( chops-net-ip-example LANGUAGES CXX )
1111

1212
set ( example_app_names local_echo_demo
1313
chat_server_demo
1414
simple_chat_demo
1515
echo_binary_text_server_demo
1616
echo_binary_text_client_demo
17-
udp_broadcast_demo
17+
# udp_broadcast_demo
1818
udp_receiver_demo )
1919

20-
set ( CMAKE_THREAD_PREFER_PTHREAD TRUE )
21-
set ( THREADS_PREFER_PTHREAD_FLAG TRUE )
22-
find_package ( Threads REQUIRED )
23-
24-
# add executables
25-
foreach ( example_app_name IN LISTS example_app_names )
26-
message ( "Creating example executable: ${example_app_name}" )
27-
add_executable ( ${example_app_name} ${example_app_name}.cpp )
28-
target_compile_features ( ${example_app_name} PRIVATE cxx_std_20 )
29-
target_link_libraries ( ${example_app_name}
30-
PRIVATE Threads::Threads asio shared_buffer chops_net_ip )
31-
endforeach()
32-
33-
# end of file
20+
include ( ../cmake/example_app_creation.cmake )
3421

example/chat_server_demo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
*
99
* Copyright (c) 2019 Thurman Gillespy
1010
* 2019-10-28
11+
*
12+
* Updated 2025-04-23 by Cliff Green for library dependency changes
1113
*
1214
* Distributed under the Boost Software License, Version 1.0.
1315
* (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,7 +37,6 @@ chat_server_demo.cpp -lpthread -o chat_server
3537
#include "net_ip/net_entity.hpp"
3638
#include "net_ip_component/worker.hpp"
3739
#include "net_ip_component/send_to_all.hpp"
38-
#include "marshall/extract_append.hpp"
3940
#include "net_ip/io_type_decls.hpp"
4041

4142
using io_context = asio::io_context;

example/echo_binary_text_client_demo.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
*
1111
* Copyright (c) Thurman Gillespy
1212
* 2019-10-21
13+
*
14+
* Updated 2025-04-23 by Cliff Green for library dependency changes
1315
*
1416
* Distributed under the Boost Software License, Version 1.0.
1517
* (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -38,7 +40,7 @@ echo_binary_text_client_demo.cpp -lpthread -o echo_client
3840
#include "net_ip/net_ip.hpp"
3941
#include "net_ip/net_entity.hpp"
4042
#include "net_ip_component/worker.hpp"
41-
#include "marshall/extract_append.hpp"
43+
#include "serialize/extract_append.hpp"
4244
#include "net_ip/io_type_decls.hpp"
4345

4446
using io_context = asio::io_context;
@@ -127,7 +129,7 @@ int main(int argc, char* argv[]) {
127129
hdr_processed = true;
128130
// 1st 2 bytes is message size
129131
// endian correct data marshalling
130-
std::uint16_t size = chops::extract_val<std::uint16_t>
132+
std::uint16_t size = chops::extract_val<std::endian::big, std::uint16_t>
131133
(chops::cast_ptr_to<std::byte>(buf.data()));
132134

133135
return size;
@@ -201,7 +203,7 @@ int main(int argc, char* argv[]) {
201203
// endian correct data marshalling
202204
std::byte tbuf[HDR_SIZE]; // temp buffer to hold the header
203205
// write those 2 bytes to the temp buffer
204-
std::size_t result = chops::append_val<std::uint16_t>(tbuf, size_val);
206+
std::size_t result = chops::append_val<std::endian::big, std::uint16_t>(tbuf, size_val);
205207
assert(result == HDR_SIZE);
206208
// now append our header and string data to the output buffer
207209
buf_out.append(tbuf, sizeof(tbuf)); // write the header

example/echo_binary_text_server_demo.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
*
1111
* Copyright (c) Thurman Gillespy
1212
* 2019-10-21
13+
*
14+
* Updated 2025-04-23 by Cliff Green for library dependency changes
1315
*
1416
* Distributed under the Boost Software License, Version 1.0.
1517
* (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,7 +37,7 @@ echo_binary_text_server_demo.cpp -lpthread -o echo_server
3537
#include "net_ip/net_ip.hpp"
3638
#include "net_ip/net_entity.hpp"
3739
#include "net_ip_component/worker.hpp"
38-
#include "marshall/extract_append.hpp"
40+
#include "serialize/extract_append.hpp"
3941
#include "net_ip/io_type_decls.hpp"
4042

4143
using io_context = asio::io_context;
@@ -107,7 +109,7 @@ int main(int argc, char* argv[]) {
107109
// endian correct data marshalling
108110
std::byte tbuf[HDR_SIZE]; // temp buffer to hold the header
109111
// write those 2 bytes to the temp buffer
110-
std::size_t result = chops::append_val<uint16_t>(tbuf, size_val);
112+
std::size_t result = chops::append_val<std::endian::big, uint16_t>(tbuf, size_val);
111113
assert(result == HDR_SIZE);
112114
// now append our header and string data to the output buffer
113115
buf_out.append(tbuf, sizeof(tbuf)); // write the header
@@ -131,7 +133,7 @@ int main(int argc, char* argv[]) {
131133
hdr_processed = true;
132134
// 1st 2 bytes is message size
133135
// endian correct data marshalling
134-
uint16_t size = chops::extract_val<uint16_t>
136+
uint16_t size = chops::extract_val<std::endian::big, uint16_t>
135137
(static_cast<std::byte*> (buf.data()));
136138

137139
return size; // return the size of the text data (obtained from header)

example/udp_broadcast_demo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ udp_broadcast_demo.cpp -lpthread -o udp_broad
3636
#include "net_ip/net_entity.hpp"
3737
#include "net_ip_component/worker.hpp"
3838
#include "net_ip/io_type_decls.hpp"
39+
#include "asio/ip/network_v4.hpp"
3940

4041
using io_output = chops::net::udp_io_output;
4142

@@ -68,7 +69,7 @@ bool process_args(int argc, char* argv[], bool& print_errors, std::string& ip_ad
6869

6970
int offset = 0;
7071

71-
using addr4 = asio::ip::address_v4;
72+
using addr4 = asio::ip::network_v4;
7273

7374
if (argc == 1 || argv[1] == HELP_PRM) {
7475
print_useage();

0 commit comments

Comments
 (0)