Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
strategy:
fail-fast: false
matrix:
msrv: ["1.85"]
msrv: ["1.88"]
name: ubuntu / ${{ matrix.msrv }}
steps:
- uses: actions/checkout@v4
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/device-driver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Verifies that src/device.rs stays in sync with the code generated from ina4230.toml.
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: device-driver-pregen-check
jobs:
device-driver-pregen-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with: { components: rustfmt }
- name: Install device-driver-cli
uses: baptiste0928/cargo-install@v3
with:
crate: device-driver-cli
- name: Generate device.rs from INA4230.toml
run: device-driver-cli --manifest INA4230.toml --device-name Device -o ci_gen.rs
- name: Format generated file
run: rustfmt --edition 2024 ci_gen.rs
- name: Check generated file matches committed src/device.rs
uses: LouisBrunner/diff-action@v3.0.0
with:
old: ci_gen.rs
new: src/device.rs
mode: strict
tolerance: same
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ target/

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
/target
Cargo.lock
/target
Cargo.lock
Loading
Loading