Merge branch 'master' into release-0.10.0-rc #1253
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, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
components: rustfmt, clippy | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all --examples --features=logger-autoinit --features=shared-memory -- -D warnings | |
- name: Run rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
- name: build and install | |
shell: bash | |
run: | | |
mkdir -p build && cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local | |
cmake --build . --target install --config Release | |
- name: run cmake tests with zenoh-c as dynamic library | |
shell: bash | |
run: | | |
cd build | |
cmake .. -DZENOHC_BUILD_TESTS_WITH_STATIC_LIB=FALSE -DCMAKE_BUILD_TYPE=Release | |
cmake --build . --target tests --config Release | |
ctest -C Release --output-on-failure -E z_api_alignment_test | |
- name: run cmake tests with zenoh-c as static library | |
shell: bash | |
run: | | |
cd build | |
cmake .. -DZENOHC_BUILD_TESTS_WITH_STATIC_LIB=TRUE -DCMAKE_BUILD_TYPE=Release | |
cmake --build . --target tests --config Release | |
ctest -C Release --output-on-failure -E z_api_alignment_test | |
- name: make examples with zenoh-c | |
shell: bash | |
run: | | |
cd build | |
cmake --build . --target examples | |
- name: make examples with zenoh-c as subbroject and static library and in debug mode | |
shell: bash | |
run: | | |
mkdir -p build_examples_subproj && cd build_examples_subproj | |
cmake ../examples -DCMAKE_BUILD_TYPE=Debug -DZENOHC_BUILD_EXAMPLES_WITH_STATIC_LIB=TRUE | |
cmake --build . --config Debug | |
- name: make examples with zenoh-c 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 -DZENOHC_SOURCE=PACKAGE | |
cmake --build . --config Release | |
- name: Run rust tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose --release --features=logger-autoinit --features=shared-memory | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
# Artifact name | |
name: zenoh-c-${{ matrix.os }} | |
# Directory containing files to upload | |
path: | | |
target/release | |
!target/release/build | |
!target/release/deps | |
!target/release/.* | |
!target/release/*.d |