Code Monkey home page Code Monkey logo

Comments (5)

shesek avatar shesek commented on June 8, 2024 1

Currently the CI downloads and runs the full node but that's pretty slow, we could make docker containers with everything preinstalled for it.

You could also consider using the cache action to persist the downloaded files across CI builds.

Or you could combine the approaches, build the docker environment image as part of the CI process and cache it. I did something similar for bwt [0] which may be useful (with travis, but some parts are still relevant).

Some advantages of this approach: (1) the CI script is more self-contained that way, it will include the full build process without depending on any prior setup. (2) the build environment is guaranteed to be in-sync with the git commit being tested (and the Dockerfile for the build environment checked into it), without having to separately update the docker environment image. (3) people that want to run the CI on their own won't be using an online docker image blob that's difficult to audit.

[0] Note that I linked to an older .travis.yml file that I used in the past, I eventually ended up changing it and not keeping the cache across different builds to make the reproducible builds more reliable, at the cost of slower builds.

from bdk.

tiero avatar tiero commented on June 8, 2024

just FYI if you are interested in running nigiri in CI pipelines such as Travis or Github Action, you can do with a template like this that basically strip put Esplora front-end and the nigiri CLI, but you can access chopsticks REST endpoints like faucet or the enhanced /tx which automatically generate a block when a tx hex is broadcast-ed.

I can look it up if you need help.

or GH Action

from bdk.

afilini avatar afilini commented on June 8, 2024

I think this issue is actually a bit outdated, @notmandatory added a docker image for electrs a while back so that we don't have to download everything at every run, this is the commit 98803b2

The issue remains valid though, because we are still not testing the Esplora and CompactFilters backends.. just the thing about downloading core every time is not true anymore.

from bdk.

shesek avatar shesek commented on June 8, 2024

@afilini I see. But it is still currently the case that the CI script is not self-contained and requires prior setup, so this could benefit from my suggestion. (In fact, I can't seem to find the Dockerfile for bitcoindevkit/electrs anywhere -- how does that get built?)

from bdk.

notmandatory avatar notmandatory commented on June 8, 2024

@shesek the bitcoindevkit/electrs image is built from the bitcoindevkit/bitcoin-regtest-box project. For now I've just built and published the image (and one called bitcoindevkit/bitcoind) manually. In the future we could automate building and publishing these docker images with a GitHub actions workflow.

Also our current bdk ci workflow is caching cargo artifacts so the builds are pretty fast.

from bdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.