Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ci: Enable testing on M1 macOS#27723

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ksunden merged 7 commits intomatplotlib:mainfromQuLogic:macos-m1
Apr 1, 2024
Merged

Conversation

QuLogic
Copy link
Member

PR summary

Just added in beta today:
https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

Need to see which of the optional dependencies are okay with this.

PR checklist

@QuLogicQuLogic added OS: Apple CI: testingCI configuration and testing labelsJan 31, 2024
@QuLogicQuLogic added this to thev3.9.0 milestoneJan 31, 2024
@QuLogic
Copy link
MemberAuthor

Minimum Python available there is 3.10 now, so bumped that up. It looks likepycairo andPyGObject don't have wheels. PyQt5 and wxPython4 have wheels, but I haven't tried allowing the others that were blocked on macOS yet.

We do seem to be getting a lot more failures here than we did when trying Cirrus in#24597.

@QuLogicQuLogic mentioned this pull requestJan 31, 2024
6 tasks
@QuLogic
Copy link
MemberAuthor

I've de-conditionalized all optional GUI dependencies so I can verify whether they should be skipped or not.

@QuLogic
Copy link
MemberAuthor

The results are the following:

SystemPyGObject3PyGObject4PyQt5PySide2PyQt6PySide6wxPython
Py3.9 Ubuntu 20.04 MinVer✔️✔️✔️✔️✔️✔️
Py3.9 Ubuntu 20.04 Extras✔️✔️✔️✔️✔️✔️
Py3.10 Ubuntu 20.04 Extras✔️✔️✔️✔️✔️✔️
Py3.11 Ubuntu 22.04 Extras✔️✔️✔️✔️✔️✔️✔️
Py3.12 Ubuntu 22.04✔️✔️✔️‼️✔️✔️
macOS 12 amd64✔️✔️✔️✔️✔️✔️
macOS 14 arm64🎡✔️✔️✔️✔️

Most are available everywhere.

The PyGObject 3/4 split doesn't have any effect, as the dependencies are the same either way (the only difference is the native dependency.) Only PyGObject 4 on macOS 14 arm64 is missing wheels, but appears to be available regardless after building them.

PySide2 on Python 3.12 installs a wheel, but crashes. I believe PySide2 is no longer supported so they didn't bother fixing it for Python 3.12, and because it's some kind of universal thing, it still installed. On the other hand the M1 was new enough that there were no wheels for it.

@QuLogic
Copy link
MemberAuthor

I rebased#24597 for comparison, and it doesn't seem to fail nearly as many tests. I can't see any tolerance issues at all. For a reason I don't understand,xfail appears to be broken on both.

@QuLogic
Copy link
MemberAuthor

Ah, looking at thepytest 8 changelog, xfails are now fully reported with backtraces. This seems far too noisy, and we may have to disable that.

@QuLogicQuLogicforce-pushed themacos-m1 branch 6 times, most recently from030f350 toe722c5fCompareFebruary 1, 2024 01:57
@tacaswell
Copy link
Member

(mpl-dev) tcaswell@seven matplotlib %  python -c 'from matplotlib.backends._macosx import print_screen_info; print_screen_info()'                                                                                                                                                                                      macos-m1mainScreen: Acer B286HK (3840.000000x2160.000000)+0.000000+0.000000 @8deepestScreen: Acer B286HK (3840.000000x2160.000000)+0.000000+0.000000 @8Available screens: 1    0: Acer B286HK (3840.000000x2160.000000)+0.000000+0.000000 @8(mpl-dev) tcaswell@seven matplotlib %  python -c 'from matplotlib.backends._macosx import print_screen_info; print_screen_info()'                                                                                                                                                                                      macos-m1mainScreen: (unknown)deepestScreen: (unknown)Available screens: 0(mpl-dev) tcaswell@seven matplotlib %  python -c 'from matplotlib.backends._macosx import print_screen_info; print_screen_info()'                                                                                                                                                                                      macos-m1mainScreen: (unknown)deepestScreen: (unknown)Available screens: 0

