Skip to content

ci: add GitHub Actions workflow (test, clippy, release build) - #39

Merged
alexis900 merged 2 commits into
mainfrom
ci/github-actions
Oct 11, 2026
Merged

alexis900 merged 2 commits into
mainfrom
ci/github-actions

Conversation

@alexis900

Copy link
Copy Markdown
Contributor

Closes #38 (IMP-15).

Summary

First CI for the neodev crate itself. Three jobs on ubuntu-latest, stable Rust, Swatinem/rust-cache:

Job Command
Test cargo test --locked
Clippy cargo clippy --all-targets --locked -- -D warnings
Build (release) cargo build --release --locked

Triggers: PRs to main, pushes to main. permissions: contents: read and a cancel-in-progress concurrency group.

Verified locally

cargo build --locked                              OK       0 warnings
cargo test --locked                               33 passed, 0 failed, 1 ignored
cargo clippy --all-targets --locked -- -D warnings  OK
cargo build --release --locked                    OK

The 5 clippy warnings that would have broken the new gate are fixed:

  • unused std::time::UNIX_EPOCH import (vmm/vbox.rs)
  • manual div_ceil → len().div_ceil(REGIONS_PER_NODE) (image.rs)
  • needless borrow → std::fs::read_dir(root) (image.rs)
  • needless range loop → nodes.iter().take(chunks.len()) (image.rs test)
  • complex tuple type → FreeRegion / FreelistPlan type aliases (image.rs)

Not gated yet

Notes

  • CONTRIBUTING.md says to branch and open PRs against develop, but the repository's branch is main. Left untouched here (docs drift); happy to fix it separately.
  • No workflow existed before this PR, so this run is also the first execution of the new CI.

Adds CI for the neodev crate itself:

- Test:   cargo test --locked
- Clippy: cargo clippy --all-targets --locked -- -D warnings
- Build:  cargo build --release --locked

Also fixes the five clippy warnings that would have failed the new gate:
unused UNIX_EPOCH import, manual div_ceil, needless borrow, needless range
loop, and a complex tuple type in image.rs factored into FreeRegion /
FreelistPlan aliases.

cargo fmt --check is not gated yet: 262 diff hunks need their own sweep.

Closes #38
test_detect_returns_real_ethernet asserted `selected != "eth0"`, which fails
on hosts where the live interface is itself named eth0 -- GitHub Actions
runners included. The CI added in this PR caught it on its first run.

Assert instead that detection picks one of the live interfaces the test
found (mirroring detect_bridge_interface's exclusions), which is what the
test actually means.

Refs #38
@alexis900
alexis900 merged commit 1e5eb2d into main Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci] Add GitHub Actions CI: build, test and clippy

1 participant