Update README & CI pipeline

Summary: related to T12804

Reviewers: ivica

Reviewed By: ivica

Subscribers: miljen, iljazovic

Differential Revision: https://repo.mireo.local/D27469
This commit is contained in:
Korina Šimičević
2024-01-19 15:38:07 +01:00
parent fa014fc337
commit 30711186bd
6 changed files with 62 additions and 12 deletions

View File

@@ -127,6 +127,16 @@ jobs:
cxxflags: ''
ldflags: ''
- toolset: g++-12
compiler: g++-12
install: g++-12
os: ubuntu-latest
container: ubuntu:22.04
build-type: 'Release'
cxxstd: 20
cxxflags: ''
ldflags: ''
- toolset: clang++-12
compiler: clang++-12
install: clang++-12
@@ -137,6 +147,16 @@ jobs:
cxxflags: '-fdeclspec'
ldflags: ''
- toolset: clang++-13
compiler: clang++-13
install: clang++-13
os: ubuntu-latest
container: ubuntu:22.04
build-type: 'Release'
cxxstd: 17
cxxflags: '-fdeclspec'
ldflags: ''
- toolset: clang++-14-libc++-14
compiler: clang++-14
install: 'clang++-14 libc++-14-dev libc++abi-14-dev'

View File

@@ -1,5 +1,10 @@
Async.MQTT5: A ~~C++20~~ C++17 MQTT client based on Boost.Asio
Async.MQTT5: A C++17 MQTT client based on Boost.Asio
===============================
Branch | Windows/Linux Build | Coverage | Documentation |
-------|---------------------|----------|---------------|
[`master`](https://github.com/mireo/async-mqtt5/tree/master) | [![build status](https://github.com/mireo/async-mqtt5/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mireo/async-mqtt5/actions/workflows/ci.yml) | [![codecov](https://codecov.io/gh/mireo/async-mqtt5/branch/master/graph/badge.svg)](https://codecov.io/gh/mireo/async-mqtt5/branch/master) | [Documentation](https://spacetime.mireo.com/async-mqtt5/)
Async.MQTT5 is a professional, industrial-grade C++17 client built on [Boost.Asio](https://www.boost.org/doc/libs/1_82_0/doc/html/boost_asio.html). This client is designed for publishing or receiving messages from an MQTT 5.0 compatible broker. Async.MQTT5 represents a comprehensive implementation of the MQTT 5.0 protocol standard, offering full support for publishing or receiving messages with QoS 0, 1, and 2.
Our clear intention is to include the Async.MQTT5 library into [Boost](https://www.boost.org/). We are actively working on it.
@@ -106,8 +111,8 @@ Async.MQTT5 is a header-only library. To use Async.MQTT5 it requires the followi
- **OpenSSL**. Only if you require an SSL connection by using [boost::asio::ssl::stream](https://www.boost.org/doc/libs/1_82_0/doc/html/boost_asio/reference/ssl__stream.html).
Async.MQTT5 has been tested with the following compilers:
- clang 14.0 (Linux)
- GCC 12 (Linux)
- clang 12.0, 13.0, 14.0, 15.0 (Linux)
- GCC 10, 11, 12 (Linux)
- MSVC 14.37 - Visual Studio 2022 (Windows)
Contributing
@@ -119,7 +124,7 @@ You may merge a Pull Request once you have the sign-off from other developers, o
License
---------
Copyright (c) 2001-2023 Mireo, EU
Copyright (c) 2001-2024 Mireo, EU
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@@ -1,4 +1,4 @@
[library Async.MQTT5: a C++20 MQTT client
[library Async.MQTT5: a C++17 MQTT client
[quickbook 1.7]
[copyright 2023 Mireo]
[id async_mqtt5]

View File

@@ -60,18 +60,19 @@ The following example illustrates a simple scenario of configuring a Client and
using client_type = async_mqtt5::mqtt_client<boost::asio::ip::tcp::socket>;
client_type c(ioc, "");
c.credentials("clientid", "", "")
.brokers("mqtt.broker", 1883)
c.credentials("<your-client-id>", "<client-username>", "<client-pwd>")
.brokers("<your-mqtt-broker>", 1883)
.async_run(asio::detached);
c.async_publish<async_mqtt5::qos_e::at_most_once>(
"test/mqtt-test", "hello world!",
"<topic>", "Hello world!",
async_mqtt5::retain_e::no, async_mqtt5::publish_props {},
[](async_mqtt5::error_code ec) {
[&c](async_mqtt5::error_code ec) {
std::cout << ec.message() << std::endl;
c.async_disconnect(boost::asio::detached); // disconnect and close the client
}
);
ioc.run();
}
@@ -102,8 +103,9 @@ To use __Self__ it requires the following:
__Self__ has been tested with the following compilers:
* clang 14.0 (Linux)
* MSVC 14.37 - Visual Studio 2022 (Windows)
* clang 12.0, 13.0, 14.0, 15.0 (Linux)
* GCC 10, 11, 12 (Linux)
* MSVC 14.37 - Visual Studio 2022 (Windows)
[heading Acknowledgements]
We thank [@https://github.com/chriskohlhoff Christopher Kohlhoff] for his outstanding __Asio__ library,

View File

@@ -338,6 +338,7 @@ BOOST_FIXTURE_TEST_CASE(rerunning_the_client, shared_test_data) {
[&]() -> asio::awaitable<void> {
mqtt_client<test::test_stream> c(ioc, "");
c.brokers("127.0.0.1,127.0.0.1", 1883) // to avoid reconnect backoff
.credentials("cliend-id", "", "")
.async_run(asio::detached);
auto [ec, rc, props] = co_await c.async_publish<qos_e::at_least_once>(

View File

@@ -190,6 +190,28 @@ BOOST_FIXTURE_TEST_CASE(async_auth_fail, shared_test_data) {
);
}
BOOST_FIXTURE_TEST_CASE(unexpected_auth, shared_test_data) {
auto connect_no_auth = encoders::encode_connect(
"", std::nullopt, std::nullopt, 10, false, {}, std::nullopt
);
auto disconnect = encoders::encode_disconnect(
reason_codes::protocol_error.value(),
dprops_with_reason_string("Unexpected AUTH received")
);
test::msg_exchange broker_side;
broker_side
.expect(connect_no_auth)
.complete_with(success, after(0ms))
.reply_with(connack, after(1ms))
.send(auth_challenge, after(50ms))
.expect(disconnect);
run_test(
std::move(broker_side)
);
}
BOOST_FIXTURE_TEST_CASE(re_auth_without_authenticator, shared_test_data) {
auto connect_no_auth = encoders::encode_connect(
"", std::nullopt, std::nullopt, 10, false, {}, std::nullopt