That is the result for me running over ssh with:

  • account logged in and a screen connected (but locked)
  • account logged out and a screen connected
  • account logged out and no screen connected

The account I was logged in via and the account I was ssh'd to were the same. My guess is that being logged in as a different user on the screen would still result in no screens being reported via ssh (but I have not tested that if we care I can).

We should definitely adapt this and use it the same way we use the "do we have a screen" check on linux to auto fallback to Agg.

@QuLogic
Copy link
MemberAuthor

OK, I removed the debugging, and pushed the screen check to#27761.

@QuLogicQuLogicforce-pushed themacos-m1 branch 2 times, most recently from6afde26 to154fba8CompareMarch 28, 2024 02:29
@github-actionsgithub-actionsbot added the CI: Run cibuildwheelRun wheel building tests on a PR labelMar 28, 2024
@QuLogicQuLogic added CI: Run cibuildwheelRun wheel building tests on a PR and removed CI: Run cibuildwheelRun wheel building tests on a PR labelsMar 28, 2024
@QuLogic
Copy link
MemberAuthor

QuLogic commentedMar 28, 2024
edited
Loading

We decided to xfail thetest_other_signal_before_sigint test, because sometimes seems fixed, and sometimes doesn't, regardless of the commit above, and@ksunden reproducedonce, but not much luck after that.

Also, contrary to our call@ksunden /@tacaswell, I decided to keep the native arm64 build here. In fact, the cross-compiled one is brokenly-named as well, so we need to fix it one way or the other, and might as well do it now.

@QuLogicQuLogic marked this pull request as ready for reviewMarch 28, 2024 04:37
@QuLogic
Copy link
MemberAuthor

Because this fixes the wheel names, this is important to get in to 3.9 before the rc.

@QuLogicQuLogic added the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelMar 28, 2024
@tacaswell
Copy link
Member

I only half understand the comment in the svg backend.

We are only interested in whether we emitted the warning, and don't careif the test segfaults or otherwise crashes. Thus it is better to checkthe output from the parent process, instead of `pytest.warns` in thesubprocess and checking the return code.
We aren't testing on macOS 10.12 any more, but macos-latest, which isnow macOS 12. Wheels for Python 3.12 should be available everywhere bynow as well.Only PySide2 remains conditional, as it is deprecated, but providesuniversal wheels that install but don't work on Python 3.12.
These are mostly just single bit changes in antialiasing portions ofdiagonal lines.
We currently special-case the SVG converter depending on if it usedfonttype='none', and use one that has our base fonts available. However,this is not based on the rcParam setting (because we don't have that atconversion time), but on whether the SVG text contains the font styling[1]. This check for styling uses the _current_ version, which waschanged way back inmatplotlib#19253.These files were never re-generated though, and used the old version ofthe style, meaning the expected images never triggered the specialconverter. The result images are written with the current style, and_do_ trigger the special conveter.Evidentally, this never was a problem for most developers, becauseeveryone had DejaVu Sans installed globally, so the expected imagesmatched. However, on the clean macOS CI, it's not installed globally, sothe expected images get converted with the wrong font, and the testfails.[1]https://github.com/matplotlib/matplotlib/blob/de1102668dbc0694e98653bd17641e9d99394e57/lib/matplotlib/testing/compare.py#L303
Now that we are running a (simple) test, we'll have to ensure thedeployment target is correct. This would have been needed for a releaseanyway, but can be removed once meson-python 0.16.0 is out.
@QuLogic
Copy link
MemberAuthor

I made some edits to those comments.

@ksundenksunden merged commit97c1282 intomatplotlib:mainApr 1, 2024
@QuLogicQuLogic deleted the macos-m1 branchApril 1, 2024 22:12
@rcomerrcomer mentioned this pull requestApr 3, 2024
5 tasks
@QuLogicQuLogic mentioned this pull requestApr 3, 2024
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Labels
backend: svgCI: Run cibuildwheelRun wheel building tests on a PRCI: testingCI configuration and testingOS: AppleRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.topic: mplot3d
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

3 participants
@QuLogic@tacaswell@ksunden

[8]ページ先頭

©2009-2025 Movatter.jp