Skip to content

ci: add initial CI pipeline#44

Merged
rkuester merged 4 commits into256foundation:mainfrom
rkuester:feat-initial-ci
Mar 11, 2026
Merged

ci: add initial CI pipeline#44
rkuester merged 4 commits into256foundation:mainfrom
rkuester:feat-initial-ci

Conversation

@rkuester
Copy link
Collaborator

@rkuester rkuester commented Mar 11, 2026

Add a containerized CI pipeline that runs fmt, clippy, and test on pushes to main and pull requests.

The justfile is the source of truth for what CI does. The GitHub Actions workflow is plumbing: checkout, cache, just ci. A contributor can run the same checks in the same container locally.

This is a first step, enough to require passing checks before merging. Future work (release automation, hardware-in-the-loop, etc.) can layer on top.

Derived in spirit from #13 by @jbride. The approach differs (build container from source, justfile as single source of truth, smaller initial scope) but the motivation is the same.

Separate from the CI commit so reverting CI doesn't accidentally
unignore .cache/, which may also be used by other tooling.
Add a Podman-based build toolchain image (build.Containerfile) with
pinned Rust compiler, rustfmt, clippy, and just. The base image is
pinned by digest for reproducibility.

The justfile gains two new recipes:
- build-image: builds the toolchain image, skipping if unchanged
- in-container: runs any just recipe inside the toolchain image

The image is tagged with a content hash of the Containerfile so
build-image can detect staleness without rebuilding. This is
necessary because podman save/load (used for CI caching) doesn't
preserve layer cache metadata, so podman build would rebuild from
scratch even with a loaded image. The content-hash tag lets
`podman image exists` skip the build entirely.

Downloaded crates are cached in .cache/ via bind mounts so they
persist between container runs and are accessible to CI caching.
Run `just ci` on pushes to main and pull requests. The justfile's ci
recipe delegates to `in-container "checks"`, keeping the workflow
minimal and the justfile as the single source of truth for what CI
does.

The build toolchain image and cargo caches (compiled dependencies
and downloaded crates) are cached between runs via actions/cache.
Project crate artifacts are pruned before the target cache saves so
only dependency objects are stored.
Update prerequisites to list just and optionally Podman. Replace
the raw cargo commands in "Making Changes" with `just checks`, and
add a "Reproducing CI locally" section explaining `just ci`.
@rkuester rkuester merged commit 7942a3d into 256foundation:main Mar 11, 2026
1 check 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.

1 participant