From da02bcc367130aec76490c30134a9e30690b0bd1 Mon Sep 17 00:00:00 2001 From: Siddharth Chandrasekaran Date: Sat, 23 Mar 2024 15:41:46 +0100 Subject: [PATCH] ci: Exclude cpp sample from all and build explicitly in build-ci Signed-off-by: Siddharth Chandrasekaran --- .github/workflows/build-ci.yml | 2 +- examples/cpp/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 2945dc8..587b7a5 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -22,7 +22,7 @@ jobs: - name: Configure run: cmake -DCMAKE_BUILD_TYPE=Debug . - name: Build - run: cmake --build . --parallel 7 + run: cmake --build . --parallel 7 --target all --target cpp_cp_sample --target cpp_pd_sample - name: Package run: cmake --build . --target package --target package_source - uses: actions/upload-artifact@v2 diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index bf3bd47..1f0e5be 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -20,5 +20,10 @@ set(PD_SAMPLE cpp_pd_sample) add_executable(${CP_SAMPLE} cp_app.cpp) add_executable(${PD_SAMPLE} pd_app.cpp) +# CPP sample does not build in some old compilers and causes relase checks to +# fail. So let's exclude this from all for now; CI will still test this target. +set_target_properties(${CP_SAMPLE} PROPERTIES EXCLUDE_FROM_ALL TRUE) +set_target_properties(${PD_SAMPLE} PROPERTIES EXCLUDE_FROM_ALL TRUE) + target_link_libraries(${CP_SAMPLE} PRIVATE $,osdp,osdpstatic>) target_link_libraries(${PD_SAMPLE} PRIVATE $,osdp,osdpstatic>) \ No newline at end of file