Update CMakeLists.txt #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: ["**"] | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Conan | |
id: conan | |
uses: turtlebrowser/get-conan@main | |
- name: Conan version | |
run: echo "${{ steps.conan.outputs.version }}" | |
- name: Create default Conan profile | |
run: conan profile detect | |
- name: Install Rust toolchain | |
run: rustup component add rustfmt clippy | |
- name: Create up-cpp Conan package | |
shell: bash | |
run: | | |
git clone https://github.com/MelamudMichael/up-cpp.git | |
cd up-cpp | |
git submodule update --init --recursive | |
conan create . --build=missing | |
- name: Build and install Zenoh-C | |
shell: bash | |
run: | | |
git clone https://github.com/eclipse-zenoh/zenoh-c.git | |
cd zenoh-c && mkdir -p build && cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local | |
cmake --build . --target install --config Release -- -j | |
- name: Create up-client-zenoh-cpp Conan package | |
shell: bash | |
run: | | |
export CMAKE_PREFIX_PATH="$HOME/local" | |
export CMAKE_ZENOH_INCLUDE_PATH="$HOME/local/include" | |
git clone https://github.com/MelamudMichael/up-client-zenoh-cpp.git | |
cd up-client-zenoh-cpp | |
conan create . | |
- name: Build up-zenoh-example-cpp | |
shell: bash | |
run: | | |
export CMAKE_ZENOH_INCLUDE_PATH="$HOME/local/include" | |
mkdir build | |
cd build | |
conan install .. | |
cmake -S .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
# NOTE: In GitHub repository settings, the "Require status checks to pass | |
# before merging" branch protection rule ensures that commits are only merged | |
# from branches where specific status checks have passed. These checks are | |
# specified manually as a list of workflow job names. Thus we use this extra | |
# job to signal whether all CI checks have passed. | |
ci: | |
name: CI status checks | |
runs-on: ubuntu-latest | |
needs: build | |
if: always() | |
steps: | |
- name: Check whether all jobs pass! | |
run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' |