-
Notifications
You must be signed in to change notification settings - Fork 76
CI: Run tests in Cygwin for Cygwin CI #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e56b8c1
CI: Run tests in Cygwin for Cygwin CI
DWesl dc1a5c2
CI: Include /usr/local/bin in PATH.
DWesl e80d0fd
CI: Add cmake et al. to Cygwin install.
DWesl 69b5f9e
CI: Add gcc to Cygwin run
DWesl 28ea075
CI: Add g++ compiler to Cygwin CI run.
DWesl 640c462
CI: Add git to Cygwin CI run.
DWesl 9cc6895
CI: Try to ensure Cygwin tests start in right place
DWesl b39a58b
TST: add support for cygwin
FFY00 fdb2d63
TST: install GitPython from repo on Cygwin
FFY00 b0f12d1
ENH: Get tests passing on Cygwin.
DWesl 34c6aa5
Merge branch 'main' into patch-1
DWesl ec1aa14
CI: Don't change directory.
DWesl cddc959
CI: Try to cache the Cygwin installation.
DWesl c6761f6
CI: Install GnuPG to see if that fixes git failure.
DWesl c6566c7
CI: Install meson to ensure all dependencies are present.
DWesl 7d09e52
CI: Tell Cygwin git about the repository.
DWesl 7e866c4
CI: Download wheels for ensurepip
dnicolodi e27a22b
CI: Install pkg-config for tests.
DWesl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not enough. With this the installation path is populated but the installation will be run anyway. I don't think this saves any time. Anyhow, I can live with the CI job taking a couple of minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation will be run, but that cache includes the list of installed packages; the install step will only download and extract packages if there are new versions (which means I should expire the cache at least once a month). I would very much prefer to run the installer to be sure the dlls get rebased properly (which means I need to run
rebase-trigger full
so it knows to do that).You're probably going to have more runins with the length of the CI job; most of the ones I've built take half an hour. Should I take this back out again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we will be merging this PR either way. The work in #202 supersedes all of it. I just have one funny test error on Cygwin to track down: https://github.com/mesonbuild/meson-python/actions/runs/3456021871/jobs/5768534392 We setup two virtual environments as part of the tests, for some reason the second time we do it, it fails. The annoying thing is that it fails with a backtrace that does not match my copy of the CPython 3.9.15 source code and I haven't been able to locate the Cygwin Python sources
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you've got a Cygwin install, run
setup-x86_64.exe
again and check theSrc?
tick box; you may also want to install thecygport
package to simplify the build process (cygport python39.cygport download prep compile test install package
if you want to do a local install, using the Cygwin source package mentioned above and a local download repository)You may also want to check the CPython 3.9.10 source, since that's what's getting installed in the failing CI job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any Windows machine were to install Cygwin. I was hoping that a git repository with the sources exists somewhere. With your indications above I found it, https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/python39.git but it seems the sources are maintained as a set of patches... This is so '90ies... 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accordingly to https://cygwin.com/cgi-bin2/package-grep.cgi there is no Cygwin package that installs something in
/usr/share/python-wheels/
so I am not sure I understand how the patch you linked is even supposed to work.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few hundred wheels in there, because I often create my own packages and make sure my packages install wheels there so I don't have to sit waiting for scipy to build every time I want to test something with tox. I think it worked fine before I started doing that, but I haven't checked.
Works the same as the other one, once I found the temporary environment.
It looks like the function assumes there is some file for the package, but only looks for architecture independent packages; is it perhaps finding only sdists and architecture-dependent wheels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh? Why do you have wheel files in there? Also, wheel files are only a distribution bundle, they need to be unpacked to be used, so if you install a wheel package you don't have any wheel file at the end, except in a cache, maybe. However,
/usr/share/python-wheels/
is not the default path of thepip
cache.When
venv
creates a new virtual environment it optionally populates it with thesetuptools
andpip
packages. Becausepip
does not exist yet in the virtual environment, theensurepip
module is used for doing it. Customarily, the Python distribution comes with two wheel files forsetuptools
andpip
bundled with it and these are unpacked byensurepip
into the virtual environment. Cygwin decided to patchensurepip
to look for the wheel it needs in/usr/share/python-wheels/
but it does not place any wheel there. How is this supposed to work? Who should place the wheels there?Now that we understood the issue, I'm patching it in the CI setup. But Python as distribute by Cygwin is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix
meson-python/.github/workflows/tests.yml
Lines 117 to 128 in f0ce0f5
Now the tests succeed on Cygwin too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success!