Skip to content

Replace variadic arguments with fixed #383

Replace variadic arguments with fixed

Replace variadic arguments with fixed #383

Workflow file for this run

name: CI
permissions: read-all
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
# Build and test the bindings using an existing OpenVINO installation.
test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
# TODO: macos-latest cannot yet be included in the list because a dependency cannot be
# found ("dyld: Library not loaded; '@rpath/libopenvino.2310.dylib'"). See
# https://github.com/abrown/openvino-rs/actions/runs/6423141936/job/17441022932#step:7:154
os: [ubuntu-20.04, ubuntu-22.04, windows-latest]
version: [2023.2.0, 2024.0.0, 2024.1.0]
apt: [false]
# We also spot-check that things work when installing from APT by adding to the matrix: see
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
# APT install and check latest supported version 2024.1.0
include:
- os: ubuntu-22.04
version: 2024.1.0
apt: true
env:
RUST_LOG: debug
RUST_BACKTRACE: 1
steps:
- name: Enable long paths
run: git config --global core.longpaths true
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- uses: abrown/install-openvino-action@v8
with:
version: ${{ matrix.version }}
apt: ${{ matrix.apt }}
- name: List files
run: find $OPENVINO_INSTALL_DIR
shell: bash
# First, check that we can find the OpenVINO libraries; this is a canary to find any library
# issues early (even if we duplicate some tests). If we run the tests in order, other tests will
# short-circuit the test run and logging may not be turned on (as it is in the "find a library"
# tests) for troubleshooting.
- name: Check openvino-finder
run: cargo test --package openvino-finder
# Now, run the dynamic-linking tests: this assumes the OpenVINO library is "findable" on the
# path and Cargo links the binary to it in the `build.rs` script.
- name: Check dynamic linking
run: cargo test
# Finally, run the runtime-linking tests: the binddings do not link at build time, instead
# as the tests are run.
- name: Check runtime linking
run: cargo test --features openvino-sys/runtime-linking
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
docs:
name: Check documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
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: Check converter tool
runs-on: ubuntu-20.04
defaults:
run:
working-directory: crates/openvino-tensor-converter
steps:
- uses: actions/checkout@v2
with:
submodules: true
- 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