ci: [refactor] Drop last use of pwsh #34583

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2602-ci-win-cross changing 2 files +34 −15
  1. maflcko commented at 3:40 pm on February 13, 2026: member

    The use of pwsh was a bit confusing and inconsistent around the exit code. See also #32672

    I think it is fine to drop it and purely use Bash/Python.

    This also moves a bit of code from the github yaml to the python script.

  2. ci: [refactor] Move github_env_setup_vs_dev_prompt to python script fa1a11b90d
  3. ci: [refactor] Drop last use of pwsh
    Seems easier to just use Bash and Python consistently.
    faba7f616d
  4. DrahtBot renamed this:
    ci: [refactor] Drop last use of pwsh
    ci: [refactor] Drop last use of pwsh
    on Feb 13, 2026
  5. DrahtBot added the label Tests on Feb 13, 2026
  6. DrahtBot commented at 3:41 pm on February 13, 2026: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hodlinator, m3dwards

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  7. fanquake commented at 10:24 am on February 16, 2026: member
  8. in .github/workflows/ci.yml:232 in faba7f616d
    235-          $installationPath = & $vswherePath -latest -property installationPath
    236-          & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | foreach-object {
    237-            $name, $value = $_ -split '=', 2
    238-            echo "$name=$value" >> $env:GITHUB_ENV
    239-          }
    240+        run: py -3 .github/ci-windows-cross.py github_env_setup_vs_dev_prompt
    


    hodlinator commented at 10:37 am on February 16, 2026:
    I see ci-windows-cross.py is already used for other steps within this native (non-cross) job. Why isn’t ci-windows.py used here?

    maflcko commented at 12:11 pm on February 16, 2026:
    I think this is the first one. Happy to move it over to the other python script. I don’t think it matters much. The goal is just to avoid having to add a third python script for this stand-alone github-only snippet

    hodlinator commented at 12:51 pm on February 16, 2026:
    Ah, that’s right, the others are “windows-native-test”, which is testing the cross executables. I’d rather put it in ci-windows.py for maximum tidyness.

    maflcko commented at 2:01 pm on February 16, 2026:
    thx. May do, if I have to re-push

    maflcko commented at 3:50 pm on February 16, 2026:
    Actually, .github/ci-windows.py requires an unused positional arg, which is equally confusing. Will leave as-is for now.
  9. in .github/workflows/ci.yml:414 in faba7f616d


    hodlinator commented at 10:41 am on February 16, 2026:
    If we actually need this for testing already built cross builds, could it be called something clearer like IMPORT_VS_ENV?

    maflcko commented at 12:12 pm on February 16, 2026:

    Yes, it is needed. Otherwise:

    0+ mt.exe -nologo '-inputresource:D:\a\bitcoin\bitcoin\bin\bitcoind.exe' '-out:D:\a\bitcoin\bitcoin\bin\bitcoind.manifest'
    1[WinError 2] The system cannot find the file specified
    2Error: Process completed with exit code 1.
    

    https://github.com/bitcoin/bitcoin/actions/runs/22061363427/job/63743877223?pr=34583#step:6:11


    hodlinator commented at 12:54 pm on February 16, 2026:
    Makes sense. Still think “IMPORT_VS_ENV” is clearer than “SET_UP_VS” but it’s tangential to this PR.

    maflcko commented at 2:02 pm on February 16, 2026:
    thx. May do, if I have to re-push

    m3dwards commented at 3:08 pm on February 16, 2026:
    The yaml anchor made more sense when there was a larger template. As it’s just a call to python now could the anchor just be dropped entirely?

    maflcko commented at 3:50 pm on February 16, 2026:

    The yaml anchor made more sense when there was a larger template. As it’s just a call to python now could the anchor just be dropped entirely?

    thx. May do, if I have to re-push

  10. maflcko force-pushed on Feb 16, 2026
  11. DrahtBot added the label CI failed on Feb 16, 2026
  12. in .github/ci-windows-cross.py:33 in faba7f616d
    28+        text=True,
    29+    ).stdout.strip()
    30+    vsdevcmd = Path(installation_path) / "Common7" / "Tools" / "vsdevcmd.bat"
    31+    comspec = os.environ["COMSPEC"]
    32+    output = run(
    33+        f'"{comspec}" /s /c ""{vsdevcmd}" -arch=x64 -no_logo && set"',
    


    hodlinator commented at 12:59 pm on February 16, 2026:
    The double citation marks "" after /c make me uneasy, but I guess the string parsing might disallow empty strings and so can support keeping track of one level of quoted strings internally.

    maflcko commented at 2:01 pm on February 16, 2026:
    This is just a literal copy of what the pwsh script did (it also had the exact same full string with the exact same double quotes), which are required for cmd.exe. I’d be curious to see if there is a way (at all) to do this with an array of strings, but maybe this can be done in a follow-up by a Windows person? (I don’t have Windows, so testing all of this with CI isn’t smooth)
  13. hodlinator approved
  14. hodlinator commented at 1:02 pm on February 16, 2026: contributor
    ACK faba7f616db05ded6cc642821ce540aa40fb8fcb
  15. DrahtBot removed the label CI failed on Feb 16, 2026
  16. m3dwards commented at 3:09 pm on February 16, 2026: contributor

    utACK faba7f616db05ded6cc642821ce540aa40fb8fcb

    Wasn’t sure which python file the setup vs prompt belonged but agree it’s perhaps a bit silly to add another file just for this. I wasn’t able to test it on my windows machine as it requires Github environment vars.


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: 2026-02-17 06:13 UTC

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