From f9b78fdc7973885452e94aa87de1215d6251b665 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Thu, 14 Dec 2023 08:16:44 -0800 Subject: [PATCH] test building of the standalone project in github action --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87c5027e..7a46f6b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,40 +19,35 @@ jobs: steps: - uses: actions/checkout@v2 + with: + path: zenoh-cpp - name: install zenoh-cpp shell: bash run: | mkdir -p build_install && cd build_install - cmake ../install -DCMAKE_INSTALL_PREFIX=~/local + cmake ../zenoh-cpp/install -DCMAKE_INSTALL_PREFIX=~/local cmake --install . - name: make examples shell: bash run: | mkdir -p build && cd build - cmake .. + cmake ../zenoh-cpp cmake --build . --target examples - name: make examples with zenoh-cpp as subbroject shell: bash run: | mkdir -p build_examples_subproj && cd build_examples_subproj - cmake ../examples -DCMAKE_BUILD_TYPE=Debug + cmake ../zenoh-cpp/examples -DCMAKE_BUILD_TYPE=Debug cmake --build . --config Debug - name: make examples with zenoh-cpp as installed package shell: bash run: | mkdir -p build_examples_findproj && cd build_examples_findproj - cmake ../examples -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local -DZENOHCXX_SOURCE=PACKAGE - cmake --build . --config Release - - - name: make standalone example with zenoh-cpp as installed package - shell: bash - run: | - mkdir -p build_examples_standalone_findproj && cd build_examples_standalone_findproj - cmake ../examples/standalone -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local -DZENOHCXX_SOURCE=PACKAGE + cmake ../zenoh-cpp/examples -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local -DZENOHCXX_SOURCE=PACKAGE cmake --build . --config Release - name: make tests @@ -69,6 +64,28 @@ jobs: cd build ctest + # build zenoh-c and standalone project that needs zenoh-cpp and zenoh-c + # probably this belongs in a different action yaml + - name: get zenoh-c + uses: actions/checkout@v3 + with: + repository: eclipse-zenoh/zenoh-c + path: zenoh-c + + - name: install zenoh-c + shell: bash + run: | + mkdir -p zenohc_build_install && cd zenohc_build_install + cmake ../zenoh-c -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local + cmake --build . --target install --config Release + + - name: make standalone example with zenoh-cpp as installed package + shell: bash + run: | + mkdir -p build_examples_standalone_findproj && cd build_examples_standalone_findproj + cmake ../zenoh-cpp/examples/standalone -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local + cmake --build . --config Release + - name: Upload artifact uses: actions/upload-artifact@v2 with: