ci: build e2e image via the production native-build path#934
Conversation
The e2e build job compiled oura from source inside Docker using the root Dockerfile, diverging from the image docker.yml actually publishes. Build the amd64 binary natively (rustup + setup-protoc + Swatinem cache) and assemble it with the shared .github/image/Dockerfile, so e2e exercises the production image. Reusing docker.yml's rust-cache shared-key lets e2e dispatches restore a warm cache instead of a cold from-source build. Stays workflow_dispatch-only; the test job is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe e2e workflow ChangesE2E CI: Explicit Rust Build and Docker Context Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Context
Follow-up to #933 (the new
docker.yml). The e2ebuildjob compiled oura from source inside Docker using the rootDockerfile, whiledocker.ymlbuilds the binary natively and assembles the thin.github/image/Dockerfile. So e2e was validating a different image from the one we actually publish, and paying a cold from-source build each dispatch.What this does
Refactors the e2e
buildjob to mirrordocker.yml's build path:cargo build --target x86_64-unknown-linux-gnu --all-features --locked --release(rustup honoringrust-toolchain.toml+arduino/setup-protoc)..github/image/bin/oura-Linux-amd64and builds withcontext: .github/image— the same runtime image production ships.Swatinem/rust-cachewithshared-key: docker-x86_64-unknown-linux-gnu, so e2e dispatches restore the warm cachedocker.ymlpopulates frommaininstead of compiling cold.Net effects:
cache-from/to: type=ghaDocker-layer cache is no longer needed and was removed).Scope
buildjob changed; thetestmatrix is untouched.workflow_dispatch-only — no trigger changes, not wired into the release.Caveat
On a branch dispatch with large dependency changes, the shared cache restores from
main, so a partial rebuild is still possible — same trade-off asdocker.ymlitself.🤖 Generated with Claude Code
Summary by CodeRabbit