docs: add newline to docs (#64) #5
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: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
format: | |
name: Check code format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- run: rustup component add rustfmt | |
- run: cargo fmt --all -- --check | |
# Use the `runtime-linking` feature here to avoid requiring an OpenVINO installation to be | |
# present when building. | |
- run: cargo clippy --features runtime-linking | |
- run: cd crates/openvino-tensor-converter && cargo fmt --all -- --check | |
rust_dependencies: | |
name: Check Rust dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
# Build and test from an existing OpenVINO installation inside a Docker image (i.e. download the | |
# binaries, then compile against these). | |
dynamic_binaries: | |
name: From binaries | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu18, ubuntu20] | |
version: [2022.1.0, 2022.2.0, 2022.3.0] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Build the Docker image | |
run: docker build . --tag openvino-rs:${{ matrix.OS }}-${{ matrix.version }}-$(date +%s) --build-arg OS=${{ matrix.os }} --build-arg VERSION=${{ matrix.version }} | |
# Build and test from an existing OpenVINO installation from an archive installed on the | |
# filesystem. | |
runtime_binaries: | |
name: From runtime-linked binaries | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- uses: abrown/install-openvino-action@v6 | |
with: | |
apt: true | |
- name: Build and run tests | |
run: cargo test --features openvino-sys/runtime-linking | |
# Check that the documentation builds. | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
lfs: true | |
- name: Build documentation | |
run: cargo doc --no-deps --features openvino-sys/runtime-linking | |
# Build and test the openvino-tensor-converter tool separately from the regular library builds; | |
# the OpenCV dependency is a bit fragile so the crate is not included by the default workspace | |
# commands. | |
converter: | |
name: Converter tool | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: crates/openvino-tensor-converter | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install OpenCV | |
run: sudo apt update && sudo apt install libclang-dev libopencv-dev libopencv-core4.2 | |
- name: Build | |
run: cargo build -v | |
- name: test | |
run: cargo test -v | |
# Re-generate the openvino-sys bindings and check if anything has changed. A failure in this step | |
# indicates that we need to decide wether to commit the changes from `cargo xtask codegen`. | |
codegen: | |
name: Generate openvino-sys bindings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Generate bindings | |
run: cargo xtask codegen | |
- name: Verify no changes | |
run: git diff --ignore-submodules --no-ext-diff --name-only --exit-code |