From b241b0360bc053b21b51677aca8d55b7937fc322 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 29 Jun 2024 20:47:59 +0200 Subject: [PATCH] ci: Install a newer Python 3.10 for QtWebKit image Starting with the upgrade to Hypothesis 6.103.4 we got hangs when pytest exits. This is caused by: https://github.com/HypothesisWorks/hypothesis/pull/4013 combined with: https://github.com/python/cpython/issues/102126 which was fixed in Python 3.10.11, but the latest 3.10 packaged by Archlinux was 3.10.10. Thus, we instead build a newer 3.10 from the AUR. This bumps the build time up to about 20 minutes on my machine, which is probably acceptable since those are nightly builds only anyways. We could probably half that by disabling --enable-optimization, but that would be at the cost of making the actual test runs (which run more often) slower. Closes #8247 --- scripts/dev/ci/docker/Dockerfile.j2 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index 042455b13..eef7f190a 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -36,11 +36,14 @@ RUN pacman -Su --noconfirm \ libyaml \ xorg-xdpyinfo +RUN useradd user -u 1001 && \ + mkdir /home/user && \ + chown user:users /home/user + {% if not webengine %} RUN pacman -U --noconfirm \ https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/p/python-pyqt5/python-pyqt5-5.15.7-2-x86_64.pkg.tar.zst \ - https://archive.archlinux.org/packages/p/python/python-3.10.10-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/i/icu/icu-72.1-2-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/l/libxml2/libxml2-2.10.4-4-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-base/qt5-base-5.15.10%2Bkde%2Br129-3-x86_64.pkg.tar.zst \ @@ -49,8 +52,15 @@ RUN pacman -U --noconfirm \ https://archive.archlinux.org/packages/q/qt5-sensors/qt5-sensors-5.15.10-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-location/qt5-location-5.15.10%2Bkde%2Br5-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-webchannel/qt5-webchannel-5.15.10%2Bkde%2Br3-1-x86_64.pkg.tar.zst +RUN pacman -S --noconfirm base-devel -RUN python3 -m ensurepip +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # needed for makepkg +USER user +RUN cd ~ && \ + git clone https://aur.archlinux.org/python310.git && \ + cd python310 && \ + makepkg -si --noconfirm +USER root RUN python3 -m pip install tox pyqt5-sip {% endif %} @@ -65,9 +75,6 @@ RUN python3 -m pip install tox pyqt5-sip RUN python3 -c "from {{ pyqt_module }} import QtWebKit, QtWebKitWidgets" {% endif %} -RUN useradd user -u 1001 && \ - mkdir /home/user && \ - chown user:users /home/user USER user WORKDIR /home/user RUN git config --global --add safe.directory /outside/.git