Skip to content

docs: add AGENTS.md and model-selection guidance #15

docs: add AGENTS.md and model-selection guidance

docs: add AGENTS.md and model-selection guidance #15

Workflow file for this run

# This workflow verifies that `src/device.rs` stays in sync with code generated by `device-driver-cli`.
# It regenerates the device driver from `bq25723.yaml` and checks that the generated output matches
# the committed `src/device.rs`. See check.yml for information about concurrency cancellation and
# workflow triggering behavior, which this workflow shares.
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
name: device-driver-pregen-check
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with: { components: rustfmt }
- name: Install device-driver-cli from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: device-driver-cli
- name: Generate files
run: device-driver-cli --manifest bq25723.yaml --device-name Device -o ci_gen.rs
- name: Format generated file
run: rustfmt --edition 2024 ci_gen.rs
- name: Check that the files are the exact same
uses: LouisBrunner/diff-action@v3.0.0
with:
old: ci_gen.rs
new: src/device.rs
mode: strict
tolerance: same