CI #317
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: ["**"] | |
pull_request: | |
branches: ["**"] | |
schedule: | |
- cron: "0 6 * * 1-5" | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- 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@v2 | |
with: | |
# Artifact name | |
name: zenoh-cpp-${{ matrix.os }} | |
# Directory containing files to upload | |
path: | | |
target/release/examples |