diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1884de92c..405ee4bb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,8 @@ jobs: timeout-minutes: 30 strategy: matrix: - os: [ubuntu-18.04, ubuntu-latest, macos-10.15, macos-latest, windows-2019, windows-latest] - python-version: ['3.5', '3.6', '3.7', '3.8'] + os: [ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-12, windows-2016, windows-2022] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev'] fail-fast: false runs-on: ${{ matrix.os }} name: Test Py ${{ matrix.python-version }} - ${{ matrix.os }} @@ -33,9 +33,10 @@ jobs: pip freeze - name: Prepare Ubuntu if: runner.os == 'Linux' + # This is needed for PyQt6 to not crash with missing: libEGL.so.1 libGL.so.1 libglib-2.0.so.0 run: | - sudo apt-get update - sudo apt-get install -y libxkbcommon-x11-0 xvfb + sudo apt update + sudo apt install -y libegl1 libgl1 libglib2.0-0 - name: Install Mu dependencies run: | pip install .[dev] @@ -43,7 +44,7 @@ jobs: timeout-minutes: 10 - name: Run tests if: runner.os == 'Linux' - run: xvfb-run make check + run: QT_QPA_PLATFORM=offscreen python make.py check timeout-minutes: 5 - name: Run tests if: runner.os != 'Linux' @@ -51,30 +52,35 @@ jobs: timeout-minutes: 5 test-arm: + # Missing Qt6 versions of: python3-pyqt5.qsci python3-pyqt5.qtchart + # Using pip --use-deprecated=legacy-resolver, as it takes too long, revisit after updating dep versions + # Also had to force install cryptography, pyzmq, and cffi from piwheels, or it tries to build them from source + # Should also revisit if we need all the extra apt packages + if: false runs-on: ubuntu-latest - name: Test Py 3.7 - arm-debian-buster + name: Test Py 3.10 - arm-debian-bookworm steps: - uses: actions/checkout@v2 - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: 'linux/arm64,linux/arm/v7,linux/arm/v6' - name: Check Debian image info - uses: docker://multiarch/debian-debootstrap:armhf-buster + uses: docker://arm32v7/debian:bookworm with: - args: /bin/bash -c "uname -a && cat /etc/os-release" + args: bash -c "uname -a && cat /etc/os-release" + # This is testing armv7, we could create a matrix for armv8 (aarch64) as well - name: Install dependencies and run tests - uses: docker://multiarch/debian-debootstrap:armhf-buster + uses: docker://arm32v7/debian:bookworm with: args: > bash -c " - apt-get update && - apt-get install -y python3 python3-pip python3-virtualenv && - apt-get install -y python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtserialport python3-pyqt5.qtsvg python3-pyqt5.qtchart && - apt-get install -y libxmlsec1-dev libxml2 libxml2-dev libxkbcommon-x11-0 libatlas-base-dev && - apt-get install -y git xvfb && + apt update && + apt install -y python3 python3-pip python3-virtualenv && + apt install -y python3-pyqt6 python3-pyqt6.qtserialport python3-pyqt6.qtsvg && + apt install -y libxmlsec1-dev libxml2 libxml2-dev libxkbcommon-x11-0 libatlas-base-dev && python3 -m virtualenv venv --python=python3 --system-site-packages && source venv/bin/activate && python -c \"import platform, struct, sys; print(platform.machine(), struct.calcsize('P') * 8, sys.version)\" && @@ -82,19 +88,22 @@ jobs: python -m pip config set global.extra-index-url https://www.piwheels.org/simple && python -m pip config list && python -m pip list && - python -m pip install .[dev] && + python -m pip install cryptography pyzmq cffi --python-version 3.9 --only-binary \":all:\" --no-deps --target venv/lib/python3.10/site-packages/ && + python -m pip install .[dev] --use-deprecated=legacy-resolver && python -m pip list && QT_QPA_PLATFORM=\"offscreen\" && - xvfb-run python make.py check && + python make.py check && echo 'Finished successfully! :)' " test-pios: + # Pi OS images don't have python3-pyqt6 packages, so will have to enable and update in the future + if: false name: Test PiOS ${{ matrix.docker-tag }} runs-on: ubuntu-latest strategy: matrix: - docker-tag: ['stretch-2018-03-13', 'buster-2021-05-28', 'buster-legacy-2022-04-07'] + docker-tag: ['buster-2021-05-28', 'buster-legacy-2022-04-07'] fail-fast: false services: rpios: diff --git a/setup.py b/setup.py index 48c51cec1..452f92754 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ "flake8 >= 3.8.3", # Clamp click max version to workaround incompatibility with black<22.1.0 "click<=8.0.4", - "black>=19.10b0,<22.1.0;python_version>'3.5'", + "black>=19.10b0,<22.1.0", "appdirs>=1.4.3", "semver>=2.8.0", # virtualenv vendors pip, we need at least pip v19.3 to install some @@ -128,7 +128,7 @@ "mu.modes.api", "mu.wheels", ], - python_requires=">=3.5,<3.9", + python_requires=">=3.7,<3.12", install_requires=install_requires, extras_require=extras_require, package_data={"mu.wheels": ["*.whl", "*.zip"]}, @@ -147,10 +147,11 @@ "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Education", "Topic :: Games/Entertainment", "Topic :: Software Development",