summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml20
-rw-r--r--scripts/dev/ci/docker/Dockerfile.j226
-rw-r--r--scripts/dev/ci/docker/generate.py3
-rw-r--r--scripts/link_pyqt.py7
-rw-r--r--tox.ini5
5 files changed, 37 insertions, 24 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e4c264ed5..c9b6a023e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -89,12 +89,18 @@ jobs:
strategy:
fail-fast: false
matrix:
- image:
- - archlinux-webkit
- - archlinux-webengine
- - archlinux-webengine-qt6
- - archlinux-webengine-unstable
- # - archlinux-webengine-unstable-qt6 # FIXME:qt6.5 activate
+ include:
+ - testenv: py
+ image: archlinux-webkit
+ - testenv: py
+ image: archlinux-webengine
+ - testenv: py-qt6
+ image: archlinux-webengine-qt6
+ - testenv: py
+ image: archlinux-webengine-unstable
+ args: ""
+ # - testenv: py
+ # image: archlinux-webengine-unstable-qt6 # FIXME:qt6.5 activate
container:
image: "qutebrowser/ci:${{ matrix.image }}"
env:
@@ -112,7 +118,7 @@ jobs:
- name: Set up problem matchers
run: "python scripts/dev/ci/problemmatchers.py py38 ${{ runner.temp }}"
- name: Run tox
- run: dbus-run-session tox -e py
+ run: "dbus-run-session -- tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}"
tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2
index 0ca7d330d..6a06faf82 100644
--- a/scripts/dev/ci/docker/Dockerfile.j2
+++ b/scripts/dev/ci/docker/Dockerfile.j2
@@ -10,19 +10,19 @@ RUN pacman -Su --noconfirm \
python-tox \
python-distlib \
{% if qt6 %}
- qt6-base \
- qt6-declarative \
- {% if webengine %}
- qt6-webengine python-pyqt6-webengine \
- {% else %}{{ 1/0 }}{% endif %}
- python-pyqt6 \
+ qt6-base \
+ qt6-declarative \
+ {% if webengine %}
+ qt6-webengine python-pyqt6-webengine \
+ {% else %}{{ 1/0 }}{% endif %}
+ python-pyqt6 \
{% else %}
- qt5-base \
- qt5-declarative \
- {% if webengine %}
- qt5-webengine python-pyqtwebengine \
- {% endif %}
- python-pyqt5 \
+ qt5-base \
+ qt5-declarative \
+ {% if webengine %}
+ qt5-webengine python-pyqtwebengine \
+ {% endif %}
+ python-pyqt5 \
{% endif %}
xorg-xinit \
xorg-server-xvfb \
@@ -56,4 +56,4 @@ WORKDIR /home/user
CMD git clone /outside qutebrowser.git && \
cd qutebrowser.git && \
- tox -e py
+ tox -e {% if qt6 %}py-qt6{% else %}py{% endif %}
diff --git a/scripts/dev/ci/docker/generate.py b/scripts/dev/ci/docker/generate.py
index 763a04ecf..2eca90d78 100644
--- a/scripts/dev/ci/docker/generate.py
+++ b/scripts/dev/ci/docker/generate.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# vim: ft=sh fileencoding=utf-8 sts=4 sw=4 et:
+# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2019-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
@@ -35,6 +35,7 @@ def main():
'archlinux-webengine': {'webengine': True, 'unstable': False, 'qt6': False},
'archlinux-webengine-qt6': {'webengine': True, 'unstable': False, 'qt6': True},
'archlinux-webengine-unstable': {'webengine': True, 'unstable': True, 'qt6': False},
+ 'archlinux-webengine-unstable-qt6': {'webengine': True, 'unstable': True, 'qt6': True},
}[image]
with open('Dockerfile', 'w') as f:
diff --git a/scripts/link_pyqt.py b/scripts/link_pyqt.py
index e27a54a68..ff524f056 100644
--- a/scripts/link_pyqt.py
+++ b/scripts/link_pyqt.py
@@ -140,10 +140,10 @@ def link_pyqt(executable, venv_path, *, version='5'):
try:
get_lib_path(executable, f'PyQt{version}.sip')
except Error:
- # There is no PyQt5.sip, so we need to copy the toplevel sip.
+ # There is no PyQt*.sip, so we need to copy the toplevel sip.
sip_file = get_lib_path(executable, 'sip')
else:
- # There is a PyQt5.sip, it'll get copied with the PyQt5 dir.
+ # There is a PyQt*.sip, it'll get copied with the PyQt* dir.
sip_file = None
sipconfig_file = get_lib_path(executable, 'sipconfig', required=False)
@@ -218,7 +218,8 @@ def main():
executable = get_tox_syspython(args.path) if args.tox else sys.executable
venv_path = get_venv_lib_path(args.path)
- link_pyqt(executable, venv_path)
+ wrapper = os.environ["QUTE_QT_WRAPPER"]
+ link_pyqt(executable, venv_path, version=wrapper[-1])
if __name__ == '__main__':
diff --git a/tox.ini b/tox.ini
index 842e527b7..2fba834cc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -53,6 +53,11 @@ commands =
{envpython} -bb -m pytest {posargs:tests}
cov: {envpython} scripts/dev/check_coverage.py {posargs}
+[testenv:py-qt6]
+setenv =
+ PYTEST_QT_API=pyqt6
+ QUTE_QT_WRAPPER=PyQt6
+
[testenv:bleeding]
basepython = {env:PYTHON:python3}
setenv =