Skip to content
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

Update .travis.yml for Qt #529

Merged
merged 14 commits into from
Jun 8, 2020
Merged

Update .travis.yml for Qt #529

merged 14 commits into from
Jun 8, 2020

Conversation

kitchoi
Copy link
Contributor

@kitchoi kitchoi commented Jun 3, 2020

CI is currently failing with this error:

[EXECUTING] /home/travis/.edm/envs/edm/bin/edm run -e pyface-test-3.6-pyside2 -- coverage run -p -m unittest discover -v pyface
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Command '['/home/travis/.edm/envs/edm/bin/edm', 'run', '-e', 'pyface-test-3.6-pyside2', '--', 'coverage', 'run', '-p', '-m', 'unittest', 'discover', '-v', 'pyface']' returned non-zero exit status 250.

This PR attempts to fix this.

@mdickinson
Copy link
Member

mdickinson commented Jun 4, 2020

FWIW, here's the fix for this issue that worked for Envisage: enthought/envisage#287

@kitchoi
Copy link
Contributor Author

kitchoi commented Jun 4, 2020

Yep. Was trying to see whether other alternatives would work as parallel experiments. Enable does this differently too 😂

@mdickinson
Copy link
Member

Was trying to see whether other alternatives would work as parallel experiments.

Right, I'm not fond of the Envisage solution, and would be interested in better alternatives.

@kitchoi kitchoi changed the title Update .travis.yml to include libglu1-mesa-dev for Qt Update .travis.yml for Qt Jun 5, 2020
@mdickinson
Copy link
Member

It looks as though you're being bitten by this: https://github.com/enthought/buildsystem/issues/3178

@kitchoi
Copy link
Contributor Author

kitchoi commented Jun 8, 2020

It looks as though you're being bitten by this: enthought/buildsystem#3178

Looks like updating the OSX image fixed this. The libxml on the default OSX image was too old for the Qt version we are using.
The last commit has built successfully on OSX: https://travis-ci.org/github/enthought/pyface/jobs/695149507

I have been manually terminating other builds not relevant to my testing so I could focus on one thing at a time :)

@kitchoi
Copy link
Contributor Author

kitchoi commented Jun 8, 2020

The last commit has built successfully on OSX

Correction: The build actually failed, but that failure was caused by an assertion error in test. That is orthogonal to the objective of this draft PR. The entire test suite had been run.

@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2020

Codecov Report

Merging #529 into master will decrease coverage by 0.08%.
The diff coverage is 68.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
- Coverage   37.08%   36.99%   -0.09%     
==========================================
  Files         470      470              
  Lines       26027    26027              
  Branches     3961     3961              
==========================================
- Hits         9652     9629      -23     
- Misses      15948    15977      +29     
+ Partials      427      421       -6     
Impacted Files Coverage Δ
pyface/__init__.py 82.60% <ø> (ø)
pyface/ui/qt4/init.py 62.50% <33.33%> (ø)
pyface/ui/qt4/workbench/split_tab_widget.py 12.47% <50.00%> (ø)
pyface/qt/QtNetwork.py 75.00% <60.00%> (ø)
pyface/qt/QtOpenGL.py 75.00% <60.00%> (ø)
pyface/qt/QtSvg.py 75.00% <60.00%> (ø)
pyface/qt/QtTest.py 75.00% <60.00%> (ø)
pyface/qt/QtWebKit.py 68.42% <60.00%> (ø)
pyface/qt/QtCore.py 77.77% <62.50%> (ø)
pyface/qt/QtGui.py 90.47% <66.66%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c98d1d3...5c819e5. Read the comment docs.

@kitchoi
Copy link
Contributor Author

kitchoi commented Jun 8, 2020

History of changes for future reference:

  • Linux: Tried libglu1-mesa-dev per Qt documentation: https://doc.qt.io/qt-5.14/linux.html. Did not work. The error above complaining about xcb stayed.
  • Linux: Switched on QT_DEBUG_PLUGINS for debugging... then the process was more or less what happened for Fix CI failures on Linux, Windows envisage#287: You add a package, Qt complains about the next one, you add that package, Qt complains about there is still another...(repeat that N times)
  • OSX: Build failed while trying to import QtWebKit:
    from PyQt5.QtWebKit import *
