Skip to content

Update external testing CI with libbet's new way of running Python - #2039

Merged
ISSOtm merged 1 commit into
gbdev:masterfrom
Rangi42:libbet-cygwin
Aug 1, 2026
Merged

Update external testing CI with libbet's new way of running Python#2039
ISSOtm merged 1 commit into
gbdev:masterfrom
Rangi42:libbet-cygwin

Conversation

@Rangi42

@Rangi42 Rangi42 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

After pinobatch/libbet#22, libbet now uses py -3 if the py binary exists, instead of if COMSPEC is defined. So we don't need to unset COMSPEC, we just need to avoid Windows' py launcher from being in Cygwin's PATH.

It turns out that C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 ... was not effectively preventing Windows' PATH from being inherited by Cygwin's PATH, because to take effect it needs to run Cygwin's /etc/profile script. The simple way to do that is using a login shell. So we don't need the PREFIX/--prefix from the previous commit after all.

With this PR, we're now correctly following the advice from https://github.com/cygwin/cygwin-install-action#a-clean-path:

  • Put CYGWIN_NOWINPATH=1 into the environment
  • start a login shell with bash --login
  • because the profile script does cd ${HOME}, either:
    • cd ${GITHUB_WORKSPACE} in your shell script, or
    • prevent the profile script from changing directory by putting CHERE_INVOKING into the environment
@Rangi42 Rangi42 added this to the 1.0.3 milestone Jul 31, 2026
@Rangi42
Rangi42 requested a review from ISSOtm July 31, 2026 02:17
@Rangi42 Rangi42 added tests This affects the test suite meta This isn't related to the tools directly: repo organization, maintainership... labels Jul 31, 2026
@Rangi42
Rangi42 marked this pull request as draft July 31, 2026 02:39
@Rangi42
Rangi42 removed the request for review from ISSOtm July 31, 2026 02:39
@Rangi42
Rangi42 force-pushed the libbet-cygwin branch 2 times, most recently from 1c0cd2b to c31fc5a Compare July 31, 2026 19:39
libbet now uses `py -3` if the `py` binary exists, instead of if
`COMSPEC` is defined. So we don't need to `unset COMSPEC`, we just
need to avoid Windows' `py` launcher from being in Cygwin's `PATH`.

It turns out that `C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 ...`
was not effectively preventing Windows' `PATH` from being inherited
by Cygwin's `PATH`, because to take effect it needs to run Cygwin's
`/etc/profile` script. The simple way to do that is using a login
shell. So we don't need the `PREFIX`/`--prefix` from the previous
commit after all.
@Rangi42
Rangi42 marked this pull request as ready for review July 31, 2026 19:43
@Rangi42 Rangi42 changed the title Update external testing CI with libbet's new way of setting Python Jul 31, 2026

@ISSOtm ISSOtm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! This also feels a bit cleaner.

@ISSOtm
ISSOtm merged commit 0c772ea into gbdev:master Aug 1, 2026
74 of 76 checks passed
@Rangi42
Rangi42 deleted the libbet-cygwin branch August 1, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta This isn't related to the tools directly: repo organization, maintainership... tests This affects the test suite

2 participants