Skip to content

Commit 8279421

Browse files
authored
Add Qt6 and GitLab CI/CD learnings from #550 to troubleshooting.docs (#551)
1 parent a65bc68 commit 8279421

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

docs/troubleshooting.rst

+30-6
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,23 @@ More details can be found in `issue #206`_.
6161

6262
.. _issue #206: https://github.com/pytest-dev/pytest-qt/issues/206
6363

64-
GitHub Actions
65-
--------------
64+
GitHub Actions, Azure pipelines, Travis-CI and GitLab CI/CD
65+
-----------------------------------------------------------
6666

67-
When using ``ubuntu-latest`` on Github Actions, the package ``libxkbcommon-x11-0`` has to be installed, ``DISPLAY`` should be set and ``xvfb`` run. More details can be found in `issue #293`_.
67+
When using ``ubuntu-latest`` on Github Actions, the package ``libxkbcommon-x11-0`` has to be installed, ``DISPLAY`` should be set and ``xvfb`` run. More details can be found in issues `#293`_ and `#550`_.
6868

69-
.. _issue #293: https://github.com/pytest-dev/pytest-qt/issues/293
69+
.. _#293: https://github.com/pytest-dev/pytest-qt/issues/293
70+
.. _#550: https://github.com/pytest-dev/pytest-qt/issues/550
7071

7172
Since Qt in version 5.15 ``xcb`` libraries are not distributed with Qt so this library in version at least 1.11 on runner. See more in https://codereview.qt-project.org/c/qt/qtbase/+/253905
7273

73-
For Github Actions, Azure pipelines and Travis-CI you will need to install ``libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils``
74+
Since Qt in version 6.5 ``xcb-cursor0`` is a requirement. See all Qt6 requirements in https://doc.qt.io/qt-6/linux-requirements.html
7475

75-
As an example, here is a working config :
76+
For GitHub Actions, Azure pipelines, Travis-CI and GitLab CI/CD you will need to install ``libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils``
77+
78+
You might need to install ``libgl1 libegl1 libdbus-1-3`` as well.
79+
80+
As an example, here is a working Github Actions config :
7681

7782
.. code-block:: yaml
7883
@@ -99,6 +104,25 @@ As an example, here is a working config :
99104
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
100105
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
101106
107+
And here is a working Qt6 GitLab CI/CD config :
108+
109+
.. code-block:: yaml
110+
111+
variables:
112+
DISPLAY: ':99.0'
113+
114+
test:
115+
stage: test
116+
image: python:3.11
117+
script:
118+
- apt update
119+
- apt install -y libgl1 libegl1 libdbus-1-3 libxcb-cursor0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils xvfb
120+
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
121+
- python -m pip install pyqt6 pytest-qt
122+
123+
- python -m pytest test.py
124+
125+
102126
``tlambert03/setup-qt-libs``
103127
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104128
Instead manually curate list of used packages you may use ``tlambert03/setup-qt-libs`` github action: https://github.com/tlambert03/setup-qt-libs

0 commit comments

Comments
 (0)