From 794add16c3b45dd8ef6092c0f909c615dde78167 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Thu, 26 Mar 2026 23:40:23 +0100 Subject: [PATCH 1/6] Add a call of reusable modules CI workflow --- .github/workflows/module-ci.yml | 24 +++++++ CMakePresets.json | 111 ++++++++++++++++++++++++++++++++ opendaq_ref | 2 +- 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/module-ci.yml create mode 100644 CMakePresets.json diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml new file mode 100644 index 0000000..da98640 --- /dev/null +++ b/.github/workflows/module-ci.yml @@ -0,0 +1,24 @@ +name: Module CI + +on: + workflow_dispatch: + inputs: + opendaq-ref: + description: "openDAQ SDK commit, branch or tag" + required: false + default: "" + pull_request: + +jobs: + call-opendaq-modules-ci: + name: Call module CI + uses: openDAQ/actions/.github/workflows/reusable-module-ci.yml@jira/TBBAS-3013-resusable-workflow-ci-module + with: + opendaq-ref: ${{ github.event.inputs.opendaq-ref || '' }} + packages: > + [ + { + "preset-pattern": "ci-build-ubuntu-*", + "packages": {"apt": ["libpcap-dev"]} + } + ] diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..cbfa40f --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,111 @@ +{ + "version": 4, + "configurePresets": [ + { + "name": "ci", + "hidden": true, + "binaryDir": "build/${presetName}", + "cacheVariables": { + "ASAM_CMP_ENABLE_EXAMPLE": false + } + }, + { + "name": "ci-build-type-release", + "hidden": true, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "ci-build-type-debug", + "hidden": true, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "ci-build-ubuntu-latest-release", + "displayName": "CI Ubuntu Release", + "inherits": ["ci", "ci-build-type-release"], + "generator": "Ninja" + }, + { + "name": "ci-generator-msvc", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": "x64" + }, + { + "name": "ci-build-windows-latest-release", + "displayName": "CI Windows Release", + "inherits": ["ci", "ci-generator-msvc"] + }, + { + "name": "ci-build-ubuntu-latest-debug", + "displayName": "CI Ubuntu Debug", + "inherits": ["ci", "ci-build-type-debug"], + "generator": "Ninja" + }, + { + "name": "ci-build-windows-latest-debug", + "displayName": "CI Windows Debug", + "inherits": ["ci", "ci-generator-msvc"] + } + ], + "buildPresets": [ + { + "name": "ci-build-ubuntu-latest-release", + "configurePreset": "ci-build-ubuntu-latest-release", + "configuration": "Release" + }, + { + "name": "ci-build-windows-latest-release", + "configurePreset": "ci-build-windows-latest-release", + "configuration": "Release" + }, + { + "name": "ci-build-ubuntu-latest-debug", + "configurePreset": "ci-build-ubuntu-latest-debug", + "configuration": "Debug" + }, + { + "name": "ci-build-windows-latest-debug", + "configurePreset": "ci-build-windows-latest-debug", + "configuration": "Debug" + } + ], + "testPresets": [ + { + "name": "ci-test-ubuntu-latest-release", + "configurePreset": "ci-build-ubuntu-latest-release", + "configuration": "Release", + "output": { + "outputOnFailure": true + } + }, + { + "name": "ci-test-windows-latest-release", + "configurePreset": "ci-build-windows-latest-release", + "configuration": "Release", + "output": { + "outputOnFailure": true + } + }, + { + "name": "ci-test-ubuntu-latest-debug", + "configurePreset": "ci-build-ubuntu-latest-debug", + "configuration": "Debug", + "output": { + "outputOnFailure": true + } + }, + { + "name": "ci-test-windows-latest-debug", + "configurePreset": "ci-build-windows-latest-debug", + "configuration": "Debug", + "output": { + "outputOnFailure": true + } + } + ] +} diff --git a/opendaq_ref b/opendaq_ref index 88d050b..232eb11 100644 --- a/opendaq_ref +++ b/opendaq_ref @@ -1 +1 @@ -main \ No newline at end of file +c33debb93c33c950e80e2bc019dcc75172b58b3f \ No newline at end of file From bea8b94f14b5103e758870ca5a8c58c25b6b9072 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika Date: Mon, 30 Mar 2026 23:30:24 +0200 Subject: [PATCH 2/6] Adapt to centralized preset generation in reusable workflow --- .github/workflows/module-ci.yml | 3 +- CMakePresets.json | 97 +-------------------------------- 2 files changed, 5 insertions(+), 95 deletions(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index da98640..110178f 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -15,10 +15,11 @@ jobs: uses: openDAQ/actions/.github/workflows/reusable-module-ci.yml@jira/TBBAS-3013-resusable-workflow-ci-module with: opendaq-ref: ${{ github.event.inputs.opendaq-ref || '' }} + exclude-configs: '["macos-*"]' packages: > [ { - "preset-pattern": "ci-build-ubuntu-*", + "runners": ["ubuntu-*"], "packages": {"apt": ["libpcap-dev"]} } ] diff --git a/CMakePresets.json b/CMakePresets.json index cbfa40f..6df8dd7 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -2,107 +2,16 @@ "version": 4, "configurePresets": [ { - "name": "ci", - "hidden": true, - "binaryDir": "build/${presetName}", + "name": "module", "cacheVariables": { "ASAM_CMP_ENABLE_EXAMPLE": false } - }, - { - "name": "ci-build-type-release", - "hidden": true, - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release" - } - }, - { - "name": "ci-build-type-debug", - "hidden": true, - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" - } - }, - { - "name": "ci-build-ubuntu-latest-release", - "displayName": "CI Ubuntu Release", - "inherits": ["ci", "ci-build-type-release"], - "generator": "Ninja" - }, - { - "name": "ci-generator-msvc", - "hidden": true, - "generator": "Visual Studio 17 2022", - "architecture": "x64" - }, - { - "name": "ci-build-windows-latest-release", - "displayName": "CI Windows Release", - "inherits": ["ci", "ci-generator-msvc"] - }, - { - "name": "ci-build-ubuntu-latest-debug", - "displayName": "CI Ubuntu Debug", - "inherits": ["ci", "ci-build-type-debug"], - "generator": "Ninja" - }, - { - "name": "ci-build-windows-latest-debug", - "displayName": "CI Windows Debug", - "inherits": ["ci", "ci-generator-msvc"] - } - ], - "buildPresets": [ - { - "name": "ci-build-ubuntu-latest-release", - "configurePreset": "ci-build-ubuntu-latest-release", - "configuration": "Release" - }, - { - "name": "ci-build-windows-latest-release", - "configurePreset": "ci-build-windows-latest-release", - "configuration": "Release" - }, - { - "name": "ci-build-ubuntu-latest-debug", - "configurePreset": "ci-build-ubuntu-latest-debug", - "configuration": "Debug" - }, - { - "name": "ci-build-windows-latest-debug", - "configurePreset": "ci-build-windows-latest-debug", - "configuration": "Debug" } ], "testPresets": [ { - "name": "ci-test-ubuntu-latest-release", - "configurePreset": "ci-build-ubuntu-latest-release", - "configuration": "Release", - "output": { - "outputOnFailure": true - } - }, - { - "name": "ci-test-windows-latest-release", - "configurePreset": "ci-build-windows-latest-release", - "configuration": "Release", - "output": { - "outputOnFailure": true - } - }, - { - "name": "ci-test-ubuntu-latest-debug", - "configurePreset": "ci-build-ubuntu-latest-debug", - "configuration": "Debug", - "output": { - "outputOnFailure": true - } - }, - { - "name": "ci-test-windows-latest-debug", - "configurePreset": "ci-build-windows-latest-debug", - "configuration": "Debug", + "name": "module-test", + "configurePreset": "module", "output": { "outputOnFailure": true } From 458750bb3eb440dd7dc39d369c6097a5acf3eb11 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika Date: Tue, 31 Mar 2026 09:22:58 +0200 Subject: [PATCH 3/6] Add macOS runner config --- .github/workflows/module-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index 110178f..ae258eb 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -15,7 +15,6 @@ jobs: uses: openDAQ/actions/.github/workflows/reusable-module-ci.yml@jira/TBBAS-3013-resusable-workflow-ci-module with: opendaq-ref: ${{ github.event.inputs.opendaq-ref || '' }} - exclude-configs: '["macos-*"]' packages: > [ { From 8afd7cc933ac480835fad37c599819c350bb1b53 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika Date: Tue, 31 Mar 2026 19:27:26 +0200 Subject: [PATCH 4/6] Disable unknown warning option for Clang < 10 --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c8efcf..0e2b4ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,10 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 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") set(OPENDAQ_ENABLE_TEST_UTILS ON CACHE BOOL "Enable testing utils library") From ee925ef0c2aac31434703989e835c4cea894051c Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika Date: Wed, 1 Apr 2026 10:06:44 +0200 Subject: [PATCH 5/6] Restore opendaq_ref back to main --- opendaq_ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendaq_ref b/opendaq_ref index 232eb11..88d050b 100644 --- a/opendaq_ref +++ b/opendaq_ref @@ -1 +1 @@ -c33debb93c33c950e80e2bc019dcc75172b58b3f \ No newline at end of file +main \ No newline at end of file From 105a21c0dc7a15b97e739f0e450711cffab77e4e Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika Date: Wed, 1 Apr 2026 18:44:58 +0200 Subject: [PATCH 6/6] Fix test dependencies on Windows Debug --- modules/asam_cmp_capture_module/tests/CMakeLists.txt | 5 +++++ modules/asam_cmp_data_sink/tests/CMakeLists.txt | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/modules/asam_cmp_capture_module/tests/CMakeLists.txt b/modules/asam_cmp_capture_module/tests/CMakeLists.txt index b4a620a..e0ab703 100644 --- a/modules/asam_cmp_capture_module/tests/CMakeLists.txt +++ b/modules/asam_cmp_capture_module/tests/CMakeLists.txt @@ -33,6 +33,11 @@ target_link_libraries(${TEST_APP} PRIVATE ${OPENDAQ_SDK_TARGET_NAMESPACE}::opend asam_cmp_capture_module_lib ) +if (MSVC) + target_link_options(${TEST_APP} PRIVATE /DELAYLOAD:wpcap.dll /DELAYLOAD:packet.dll) + target_link_libraries(${TEST_APP} PRIVATE delayimp) +endif() + add_test(NAME ${TEST_APP} COMMAND $ ) diff --git a/modules/asam_cmp_data_sink/tests/CMakeLists.txt b/modules/asam_cmp_data_sink/tests/CMakeLists.txt index 37fc1fd..20d8c1a 100644 --- a/modules/asam_cmp_data_sink/tests/CMakeLists.txt +++ b/modules/asam_cmp_data_sink/tests/CMakeLists.txt @@ -24,6 +24,12 @@ target_link_libraries(${TEST_APP} PRIVATE ${OPENDAQ_SDK_TARGET_NAMESPACE}::opend asam_cmp_data_sink_lib ) +if (MSVC) + target_link_options(${TEST_APP} PRIVATE /DELAYLOAD:wpcap.dll /DELAYLOAD:packet.dll) + target_link_libraries(${TEST_APP} PRIVATE delayimp) +endif() + + add_test(NAME ${TEST_APP} COMMAND $ )