-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use OUT_DIR when building #18
Conversation
I was a little confused about what the actions was doing so I did a00c919 which I think was what was intended? |
I know the recommendation is the build script should place the output into
It should be saved in the cache?https://github.com/bitcoindevkit/bdk/blob/e80be49d1e75e907b6e91049b6a80cf9501c65d0/.github/workflows/cont_integration.yml#L98
I think the CI is right. Tests are launched both by using the feature or by using the |
Any change to this library will trigger it but not users of this library which is what matters. For me even changing the features back and forth did not require re-downloading anything.
See the PR which handles this using
Right but I am not using this crate from bdk and so don't have those magic lines in my ci to make it work. It would be better if we didn't have to add them. See https://github.com/LLFourn/gun/blob/master/.github/workflows/test.yml#L38 which works very effectively with this PR.
Ahh ok sorry I can see that what I did makes no sense now and why the BITCOIND_EXE does not point to the right place. I think the right thing to do is to just download bitcoind once to somewhere sensible and run the tests against that using |
Note also that CI is failing on master: https://github.com/LLFourn/bitcoind/actions/runs/1133912807 (this is just a fork of master). This PR should fix it but I thought I'd let you know. |
right, nice. However, there are still some advantages during development in using CARGO_HOME when doing
I see it works, but I am afraid it's not always granted since the doc says the contrary? see
Oh! I missed that, and I am not sure why since this https://github.com/RCasatta/bitcoind/actions/runs/1101263680 should be the same and worked. Do you know why this PR fixed it? Anyway, I am inclined to accept the PRs if it's more standard and helps downstream, just wanted to double-check everything. @LeoComandini I know you are using this crate, what do you think? |
.github/workflows/test.yml
Outdated
if: ${{ matrix.feature != '0_18_1' && matrix.feature != '0_18_0' && matrix.feature != '0_17_1' }} | ||
- run: VERSION_WITH_UNDERSCORE=${{ matrix.feature }} && echo "BITCOIND_EXE=../../../.cargo/bitcoin/bitcoin-${VERSION_WITH_UNDERSCORE//_/.}/bin/bitcoind" >> $GITHUB_ENV | ||
- uses: actions-rs/cargo@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove these lines for now, we may reintroduce the test with BITCOIND_EXE later on
There is a reference to CARGO_HOME in the Readme, could you please also update there? |
ACK with changes suggested by @RCasatta I agree it would be nice to keep downloaded bitcoind in CARGO_HOME, but it does seem to violate where |
Now that we output to OUTDIR it is annoying to test this as you would have to separately download a binary to somewhere.
Addressed the above comments. Thanks. CI seems be bugged on my branch (one of the macos jobs is stuck) but otherwise happy with this.
Yes using CARGO_HOME leads to less stuff being downloaded which is a definite plus. For me as a developer this is not important as things working as expected. At the end of the day you can just set
Right it's only set during compilation which is what we want. It embeds wherever the
I think by making sure certain directories exists before using it. |
Thanks! |
In build.rs you should only ever write to OUT_DIR. Currently we are writing to CARGO_HOME. This is annoying because using cache in CI seems to break this for me because that part of CARGO_HOME is not saved.
Probably same treatment needs to be applied to electrum crate too.