Skip to content

Test: build toolchain container image - #2

Closed
rkuester wants to merge 3 commits into
mainfrom
feat-build-image
Closed

Test: build toolchain container image#2
rkuester wants to merge 3 commits into
mainfrom
feat-build-image

Conversation

@rkuester

Copy link
Copy Markdown
Owner

Test run of the build toolchain container and CI workflow.

@rkuester
rkuester force-pushed the feat-build-image branch 2 times, most recently from b5ffe0c to ec9c3dc Compare March 10, 2026 22:19
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. Named volumes
cache the cargo registry and git checkouts across runs.
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 is cached as a tar archive via
actions/cache, keyed on the Containerfile content hash. On cache hit,
podman load restores the image and build-image skips the rebuild.
Cache the target/ directory via actions/cache, keyed on the toolchain
(Containerfile hash) and dependency lockfile. Project crate artifacts
are pruned after each run so only compiled dependencies are stored.
A restore-keys prefix allows partial cache hits when dependencies
change.
@rkuester rkuester closed this Mar 11, 2026
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