Skip to content

Merge pull request #113 from ZettaScaleLabs/ci/add-workflow-dispatch #251

Merge pull request #113 from ZettaScaleLabs/ci/add-workflow-dispatch

Merge pull request #113 from ZettaScaleLabs/ci/add-workflow-dispatch #251

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
schedule:
- cron: "0 6 * * 1-5"
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: install zenoh-cpp
shell: bash
run: |
mkdir -p build_install && cd build_install
cmake ../install -DCMAKE_INSTALL_PREFIX=~/local
cmake --install .
- name: make examples
shell: bash
run: |
mkdir -p build && cd build
cmake ..
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 --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 tests
shell: bash
run: |
cd build
cmake --build . --target tests
- name: run tests
shell: bash
run: |
cd build
ctest
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
# Artifact name
name: zenoh-cpp-${{ matrix.os }}
# Directory containing files to upload
path: |
target/release/examples