From f6d0fe2977605ade5e45997d72a539d5f01eb133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Demarchi?= Date: Sat, 18 May 2024 10:29:54 +0200 Subject: [PATCH 1/5] Adding tests for arch with py39 --- .github/workflows/integtests.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integtests.yaml b/.github/workflows/integtests.yaml index b7b81de..ddd65da 100644 --- a/.github/workflows/integtests.yaml +++ b/.github/workflows/integtests.yaml @@ -21,12 +21,24 @@ jobs: fetch-depth: 0 - name: Install dependencies run: | - pacman -Sy --noconfirm python3 python-setuptools + pacman -Sy --noconfirm python3 python-setuptools base-devel bluez-libs gdb tk - name: Simple fades run run: | cd /fades bin/fades -v -d pytest -x pytest --version - # XXX Facundo 2024-03-01: "using a different Python" is missing here because Arch is hard + - name: Using a different Python + run: | + mkdir /build + chown nobody: /build + cd /build + sudo -u nobody curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/python39.tar.gz + sudo -u nobody tar xf python39.tar.gz + cd python39 + makepkg --noconfirm + pacman -U python39* --noconfirm + cd /fades + export TEST_PYTHON_VERSION=3.9 + python bin/fades -v --python=python3.9 -d pytest -x pytest -v tests/integtest.py fedora: runs-on: ubuntu-latest From 95ef3914d07ff3ff24d204b10799a7334ebe9f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Demarchi?= Date: Sat, 18 May 2024 10:40:31 +0200 Subject: [PATCH 2/5] Also update dependencies, the image can have some old ones --- .github/workflows/integtests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integtests.yaml b/.github/workflows/integtests.yaml index ddd65da..80e6b6a 100644 --- a/.github/workflows/integtests.yaml +++ b/.github/workflows/integtests.yaml @@ -21,7 +21,7 @@ jobs: fetch-depth: 0 - name: Install dependencies run: | - pacman -Sy --noconfirm python3 python-setuptools base-devel bluez-libs gdb tk + pacman -Suy --noconfirm python3 python-setuptools base-devel bluez-libs gdb tk - name: Simple fades run run: | cd /fades From c7dc09b0677950d381e024492f7af38847a0e5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Demarchi?= Date: Sat, 18 May 2024 10:42:01 +0200 Subject: [PATCH 3/5] makepkg also has to be run as nobody --- .github/workflows/integtests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integtests.yaml b/.github/workflows/integtests.yaml index 80e6b6a..17812d1 100644 --- a/.github/workflows/integtests.yaml +++ b/.github/workflows/integtests.yaml @@ -34,7 +34,7 @@ jobs: sudo -u nobody curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/python39.tar.gz sudo -u nobody tar xf python39.tar.gz cd python39 - makepkg --noconfirm + sudo -u nobody makepkg --noconfirm pacman -U python39* --noconfirm cd /fades export TEST_PYTHON_VERSION=3.9 From 76064523c144b21e89e62871d0b3a2a0a6df8337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Demarchi?= Date: Sat, 18 May 2024 10:46:37 +0200 Subject: [PATCH 4/5] virtualenv install missed --- .github/workflows/integtests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integtests.yaml b/.github/workflows/integtests.yaml index 17812d1..bee0ee3 100644 --- a/.github/workflows/integtests.yaml +++ b/.github/workflows/integtests.yaml @@ -37,6 +37,7 @@ jobs: sudo -u nobody makepkg --noconfirm pacman -U python39* --noconfirm cd /fades + pacman -Suy --noconfirm python-virtualenv export TEST_PYTHON_VERSION=3.9 python bin/fades -v --python=python3.9 -d pytest -x pytest -v tests/integtest.py From d30183650291e7f4fea9f264c0703207cbe8ba16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Demarchi?= Date: Sat, 18 May 2024 11:20:59 +0200 Subject: [PATCH 5/5] use image with python39 already installed --- .github/workflows/integtests.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integtests.yaml b/.github/workflows/integtests.yaml index bee0ee3..5dfd39d 100644 --- a/.github/workflows/integtests.yaml +++ b/.github/workflows/integtests.yaml @@ -11,7 +11,8 @@ jobs: archlinux: runs-on: ubuntu-latest container: - image: archlinux:latest + # Use https://github.com/gilgamezh/archlinux-python39 to save the python build time + image: gilgamezh/archlinux-python39:latest volumes: - ${{ github.workspace }}:/fades steps: @@ -21,23 +22,14 @@ jobs: fetch-depth: 0 - name: Install dependencies run: | - pacman -Suy --noconfirm python3 python-setuptools base-devel bluez-libs gdb tk + pacman -Suy --noconfirm python3 python-setuptools - name: Simple fades run run: | cd /fades bin/fades -v -d pytest -x pytest --version - name: Using a different Python run: | - mkdir /build - chown nobody: /build - cd /build - sudo -u nobody curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/python39.tar.gz - sudo -u nobody tar xf python39.tar.gz - cd python39 - sudo -u nobody makepkg --noconfirm - pacman -U python39* --noconfirm - cd /fades - pacman -Suy --noconfirm python-virtualenv + pacman -S --noconfirm python-virtualenv export TEST_PYTHON_VERSION=3.9 python bin/fades -v --python=python3.9 -d pytest -x pytest -v tests/integtest.py