Skip to content

cmake, ci: Migrate "test-each-commit" task#288

Merged
hebasto merged 1 commit into
cmake-stagingfrom
240726-cmake-HR
Jul 29, 2024
Merged

cmake, ci: Migrate "test-each-commit" task#288
hebasto merged 1 commit into
cmake-stagingfrom
240726-cmake-HR

Conversation

@hebasto
Copy link
Copy Markdown
Owner

@hebasto hebasto commented Jul 26, 2024

@hebasto hebasto force-pushed the 240726-cmake-HR branch 3 times, most recently from fed140c to 37e2b42 Compare July 26, 2024 21:17
@hebasto hebasto added bug Something isn't working tests Tests, benchmarks, fuzzing, CI etc labels Jul 26, 2024
@hebasto hebasto marked this pull request as ready for review July 26, 2024 21:18
@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 26, 2024

Friendly ping @maflcko :)

@m3dwards
Copy link
Copy Markdown

m3dwards commented Jul 29, 2024

Do you need to explicitly disable Berkeley DB? Doesn't it default to off anyway? Also related, do we need to still install libdb++-dev?

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 29, 2024

@m3dwards

Do you need to explicitly disable Berkeley DB? Doesn't it default to off anyway?

Yes we do. We use the ci-linux preset, which defines:

"WITH_BDB": "ON",

Hence, the command line -DWITH_BDB=OFF overrides it to follow the master branch behavior, which can be observed, for instance, here:

 Options used to compile and link:
  external signer = yes
  multiprocess    = no
  with wallet     = yes
    with sqlite   = yes
    with bdb      = no
...

Also related, do we need to still install libdb++-dev?

It seems you found an inconsistency in the master branch. It should either pass the --with-incompatible-bdb configure option or skip installing libdb++-dev.

Want to submit a PR to the main repository?

@m3dwards
Copy link
Copy Markdown

Yes we do. We use the ci-linux preset, which defines

Of course, makes sense.

It seems you found an inconsistency in the master branch. It should either pass the --with-incompatible-bdb configure option or skip installing libdb++-dev.

Want to submit a PR to the main repository?

Sure

@m3dwards
Copy link
Copy Markdown

I compared the configure step output of the CI run linked in the PR description with a random run in the main repository and I couldn't find any differences.

ACK 37e2b42

Copy link
Copy Markdown

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, seems fine to merge, but I left a few questions

Comment thread .github/workflows/ci.yml Outdated
# Run tests on commits after the last merge commit and before the PR head commit
# Use clang++, because it is a bit faster and uses less memory than g++
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang CXX=clang++ ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build --preset ci-linux -DBUILD_GUI=ON -DWITH_BDB=OFF -DWITH_ZMQ=OFF -DWITH_QRENCODE=ON -DWERROR=OFF && cmake --build build -j $(nproc) && ctest --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of using ci-linux here, when most settings are overridden anyway? Would it not be better to just list each setting here explicitly?

Also, what it the point of ci-common and ci-linux at all? All CI tasks are highly orthogonal, so creating the impression that the is common stuff among them seems odd?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, what it the point of ci-common and ci-linux at all? All CI tasks are highly orthogonal, so creating the impression that the is common stuff among them seems odd?

In the past, these presets seemed useful for .github/workflows/cmake.yml, which is not a part of bitcoin#30454 though.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'd say that it may be best to remove CI-only code no longer used for now from 30454. Given that CI presets are exposed to real devs and real users, it may otherwise be confusing at best, no?

(No objection to keep them in a separate commit in a testing branch, if you find them useful, but not sure about adding them to 30454)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'd say that it may be best to remove CI-only code no longer used for now from 30454.

I'll do it during the next PR30454 branch update.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of using ci-linux here, when most settings are overridden anyway? Would it not be better to just list each setting here explicitly?

Done in the recent push.

@m3dwards
Copy link
Copy Markdown

It should either pass the --with-incompatible-bdb configure option or skip installing libdb++-dev.

I would say the more conservative approach is to enable bdb in CI rather than skipping the installation which if accepted on master would imply enabling it here too. Perhaps as an update if this gets merged.

@hebasto hebasto marked this pull request as draft July 29, 2024 11:39
Migrate the "test-each-commit" task
@hebasto hebasto marked this pull request as ready for review July 29, 2024 11:54
@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 29, 2024

Addressed @maflcko's comment.

Included changes from bitcoin#30542.

@m3dwards
Copy link
Copy Markdown

@hebasto do you have a CI log I could take a quick scan of that has run the "test each commit" task?

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 29, 2024

@hebasto do you have a CI log I could take a quick scan of that has run the "test each commit" task?

I'll push a dummy commit.

Comment thread .github/workflows/ci.yml Outdated
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.


Copy link
Copy Markdown

@maflcko maflcko Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit can be empty

(This way it can be merged, but it will be dropped on the next rebase/squash by itself)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! I forgot about --allow-empty option :)

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 29, 2024

@hebasto do you have a CI log I could take a quick scan of that has run the "test each commit" task?

I'll push a dummy commit.

https://github.com/hebasto/bitcoin/actions/runs/10144199347/job/28047196932

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 29, 2024

@hebasto do you have a CI log I could take a quick scan of that has run the "test each commit" task?

I'll push a dummy commit.

https://github.com/hebasto/bitcoin/actions/runs/10144199347/job/28047196932

Reverted back and ready for re-reviewing.

@m3dwards
Copy link
Copy Markdown

reACK 5ecbd3f

@hebasto hebasto merged commit b29a18c into cmake-staging Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tests Tests, benchmarks, fuzzing, CI etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants