ci: update pwsh to use custom shell that fails-fast #32672

pull m3dwards wants to merge 1 commits into bitcoin:master from m3dwards:250603-pwsh-fail-fast changing 1 files +4 −4
  1. m3dwards commented at 12:03 pm on June 3, 2025: contributor

    Github by default sets fail fast behaviour on pswh shell which means that if any powershell cmdlet fails the script will stop and exit. The problem is that this behaviour doesn’t apply when calling native executables, it only applies to powershell cmdlets.

    I think the safest thing is to whenever we use pwsh to enable $PSNativeCommandUseErrorActionPreference = $true which will also fail calling any exe that returns a non-zero exit code.

    Technically the step Adjust paths in test/config.ini only uses cmdlets so this step will not benefit from this change but I feel like it’s good practice to still enable this feature in case this script gets modified in the future to call an exe.

    Here is a CI run that has a script that fails silently (look at Windows Native, VS 2022 -> Get tool information): https://github.com/m3dwards/bitcoin/actions/runs/15415032095/job/43375709475 And with this change applied, the script correctly fails: https://github.com/m3dwards/bitcoin/actions/runs/15416585565/job/43380685364

  2. ci: update pwsh to use custom shell that fails-fast
    Github Actions does set ErrorActionPreference to Stop but this does not
    apply when calling native executables. Use this custom shell that will
    fail fast when any command fails.
    21bc6915d2
  3. DrahtBot commented at 12:03 pm on June 3, 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/32672.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32513 (ci: remove 3rd party js from windows dll gha job by m3dwards)

    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. DrahtBot added the label Tests on Jun 3, 2025
  5. fanquake added the label Windows on Jun 3, 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-06-15 06:13 UTC

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