Add some CI testing#27
Open
matte1 wants to merge 6 commits into
Open
Conversation
The miette diagnostics rendered into expect-test snapshots embed the absolute file path of each source span (canonicalized at proc-macro time). That made every snapshot fail on any machine whose workspace lived under a different prefix than the original author's. Strip the workspace-root prefix from rendered diagnostics before snapshot comparison, and re-record all affected snapshots with paths relative to the workspace root.
CI runs fmt-check, clippy (lenient), and the full workspace test suite on every push and PR to main, with the IceStorm FPGA toolchain (yosys, nextpnr-ice40, fpga-icestorm) installed via apt so the timing tests can run. The Justfile mirrors the same steps so they can be reproduced locally with `just ci`.
Mechanical pass to satisfy `cargo fmt --check` so CI's fmt step is green. No semantic changes.
Many tests cross-check Rust simulation against Verilog by shelling out to iverilog/vvp. Without it ~8 tests in `rhdl --test binding` (and similar) fail with "No such file or directory". The iverilog package provides both binaries.
- rhdl-vlog: import `syn::parse_quote` (was using `quote::quote`, which doesn't expose `parse_quote!`). - rhdl-core sim::iter::uniform: doctests referenced `rhdl_core::sim::uniform`; the module now lives at `sim::iter::uniform`. - rhdl-core circuit::fixture: the example used `#[kernel]` and `bind!`, both of which live above rhdl-core in the dep graph (rhdl-macro and rhdl). Mark this copy as `ignore` and point at the runnable version on `rhdl::prelude::bind`. - rhdl prelude: re-export `AsyncFunc` so the `bind!` doctest can call `AsyncFunc::new`. Replace the stale `fixture.io()` (now `io_dont_care()`) and wrap the body in a hidden Result-returning main so `?` works.
nextest runs test binaries in parallel; for this workspace it cuts end-to-end test time roughly in half. Doctests are still run via `cargo test --doc` since nextest doesn't handle them. Both CI and the local Justfile pick up the change via `just test` (nextest) and `just doctest`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generally just fixing up some tests that had hard coded paths and getting some test/ci infra in place.