ImportError: dlopen(/Users/travis/.edm/envs/pyface-test-3.6-pyqt5/lib/python3.6/site-packages/PyQt5/QtWebKit.so, 2): Library not loaded: @rpath/lib/libxml2.2.dylib
  Referenced from: /Users/travis/.edm/envs/pyface-test-3.6-pyqt5/lib/libQt5WebKit.5.9.0.dylib
  Reason: Incompatible library version: libQt5WebKit.5.9.0.dylib requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
  • OSX: Attempted to use the brew addon on Travis to update libxml2, but ran into this issue: https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/28
  • OSX: Eventually updating the OSX image to use Xcode 11.5 works: It has a recent enough libxml2
  • Linux: Removing libdbus seems fine. It could be due to insufficient test coverage so we might need to add this back in the future. Not sure. For now, it is not needed.
  • Linux: Remove QT_DEBUG_PLUGINS. It would have been nice to keep had it not been making so much noise in between individual tests.

@kitchoi kitchoi marked this pull request as ready for review June 8, 2020 09:12
@kitchoi
Copy link
Contributor Author

kitchoi commented Jun 8, 2020

If it is okay, I would propose doing a squash-and-merge for this PR. Many of the commits are experimental, messy and possibly confusing when read on its own. I hope the comment above will provide the history needed for future references.

Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

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

LGTM.

It seems possible that the need to specify a particular OS X image could be reverted once the buildsystem issue is solved.

@mdickinson
Copy link
Member

I would propose doing a squash-and-merge for this PR

👍

@kitchoi
Copy link
Contributor Author

kitchoi commented Jun 8, 2020

Thank you! Squashing and merging...

It seems possible that the need to specify a particular OS X image could be reverted once the buildsystem issue is solved.

Agreed.

@kitchoi kitchoi merged commit 08ba6c2 into master Jun 8, 2020
@kitchoi kitchoi deleted the ci-travis-setup-qt branch June 8, 2020 09:21
@kitchoi kitchoi added this to the Release 7.0.1 milestone Jul 8, 2020
kitchoi added a commit that referenced this pull request Jul 8, 2020
* Update .travis.yml to include libglu1-mesa-dev for Qt

* Restore libxkbcommon-x11 and move other dependencies up

* Fix package name for libsdl

* Add a debug flag

* Add libxcb-iccm4

* Continue the same exercise for pyside2, add libxcb-image

* Giving up - let's use the same packages

* Add libxml2 for osx image

* Use brew manually
See https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/28

* Try a newer osx image

* Add a comment

* Is libdbus still needed?

* Remove debugging flag - it is noisy and is embedded in between tests
kitchoi added a commit that referenced this pull request Jul 8, 2020
* Fix errors from incorrect QImage memory management. (#546)

This should stop the sporadic test failures caused by referencing memory
which has been freed and used by something else.  The fix is to attach the
numpy array with the allocated memory to the QImage, so that the lifetime
of the array is at least as long as that of the QImage.

* Fix dock pane layout (#545)

* Provide sizeHint to QWidget

* REF : Restore qt4 conditional branch

	modified:   pyface/ui/qt4/tasks/main_window_layout.py

* TST: Test Qt dock widget has the correct size (#552)

Co-authored-by: Sai Rahul Poruri <rporuri@enthought.com>
Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com>

* Update Changelog for 7.0.1

* Remove master only setting on Travis and Appveyor which prevent bug fix release PR from building

* Update .travis.yml for Qt (#529)

* Update .travis.yml to include libglu1-mesa-dev for Qt

* Restore libxkbcommon-x11 and move other dependencies up

* Fix package name for libsdl

* Add a debug flag

* Add libxcb-iccm4

* Continue the same exercise for pyside2, add libxcb-image

* Giving up - let's use the same packages

* Add libxml2 for osx image

* Use brew manually
See https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/28

* Try a newer osx image

* Add a comment

* Is libdbus still needed?

* Remove debugging flag - it is noisy and is embedded in between tests

* Update install command for installing wx to match master (this is equivalent to a merge of a couple of PRs

Co-authored-by: Corran Webster <cwebster@enthought.com>
Co-authored-by: Pedro Rivotti <44579232+pedrorivotti@users.noreply.github.com>
Co-authored-by: Sai Rahul Poruri <rporuri@enthought.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants