fix: auto-detect CMake vs autotools for warnet image build#801
fix: auto-detect CMake vs autotools for warnet image build#801b-l-u-e wants to merge 2 commits intobitcoin-dev-project:mainfrom
Conversation
|
rebased on main and tweaked a few things: https://github.com/pinheadmz/warnet/tree/fix/769-warnet-image-build-cmake-autotools If you allow maintainers to edit your branch I can just push my suggestions |
| Probes the GitHub raw content URL for CMakeLists.txt at the given commit. | ||
| Returns 'cmake' if found, 'autotools' otherwise. | ||
| """ | ||
| url = f"https://raw.githubusercontent.com/{repo}/{commit_sha}/CMakeLists.txt" |
There was a problem hiding this comment.
I dont think this works. did you test it? provide examples please
|
5247c69 to
59ad685
Compare
|
okay thanks, pushing my changes. I still think the URL to check for cmakelists is wrong, my local testing always falls back to autotools |
let me recheck on this again |
59ad685 to
96ddf6b
Compare
|
I re-tested and tightened the behavior is explicit.
verified
|
Signed-off-by: b-l-u-e <8102260+blue@users.noreply.github.com>
96ddf6b to
9710f90
Compare
|
add berkeley db to the legacy (autotools) builds and made our addrman / isroutable hacks optional |
|
Seems to work with tags but not actual commits. Sorry thats my fault, introduced very recently in #804 This one is wrong: but this worked which is great: and |
9710f90 to
8f6b2d5
Compare
Signed-off-by: b-l-u-e <8102260+blue@users.noreply.github.com>
8f6b2d5 to
e07c5e7
Compare
thanks for the review updated the detection now missing or invalid ref fails instead of selecting autotools |
|
noticed the doc is stale for ruff version: warnet/docs/developer-notes.md Lines 37 to 43 in aedca69 https://github.com/bitcoin-dev-project/warnet/actions/runs/24909352604/job/72946772048?pr=801 |
warnet image buildnow chooses the Bitcoin Core build path automatically:CMakeLists.txtexists at the given ref onraw.githubusercontent.com-Dockerfile.cmakeand default CMakeBUILD_ARGS.Dockerfile.autotoolsand default autotoolsBUILD_ARGS.Users can still override with
--build-args.docker-bake.hcland the Docker bake section fromdocs/developer-notes.mdin favor of on-the-fly builds via the CLI.Dockerfiles
Dockerfile→Dockerfile.autotools,Dockerfile.dev-Dockerfile.cmake.git fetch, usegit checkout FETCH_HEADso tags (e.g.v26.0) work (Dockerfile.cmake,Dockerfile.autotools,insecure/Dockerfile).alpine:3.20; set Berkeley DBLDFLAGS/CPPFLAGSonly when/opt/db-*exists.Testing
warnet image buildwithbitcoin/bitcoin,--commit-sha master(cmake) andv26.0(autotools),--arches amd64,--action loadboth produced loadable images locally.This Closes #769.