Skip to content

add DeviceUsage and DeviceUsageKind for Instance.device_usage #1019

add DeviceUsage and DeviceUsageKind for Instance.device_usage

add DeviceUsage and DeviceUsageKind for Instance.device_usage #1019

Workflow file for this run

name: Check Rust
on:
push:
branches: [ main ]
paths:
- .github/workflows/check-rust.yml
- '**.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:
branches: [ main ]
paths:
- .github/workflows/check-rust.yml
- '**.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Rust install
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.68.1
components: clippy, rustfmt
- name: Install Linux requirements
run: |
apt_dependencies="git curl libssl-dev pkg-config libudev-dev libv4l-dev"
echo "Run apt update and apt install the following dependencies: $apt_dependencies"
sudo apt update
sudo apt install -y $apt_dependencies
- name: Check rust format
run: cargo fmt --all -- --check
- name: Check clippy
run: cargo clippy --all
- name: Check clippy for tests
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::derive_partial_eq_without_eq
- name: Run check
run: cargo check
- name: Check for H2 patch not being applied
run: |
cargo check >& h2-check.txt
cat h2-check.txt | grep "h2" | grep "was not used in the crate graph" | wc -l | grep 0
- name: Run tests
run: cargo test
- name: Run tests --ignored
run: cargo test -- --ignored
- name: Run doc
run: export RUSTDOCFLAGS="-Dwarnings" && cargo doc --no-deps