ci: Avoid cd into build dir #32880

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2507-ci-less-cd changing 1 files +33 −8
  1. maflcko commented at 1:08 pm on July 5, 2025: member

    Changing into the build dir is confusing and brittle, because the following commands implicitly assume it. So they could break on unrelated changes.

    The changes are required for stuff like:

    So remove the cd and just make the build dir explicit.

  2. DrahtBot added the label Tests on Jul 5, 2025
  3. DrahtBot commented at 1:08 pm on July 5, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32880.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32953 ([POC] ci: Skip compilation when running static code analysis by hebasto)
    • #31349 (ci: detect outbound internet traffic generated while running tests by vasild)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. maflcko force-pushed on Jul 5, 2025
  5. DrahtBot added the label CI failed on Jul 5, 2025
  6. DrahtBot removed the label CI failed on Jul 5, 2025
  7. in ci/test/03_test_script.sh:127 in faeae97b7f outdated
    126 
    127-bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")) && false)"
    128+bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")) && false)"
    129 
    130-bash -c "cmake --build . $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build . --target all "$GOAL" --verbose ; false )
    131+bash -c "cmake --build ${BASE_BUILD_DIR} $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build . --target all "$GOAL" --verbose ; false )
    


    hebasto commented at 1:49 pm on July 10, 2025:
    0bash -c "cmake --build ${BASE_BUILD_DIR} $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build "${BASE_BUILD_DIR}" --target all "$GOAL" --verbose ; false )
    

    maflcko commented at 2:22 pm on July 10, 2025:
    nice catch, fixed. Also, removed the bash -c, because if it was needed, the fallback code would be broken

    maflcko commented at 2:39 pm on July 10, 2025:

    yeah, the fallback was missing -j1 (required after ninja) and had a wordsplitting bug, due to the use of Bash :(

    Fixed those as well.

  8. hebasto commented at 1:50 pm on July 10, 2025: member
    Concept ACK.
  9. maflcko force-pushed on Jul 10, 2025
  10. maflcko force-pushed on Jul 10, 2025
  11. DrahtBot added the label CI failed on Jul 10, 2025
  12. DrahtBot commented at 2:37 pm on July 10, 2025: contributor

    🚧 At least one of the CI tasks failed. Task lint: https://github.com/bitcoin/bitcoin/runs/45728542136 LLM reason (✨ experimental): The CI failure is caused by errors in the linting step, specifically from shellcheck and spelling checks.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  13. ci: Avoid cd into build dir
    Changing into the build dir is confusing and brittle.
    
    This can be reviewed using the git option `--word-diff-regex=.`.
    
    Also:
    * add missing -j1 to the fallback that prints a verbose build failure
    * remove quotes around $GOAL in the fallback
    fad191ff48
  14. maflcko force-pushed on Jul 10, 2025
  15. DrahtBot removed the label CI failed on Jul 10, 2025
  16. hebasto approved
  17. hebasto commented at 8:59 am on July 12, 2025: member
    ACK fad191ff48b15832a90c19d560a7c0525c146be3, I have reviewed the code and it looks OK.
  18. maflcko commented at 7:12 am on July 14, 2025: member

    ACK fa0eca8, I have reviewed the code and it looks OK.

    I think you reviewed a commit that still had the pre-existing $GOAL bug?

  19. hebasto commented at 10:23 am on July 14, 2025: member

    ACK fa0eca8, I have reviewed the code and it looks OK.

    I think you reviewed a commit that still had the pre-existing $GOAL bug?

    I did review the correct branch but accidentally copied the wrong hash from my Sublime Merge instance. Now fixed.

  20. fanquake merged this on Jul 14, 2025
  21. fanquake closed this on Jul 14, 2025

  22. maflcko deleted the branch on Jul 14, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-08-12 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me