Skip to content

Commit

Permalink
test building of the standalone project in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasw committed Dec 14, 2023
1 parent 590483f commit f9b78fd
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit f9b78fd

Please sign in to comment.