Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci: Merge sdist and wheel building workflows #25473

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

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 15, 2023

PR Summary

This allows verifying that wheels can be installed after building, and that the sdist can be built into a wheel without a second workflow.

Also simplify some of the checking scripts.

PR Checklist

Documentation and Tests

  • [n/a] Has pytest style unit tests (and pytest passes)
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [n/a] New plotting related features are documented with examples.

Release Notes

  • [n/a] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [n/a] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [n/a] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@QuLogic QuLogic added the CI: Run cibuildwheel Run wheel building tests on a PR label Mar 15, 2023
@tacaswell tacaswell added this to the v3.8.0 milestone Mar 15, 2023
@QuLogic QuLogic changed the title c: Verify that wheels can be installed after building ci: Verify that wheels can be installed after building Mar 15, 2023
@QuLogic
Copy link
Member Author

QuLogic commented Mar 15, 2023

So some annoyance here: we still build 32-bit wheels, but NumPy doesn't. When we build ourselves, we ask for oldest-supported-numpy and build a 32-bit wheel of it. But then for the test, our requirement is just numpy>=MINIMUM, so then we have to build NumPy again because pip picks the latest.

This will probably also affect some of the ARM builds? Which will really explode the runtime for this workflow. Maybe we'll have to get by without the test...

@greglucas
Copy link
Contributor

I'm not following how an echo on the test command verifies that it didn't totally fail. Don't you need to pip install wheelhouse/*.whl to verify that it can be installed?

To avoid the long stacked wheel builds in a single job, I've switched over to dynamically generating the run matrix on other projects which has worked nicely: pypa/cibuildwheel#1261

Perhaps we should open a separate issue about the 32-bit wheels, but it seems like if Numpy has dropped direct wheel support, we could probably follow suit as well and not bother with the extra maintenance there.

@QuLogic
Copy link
Member Author

QuLogic commented Mar 16, 2023

cibuildwheel creates the test environment and installs the wheel when there's a test command. Setting the environment variable just triggers this behaviour; it doesn't matter that it doesn't do anything.

I opened #25475 for dropping 32-bit wheels.

We did discuss doing a bit more testing, but that can wait for after the above change.

@greglucas
Copy link
Contributor

cibuildwheel creates the test environment and installs the wheel when there's a test command. Setting the environment variable just triggers this behaviour; it doesn't matter that it doesn't do anything.

That wasn't obvious to me, thanks for clarifying! I did go in and look at the CI log to verify that does work 👍 . Perhaps add a comment above that to indicate as much?

@ksunden
Copy link
Member

ksunden commented Mar 16, 2023

Looks like there was a temporary disruption in the qhull download

@QuLogic
Copy link
Member Author

QuLogic commented Mar 16, 2023

I've realized that the cibuildsdist.whl workflow does some roughly equivalent test already. But that is on wheels that we don't end up distributing. So instead of closing this, I'm going to repurpose it to merge those two workflows so that we are checking distributed wheels. But this will wait for after dropping 32-bit wheels.

@QuLogic QuLogic marked this pull request as draft March 16, 2023 05:26
@QuLogic QuLogic force-pushed the test-wheel branch 12 times, most recently from 797e2d9 to 5f89ec0 Compare March 18, 2023 03:45
@QuLogic
Copy link
Member Author

QuLogic commented Mar 18, 2023

Sorry, that took a few tries to get working across platforms.

Annnd now we know that PyPy wheels don't import on Windows. Can anyone try that out with the release wheels? Or the previous nightly wheels?

@QuLogic QuLogic changed the title ci: Verify that wheels can be installed after building ci: Merge sdist and wheel building workflows Mar 18, 2023
@QuLogic
Copy link
Member Author

QuLogic commented Apr 29, 2023

Well, it seems to have magically fixed itself in the meantime.

@QuLogic QuLogic marked this pull request as ready for review April 29, 2023 08:16
This allows verifying that wheels can be installed after building, and
that the sdist can be built into a wheel without a second workflow.

Also simplify some of the checking scripts.
@ksunden ksunden merged commit 3fc25bb into matplotlib:main Jun 1, 2023
@QuLogic QuLogic deleted the test-wheel branch June 1, 2023 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Run cibuildwheel Run wheel building tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants