ci: Update diff checks so that the task actually works #1578

pull achow101 wants to merge 5 commits into bitcoin:master from achow101:fix-ci changing 2 files +9 −3
  1. achow101 commented at 11:23 pm on April 24, 2024: member

    Currently the Diff Checks CI task silently fails. This PR fixes that so it both works and the task will actually fail if the script is failing.

    The failure was caused by 2 issues:

    1. A missing run of buildtable.pl on the current commit
    2. The github actions checkout default only has the current commit, making it impossible to checkout the previous commit to build the table for it

    Additionally, actions/checkout@v3 is deprecated in favor of actions/checkout@v4 so this PR bumps that too.

    Lastly, since diff checks will fail for PRs that do not have numbers yet, I’ve clarified that this is expected in the CI task’s name.

  2. ci: Fetch depth 2 for diffchecks 7be25f9fb2
  3. diffchecks.sh: Build table first eb9007c869
  4. in scripts/diffcheck.sh:12 in 9591f59ef5 outdated
     8@@ -9,6 +9,8 @@ if git checkout HEAD^ && scripts/buildtable.pl >/tmp/table.mediawiki 2>/dev/null
     9         echo "$newdiff"
    10         exit 1
    11     fi
    12+    echo "No extraneous changes detected"
    


    murchandamus commented at 8:54 pm on May 1, 2024:

    How about:

    0    echo "README table matches expected table from BIP files"
    

    achow101 commented at 9:02 pm on May 1, 2024:
    Changed.
  5. murchandamus commented at 8:55 pm on May 1, 2024: contributor
    I think this looks good. One nit
  6. diffchecks.sh: Make success clear and exit with failure on error 98f000a6fb
  7. ci: Use actions/checkout@v4
    v3 is deprecated
    94ca14f34e
  8. ci: Clarify that diffchecks fails until a number is assigned 09439bb662
  9. achow101 force-pushed on May 1, 2024
  10. jonatack commented at 9:07 pm on May 1, 2024: contributor
    Light review ACK
  11. jonatack merged this on May 1, 2024
  12. jonatack closed this on May 1, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:10 UTC

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