From 5cdba6273fa11d380aa7c005c42e8a72d84dd1b8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:44:32 +0200 Subject: [PATCH 1/8] Add call unified reusable workflow --- .github/workflows/ci-downstream.yml | 24 ++++++++++++++++++++++++ CMakeLists.txt | 4 ++++ CMakePresets.json | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 .github/workflows/ci-downstream.yml diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml new file mode 100644 index 00000000..623f4b10 --- /dev/null +++ b/.github/workflows/ci-downstream.yml @@ -0,0 +1,24 @@ +name: CI Downstream - MQTT Streaming + +on: + workflow_dispatch: + inputs: + opendaq-ref: + description: "openDAQ SDK commit, branch or tag" + required: false + default: "" + pull_request: + +jobs: + call-opendaq-reusable: + name: MQTT Streaming + uses: openDAQ/openDAQ-CI/.github/workflows/reusable.yml@jira/TBBAS-3031-reusable-ci + with: + opendaq-ref: ${{ github.event.inputs.opendaq-ref || '' }} + cmake-presets: > + [ + { + "configure-preset": "module", + "test-preset": "module-test" + } + ] diff --git a/CMakeLists.txt b/CMakeLists.txt index e8075729..50cd37ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,10 @@ option(${REPO_OPTION_PREFIX}_ENABLE_SSL "Enable building with openSSL" OFF) opendaq_common_compile_targets_settings() opendaq_setup_compiler_flags(${REPO_OPTION_PREFIX}) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10) + add_compile_options(-Wno-unknown-warning-option) +endif() + if (${REPO_OPTION_PREFIX}_ENABLE_TESTS) message(STATUS "Unit tests in ${REPO_NAME} are ENABLED") enable_testing() diff --git a/CMakePresets.json b/CMakePresets.json index 25d76765..6bc5cf45 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -178,6 +178,20 @@ "clang", "ninja" ] + }, + { + "name": "module", + "hidden": true, + "cacheVariables": { + "DAQMODULES_MQTT_ENABLE_TESTS": "ON" + } + } + ], + "testPresets": [ + { + "name": "module-test", + "hidden": true, + "configurePreset": "module" } ] } From c913cf1bba7ee5108f1a01e771975ce0ac00200d Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:44:32 +0200 Subject: [PATCH 2/8] Run test only for ubuntu --- .github/workflows/ci-downstream.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml index 623f4b10..0e7462bd 100644 --- a/.github/workflows/ci-downstream.yml +++ b/.github/workflows/ci-downstream.yml @@ -15,10 +15,20 @@ jobs: uses: openDAQ/openDAQ-CI/.github/workflows/reusable.yml@jira/TBBAS-3031-reusable-ci with: opendaq-ref: ${{ github.event.inputs.opendaq-ref || '' }} + packages: > + [ + { + "match-jobs": ["ubuntu-*"], + "apt-install": ["mosquitto"] + } + ] cmake-presets: > [ { - "configure-preset": "module", + "configure-preset": "module" + }, + { + "match-jobs": ["ubuntu-*"], "test-preset": "module-test" } ] From cdf54e894506f7e53f24d18d06448cd07fcc9006 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:44:32 +0200 Subject: [PATCH 3/8] Run mosquitto after install on Ubuntu --- .github/workflows/ci-downstream.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml index 0e7462bd..1b2a8967 100644 --- a/.github/workflows/ci-downstream.yml +++ b/.github/workflows/ci-downstream.yml @@ -19,7 +19,8 @@ jobs: [ { "match-jobs": ["ubuntu-*"], - "apt-install": ["mosquitto"] + "apt-install": ["mosquitto"], + "run": "mosquitto -d" } ] cmake-presets: > From 660b3cea7915c1cb6365a8b1f99c580672914ad3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:44:32 +0200 Subject: [PATCH 4/8] Investigate mosquitto tests on Windows --- .github/workflows/ci-downstream.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml index 1b2a8967..21a59540 100644 --- a/.github/workflows/ci-downstream.yml +++ b/.github/workflows/ci-downstream.yml @@ -21,15 +21,21 @@ jobs: "match-jobs": ["ubuntu-*"], "apt-install": ["mosquitto"], "run": "mosquitto -d" + }, + { + "match-jobs": ["windows-*"], + "choco-install": ["mosquitto"], + "run": "net start mosquitto" } ] cmake-presets: > [ { - "configure-preset": "module" + "configure-preset": "module", + "test-preset": "module-test" }, { - "match-jobs": ["ubuntu-*"], - "test-preset": "module-test" + "match-jobs": ["macos-*"], + "test-preset": "" } ] From d44bb3a4a534145c410780a7d98271fc0cf08daf Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:44:32 +0200 Subject: [PATCH 5/8] Install mosquitto via winget --- .github/workflows/ci-downstream.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml index 21a59540..d76b77c0 100644 --- a/.github/workflows/ci-downstream.yml +++ b/.github/workflows/ci-downstream.yml @@ -24,8 +24,7 @@ jobs: }, { "match-jobs": ["windows-*"], - "choco-install": ["mosquitto"], - "run": "net start mosquitto" + "run": "winget install --id EclipseFoundation.Mosquitto --accept-source-agreements --accept-package-agreements && net start mosquitto" } ] cmake-presets: > From 82a9acaee55df6b01a514c739f0c0f789e7199ef Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:44:32 +0200 Subject: [PATCH 6/8] Mosquitto is run by winget --- .github/workflows/ci-downstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml index d76b77c0..786addb1 100644 --- a/.github/workflows/ci-downstream.yml +++ b/.github/workflows/ci-downstream.yml @@ -24,7 +24,7 @@ jobs: }, { "match-jobs": ["windows-*"], - "run": "winget install --id EclipseFoundation.Mosquitto --accept-source-agreements --accept-package-agreements && net start mosquitto" + "run": "winget install --id EclipseFoundation.Mosquitto --accept-source-agreements --accept-package-agreements" } ] cmake-presets: > From c51d05d809bc465790cdcaac45105833e6973b92 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 18:08:28 +0200 Subject: [PATCH 7/8] Fix GCC-7 false unused compile time check --- modules/mqtt_streaming_module/tests/test_mqtt_publisher_fb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mqtt_streaming_module/tests/test_mqtt_publisher_fb.cpp b/modules/mqtt_streaming_module/tests/test_mqtt_publisher_fb.cpp index 028d5bc2..84c01c3c 100644 --- a/modules/mqtt_streaming_module/tests/test_mqtt_publisher_fb.cpp +++ b/modules/mqtt_streaming_module/tests/test_mqtt_publisher_fb.cpp @@ -451,7 +451,7 @@ class MqttPublisherFbHelper : public DaqTestHelper } template - static std::string valueToString(const vT& value, bool quoteString = true) + static std::string valueToString(const vT& value, [[maybe_unused]] bool quoteString = true) { std::string result; if constexpr (std::is_same_v) From d8d94c45be296c5e8543741391f44958a783419a Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:17:37 +0200 Subject: [PATCH 8/8] Add mosquitto for macOS --- .github/workflows/ci-downstream.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml index 786addb1..9907f257 100644 --- a/.github/workflows/ci-downstream.yml +++ b/.github/workflows/ci-downstream.yml @@ -24,7 +24,12 @@ jobs: }, { "match-jobs": ["windows-*"], - "run": "winget install --id EclipseFoundation.Mosquitto --accept-source-agreements --accept-package-agreements" + "winget-install": ["EclipseFoundation.Mosquitto"] + }, + { + "match-jobs": ["macos-*"], + "brew-install": ["mosquitto"], + "run": "$(brew --prefix mosquitto)/sbin/mosquitto -d" } ] cmake-presets: > @@ -32,9 +37,5 @@ jobs: { "configure-preset": "module", "test-preset": "module-test" - }, - { - "match-jobs": ["macos-*"], - "test-preset": "" } ]