File tree Expand file tree Collapse file tree 4 files changed +58
-3
lines changed
Expand file tree Collapse file tree 4 files changed +58
-3
lines changed Original file line number Diff line number Diff line change 1- name : Linux Build
1+ name : linux build
22
33on : [push]
44
Original file line number Diff line number Diff line change 1+ name : macOs build
2+
3+ on : [push]
4+
5+ env :
6+ BUILD_TYPE : Release
7+
8+ jobs :
9+ build :
10+ runs-on : macOs-latest
11+
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : install dependencies
16+ run : brew update;
17+ brew install boost;
18+ brew install googletest
19+
20+
21+ - name : Configure CMake
22+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
23+
24+ - name : Build
25+ run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
26+
27+ - name : Test
28+ run : ${{github.workspace}}/build/tests/boost-tcp-server-client-tests
29+
Original file line number Diff line number Diff line change 1- # ![ LinuxWorkflow] ( https://github.com/alejandrofsevilla/boost-tcp-server-client/actions/workflows/Linux.yml/badge.svg )
1+ # ![ LinuxWorkflow] ( https://github.com/alejandrofsevilla/boost-tcp-server-client/actions/workflows/Linux.yml/badge.svg ) ![ MacOsWorkflow ] ( https://github.com/alejandrofsevilla/boost-tcp-server-client/actions/workflows/MacOs.yml/badge.svg )
22# Boost TCP Server/Client
33Asynchronous [ Boost.Asio] ( https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio.html ) TCP Server and Client example.
44
@@ -69,3 +69,29 @@ auto address{boost::asio::ip::address::from_string("127.0.0.1")};
6969client.connect({address, port});
7070
7171```
72+ ## How to build
73+ - Install dependencies.
74+ - linux
75+ ``` terminal
76+ sudo apt-get install libboost-dev
77+ sudo apt-get install libgtest-dev
78+ ```
79+ - macOs
80+ ``` terminal
81+ brew install boost
82+ brew install googletest
83+ ```
84+ - Clone repository.
85+ ``` terminal
86+ git clone https://github.com/alejandrofsevilla/boost-tcp-server-client.git
87+ cd boost-tcp-server-client
88+ ```
89+ - Build.
90+ ``` terminal
91+ cmake -S . -B build
92+ cmake --build build
93+ ```
94+ - Run tests.
95+ ``` terminal
96+ ./build/tests/boost-tcp-server-client-tests
97+ ```
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ namespace {
1111inline std::string generateRandomString (size_t size) {
1212 std::random_device rd;
1313 std::mt19937 eng{rd ()};
14- std::uniform_int_distribution<char16_t > dist;
14+ std::uniform_int_distribution<int > dist;
1515 std::string str (size, {});
1616 std::generate (str.begin (), str.end (), std::bind (dist, eng));
1717 return str;
You can’t perform that action at this time.
0 commit comments