-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ci: Introduce ubuntu-24.04 to restore GTK test coverage with recent PyGObject versions #29765
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
ci: Introduce ubuntu-24.04 to restore GTK test coverage with recent PyGObject versions #29765
Conversation
The
..seems to relate to this line of code: https://github.com/pybind/pybind11/blob/a2e59f0e7065404b44dfe92a28aca47ba1378dc4/include/pybind11/pytypes.h#L1562 From what I gather from starting to read a separate-but-similar discussion thread in linux-test-project/lcov#209, this means that there's a mismatch between |
It looks like the verion of gcov has gone from 11 -> 13 as well. Per linux-test-project/lcov#209 (comment) I suspect that we are seeing the lines from the pybind11 headers showing up sometimes in exceptions and sometimes not hence confusing the tools. I suspect we should go the route of flagging these as ignorable? |
Thanks - possibly, yep. I've been trying to figure out what the cause of that is. As best I can tell, it's a string conversion (CVT) macro in I did build |
I've opened a discussion thread (a request for assistance, really) about this at: pybind/pybind11#5573 |
This comment was marked as resolved.
This comment was marked as resolved.
Using a lcov 1.x backwards-compatible rc config setting Refs: - matplotlib#29765 (comment) - linux-test-project/lcov#209 (comment)
3b81246
to
6d15950
Compare
.github/workflows/tests.yml
Outdated
elif [[ "${{ matrix.os }}" = ubuntu-22.04 || "${{ matrix.os }}" = ubuntu-22.04-arm ]]; then | ||
sudo apt-get install -yy --no-install-recommends \ | ||
gir1.2-gtk-4.0 \ | ||
libgirepository1.0-dev | ||
else # ubuntu-24.04 | ||
sudo apt-get install -yy --no-install-recommends \ | ||
libgirepository-2.0-dev |
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.
Note: I think we should also add GTK4 to the system packages on Ubuntu 24.04 here.
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.
Hmm.. attempting to do that exposes a missing dependency of GLESv2 for GTK4 on Ubuntu 24.04 - maybe want to do that, but I'll defer that initially.
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.
Ref: https://github.com/matplotlib/matplotlib/actions/runs/14021446821/job/39253940887#step:14:323
Surrounding context:
_ test_interactive_backend[toolbar2-MPLBACKEND=gtk4agg-BACKEND_DEPS=cairo,gi] __
...
E Failed: Subprocess failed to test intended behavior
E libEGL warning: DRI3: Screen seems not DRI3 capable
E libEGL warning: DRI3: Screen seems not DRI3 capable
E MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
E libEGL warning: egl: failed to create dri2 screen
E
8000
E (process:16046): Gtk-WARNING **: 17:51:27.373: Unable to acquire the address of the accessibility bus: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files. If you are attempting to run GTK without a11y support, GTK_A11Y should be set to 'none'.
E Couldn't open libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory
E Fatal Python error: Aborted
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Note: my updated understanding from the relevant |
I've a local rebase/squash of these changes prepared, and can push that soon, if preferred. There were a few details in some of the interim commits - particularly the GLESv2 requirement if we want to enable GTK4 - that could be relevant for easier inspection, though. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
(clarification: by this I mean that the interim commits are slightly easier to inspect during code review if not replaced by force-pushes; in this case I would prefer to squash the commits before merge) |
1bc5c19
to
ad69c7e
Compare
I do not understand the circleci error. It looks like it is trying to run on the branch from @jayaddison 's account rather than on the PR from the mpl org. We should not hold merging on that. |
Thanks @tacaswell - that has confused me slightly too; I don't have a CircleCI account. |
PR summary
GitHub Actions continuous integration unit test coverage is reduced on Linux due to an unsatisfied system dependency requested by recent versions of the Python
PyGObject
library.In particular,
PyGObject
version 3.52.0 introduces a requirement forgirepository-2.0
: https://gitlab.gnome.org/GNOME/pygobject/-/blob/e3dee9719e7249acfa7e78a3bbae251301a134a4/NEWS#L9-10The relevant system package to fulfil the requirement is not available on Ubuntu 22.04, and seems unlikely to become available on that platform. This causes some Linux GTK UI tests in the CI here to be skipped.
Test coverage can be improved by including an Ubuntu 24.04 test job using a host that provides the
girepository-2.0
dependency.This is intended to be a minimal approach, adding a single job to the existing
tests.yml
workflow definitions.A compatible possibility would be to place an upper-bound on the version of
PyGObject
installed during jobs on previous versions of Ubuntu.PR checklist
Resolves #29749