Repository navigation
ci(docker): pull the network test image from GHCR instead of building it - #126
Merged
Merged
Conversation
The IPv4 and IPv6 test jobs built the Docker image on every run, about 1m45s each, mostly installing cargo-llvm-cov from source. The Dockerfile now has an `env` stage with the test environment but no sources (pinned Rust, iproute2, llvm-tools, cargo-llvm-cov). CI publishes it to ghcr.io/rustlight/sacn/test-env, tagged with a hash of the Dockerfile and rust-toolchain.toml, and the jobs pull it; docker-linux/ci_image.sh builds and pushes it only when the tag is missing. Fork pull requests, which can't push packages, build it themselves. The default stage still bakes in the sources for local `docker run`, and now always includes cargo-llvm-cov, so the COVERAGE build argument is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVQfdzX3i2tYqceNyqr
stewartadam
force-pushed
the
claude/project-thread-6hb8tj
branch
from
November 26, 2026 10:14
42a5e1a to
2c3c255
Compare
stewartadam
enabled auto-merge (squash)
November 26, 2026 10:14
stewartadam
disabled auto-merge
November 26, 2026 10:18
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.
The IPv4 and IPv6 network test jobs built the Docker image on every run, about 1m45s of each job, mostly spent compiling cargo-llvm-cov and the tests inside the image (the baked-in test build wasn't even used, since CI runs the tests from the mounted checkout).
What changed
docker-linux/Dockerfilenow has two stages:env: the test environment without the sources: Rust at therust-toolchain.tomlversion, iproute2, llvm-tools and cargo-llvm-cov.envand adds the sources and test build, so localdocker build/docker runworks as before. It now always includes cargo-llvm-cov, so theCOVERAGEbuild argument is gone.envstage toghcr.io/rustlight/sacn/test-env, tagged withhashFiles('docker-linux/Dockerfile', 'rust-toolchain.toml'). The newdocker-linux/ci_image.shpulls that tag, and only when it's missing builds the image and pushes it. So the image is rebuilt only when the Dockerfile or the toolchain pin changes.packages: writeto push. Pull requests from forks only get a read token, so they build the image themselves (same as today) instead of pushing. A failed push is a warning, not a failure.CONTRIBUTING.mddescribes the published image and drops theCOVERAGE=1build.No new actions, so
actions.lockis unchanged; everything is plaindockercommands.After merging
The first run that pushes creates the
test-envpackage, private by default. Same-repo runs can pull it withGITHUB_TOKENeither way, but making it public (package settings → Change visibility) lets fork PRs and contributors pull it too instead of building.Testing
run_coverage.sh unitin theenvimage from a mounted checkout: pinned 1.100.0 toolchain, cargo-llvm-cov 0.9.1 and llvm-tools present, coverage report produced.ci_image.shwith no registry access: the pull fails and it falls back to building.Generated by Claude Code