diff --git a/.github/workflows/ci-downstream.yml b/.github/workflows/ci-downstream.yml new file mode 100644 index 00000000..9907f257 --- /dev/null +++ b/.github/workflows/ci-downstream.yml @@ -0,0 +1,41 @@ +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 || '' }} + packages: > + [ + { + "match-jobs": ["ubuntu-*"], + "apt-install": ["mosquitto"], + "run": "mosquitto -d" + }, + { + "match-jobs": ["windows-*"], + "winget-install": ["EclipseFoundation.Mosquitto"] + }, + { + "match-jobs": ["macos-*"], + "brew-install": ["mosquitto"], + "run": "$(brew --prefix mosquitto)/sbin/mosquitto -d" + } + ] + 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" } ] } 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)