update CI and docs settings
This commit is contained in:
parent
88270085c9
commit
aab40bc027
2
.github/bors.toml
vendored
2
.github/bors.toml
vendored
@ -1,2 +0,0 @@
|
|||||||
status = ["ci"]
|
|
||||||
delete_merged_branches = true
|
|
87
.github/workflows/ci.yml
vendored
87
.github/workflows/ci.yml
vendored
@ -1,43 +1,72 @@
|
|||||||
on: push
|
|
||||||
|
|
||||||
name: ci
|
name: ci
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
name: Check build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: cargo check --release
|
||||||
|
|
||||||
|
cross-check:
|
||||||
|
name: Check Cross-Compilation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu
|
|
||||||
- thumbv6m-none-eabi
|
|
||||||
- armv7-unknown-linux-gnueabihf
|
- armv7-unknown-linux-gnueabihf
|
||||||
- thumbv7em-none-eabihf
|
- thumbv7em-none-eabihf
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
targets: "armv7-unknown-linux-gnueabihf, thumbv7em-none-eabihf"
|
||||||
toolchain: ${{ matrix.rust }}
|
- run: cargo check --release --target=${{matrix.target}} --no-default-features
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
check:
|
||||||
with:
|
test:
|
||||||
use-cross: true
|
name: Run Tests
|
||||||
command: check
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Install nextest
|
||||||
|
uses: taiki-e/install-action@nextest
|
||||||
|
- run: cargo nextest run --all-features
|
||||||
|
- run: cargo test --doc
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
msrv:
|
||||||
with:
|
name: Check MSRV
|
||||||
command: fmt
|
runs-on: ubuntu-latest
|
||||||
args: --all -- --check
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@1.68.2
|
||||||
|
- run: cargo check --release
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
fmt:
|
||||||
with:
|
name: Check formatting
|
||||||
use-cross: true
|
runs-on: ubuntu-latest
|
||||||
command: clippy
|
steps:
|
||||||
args: -- -D warnings
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
docs:
|
||||||
|
name: Check Documentation Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
- run: cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]'
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: cargo clippy -- -D warnings
|
||||||
|
@ -15,3 +15,7 @@ categories = ["embedded", "no-std", "hardware-support"]
|
|||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
nb = "1"
|
nb = "1"
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"]
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
//! You can find an example application [here](https://egit.irs.uni-stuttgart.de/rust/vorago-reb1/src/branch/main/examples/max11619-adc.rs)
|
//! You can find an example application [here](https://egit.irs.uni-stuttgart.de/rust/vorago-reb1/src/branch/main/examples/max11619-adc.rs)
|
||||||
//! using a [thin abstraction layer](https://egit.irs.uni-stuttgart.de/rust/vorago-reb1/src/branch/main/src/max11619.rs)
|
//! using a [thin abstraction layer](https://egit.irs.uni-stuttgart.de/rust/vorago-reb1/src/branch/main/src/max11619.rs)
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
|
||||||
use core::convert::Infallible;
|
use core::convert::Infallible;
|
||||||
use core::{marker::PhantomData, slice::IterMut};
|
use core::{marker::PhantomData, slice::IterMut};
|
||||||
use embedded_hal::delay::DelayNs;
|
use embedded_hal::delay::DelayNs;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user