Skip to content

Commit

Permalink
Merge branch 'master' into coverage_update
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz authored Oct 27, 2023
2 parents 7c20c2d + b3b222a commit 06ba03b
Show file tree
Hide file tree
Showing 115 changed files with 2,300 additions and 1,215 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# setup pre-commit
a098b2819173fb56a6f479df9b29ef76d2b63d56
49 changes: 43 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- main
- '*.x'

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
Expand All @@ -34,6 +38,7 @@ jobs:
PYSIDE6_VERSION: ${{ matrix.pyside6-version || matrix.qt6-version-default }}
PYSIDE6_QT_VERSION: ${{ matrix.pyside6-qt-version || matrix.pyside6-version || matrix.qt6-version-default }}
QSCINTILLA_VERSION: ${{ matrix.qscintilla-version || matrix.qscintilla-version-default }}
PYQT_EXTRAS: ${{ matrix.pyqt-extras || matrix.pyqt-extras-default }}
SKIP_PIP_CHECK: ${{ matrix.skip-pip-check }}
strategy:
fail-fast: false
Expand All @@ -44,30 +49,34 @@ jobs:
qt5-version-default: ['5.12']
qt6-version-default: ['6.3']
qscintilla-version-default: ['2.13']
pyqt-extras-default: ['No']
include:
- os: ubuntu-latest
special-invocation: 'xvfb-run --auto-servernum ' # Needed for GUI tests to work
- python-version: '3.11'
pyqt5-version: '5.15' # Python 3.11 needs 5.15+
pyside2-version: '5.15' # Python 3.11 needs 5.15+
pyside6-version: '6.4' # Python 3.11 needs 6.4+
pyside6-version: '6.5' # Python 3.11 needs 6.4+. Test upper bound
- use-conda: 'Yes'
skip-pyqt6: true # No PyQt6 conda packages yet
pyside6-version: '6.4' # Conda only has 6.4+
- use-conda: 'No'
pyqt5-version: '5.15' # Test with latest optional packages
- python-version: '3.7'
use-conda: 'Yes'
pyside2-version: '5.13' # Conda needs 5.13+ to work reliably
pyside2-qt-version: '5.12' # Conda only has 5.12 and 5.15, not 5.13
pyside6-version: '6.4' # Conda only has 6.4 for Python <3.8
- python-version: '3.11'
use-conda: 'No'
pyqt-extras: 'Yes' # Check PyQt extras
skip-pyside2: true # Pyside2 wheels don't support Python 3.11+
pyqt6-version: '6.5' # Test upper bound
pyside6-version: '6.5' # Test upper bound
- os: windows-latest
python-version: '3.7'
use-conda: 'Yes'
pyqt5-version: '5.9' # Test lower bound
skip-pyside6: true # Test hangs
skip-pyside6: true # Test hangs with 6.4. 6.5 is not available for Python 3.7
- os: windows-latest
python-version: '3.7'
use-conda: 'No'
Expand All @@ -76,13 +85,40 @@ jobs:
- os: windows-latest
python-version: '3.11'
use-conda: 'Yes'
skip-pyside6: true # Test hangs
pyside6-version: 6.5 # Test upper bound
- os: macos-latest
python-version: '3.7'
python-version: '3.11'
use-conda: 'No'
pyqt6-version: 6.4 # Test upper bound
pyqt6-version: 6.5 # Test upper bound
pyside2-version: 5.15 # Test upper bound
steps:
- name: Check job values
run: |
echo "---- General setup"
echo "OS:" ${{ matrix.os }}
echo "PYTHON_VERSION:" ${{ env.PYTHON_VERSION }}
echo "USE_CONDA:" ${{ env.USE_CONDA }}
echo "---- PyQt"
echo "PYQT_EXTRAS:" ${{ env.PYQT_EXTRAS }}
echo "---- PyQt5"
echo "SKIP_PYQT5:" ${{ matrix.skip-pyqt5 }}
echo "PYQT5_VERSION:" ${{ env.PYQT5_VERSION }}
echo "PYQT5_QT_VERSION:" ${{ env.PYQT5_QT_VERSION }}
echo "QSCINTILLA_VERSION:" ${{ env.QSCINTILLA_VERSION }}
echo "---- PyQt6"
echo "SKIP_PYQT6:" ${{ matrix.skip-pyqt6 }}
echo "PYQT6_VERSION:" ${{ env.PYQT6_VERSION }}
echo "PYQT6_QT_VERSION:" ${{ env.PYQT6_QT_VERSION }}
echo "---- PySide2"
echo "SKIP_PYSIDE2:" ${{ matrix.skip-pyside2 }}
echo "PYSIDE2_VERSION:" ${{ env.PYSIDE2_VERSION }}
echo "PYSIDE2_QT_VERSION:" ${{ env.PYSIDE2_QT_VERSION }}
echo "---- PySide6"
echo "SKIP_PYSIDE6:" ${{ matrix.skip-pyside6 }}
echo "PYSIDE6_VERSION:" ${{ env.PYSIDE6_VERSION }}
echo "PYSIDE6_QT_VERSION:" ${{ env.PYSIDE6_QT_VERSION }}
echo "---- Other"
echo "SKIP_PIP_CHECK:" ${{ env.SKIP_PIP_CHECK }}
- name: Checkout branch
uses: actions/checkout@v3
- name: Setup Python
Expand All @@ -95,6 +131,7 @@ jobs:
run: |
sudo apt update
sudo apt install libpulse-dev libegl1-mesa libopengl0 gstreamer1.0-gl
- uses: tlambert03/setup-qt-libs@v1
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
37 changes: 34 additions & 3 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,39 @@ conda activate test-env-${BINDING}
if [ "$USE_CONDA" = "No" ]; then

if [ "${1}" = "pyqt5" ]; then
pip install pyqt5==${PYQT5_VERSION}.* PyQtWebEngine==${PYQT5_VERSION}.* QScintilla==${QSCINTILLA_VERSION}.*

if [ "$PYQT_EXTRAS" = "Yes" ]; then
pip install pyqt5==${PYQT5_VERSION}.* \
PyQtWebEngine==${PYQT5_VERSION}.* \
QScintilla==${QSCINTILLA_VERSION}.* \
PyQt3D==${PYQT5_VERSION}.* \
PyQtChart==${PYQT5_VERSION}.* \
PyQtDataVisualization==${PYQT5_VERSION}.* \
PyQtNetworkAuth==${PYQT5_VERSION}.* \
PyQtPurchasing==${PYQT5_VERSION}.*
else
pip install pyqt5==${PYQT5_VERSION}.* \
PyQtWebEngine==${PYQT5_VERSION}.* \
QScintilla==${QSCINTILLA_VERSION}.*
fi

elif [ "${1}" = "pyqt6" ]; then
pip install pyqt6==${PYQT6_VERSION}.* PyQt6-WebEngine==${PYQT6_VERSION}.* PyQt6-Qt6==${PYQT6_QT_VERSION}.* PyQt6-QScintilla==${QSCINTILLA_VERSION}.*

if [ "$PYQT_EXTRAS" = "Yes" ]; then
pip install pyqt6==${PYQT6_VERSION}.* \
PyQt6-WebEngine==${PYQT6_VERSION}.* \
PyQt6-Qt6==${PYQT6_QT_VERSION}.* \
PyQt6-QScintilla \
PyQt6-3D==${PYQT6_VERSION}.* \
PyQt6-Charts==${PYQT6_VERSION}.* \
PyQt6-DataVisualization==${PYQT6_VERSION}.* \
PyQt6-NetworkAuth==${PYQT6_VERSION}.*
else
pip install pyqt6==${PYQT6_VERSION}.* \
PyQt6-WebEngine==${PYQT6_VERSION}.* \
PyQt6-Qt6==${PYQT6_QT_VERSION}.*
fi

elif [ "${1}" = "pyside2" ]; then
pip install pyside2==${PYSIDE2_VERSION}.*
elif [ "${1}" = "pyside6" ]; then
Expand All @@ -53,11 +83,12 @@ fi

# Build wheel of package
git clean -xdf -e *.coverage
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -bb -X dev -W error -m build

# Install package from built wheel
echo dist/*.whl | xargs -I % python -bb -X dev -W error -W "ignore::DeprecationWarning:pip._internal.locations._distutils" -W "ignore::DeprecationWarning:distutils.command.install" -m pip install --upgrade %
echo dist/*.whl | xargs -I % python -bb -X dev -W error -W "ignore::DeprecationWarning:pip._internal.locations._distutils" -W "ignore::DeprecationWarning:distutils.command.install" -W "ignore::DeprecationWarning:pip._internal.metadata.importlib._envs" -m pip install --upgrade %

# Print environment information
mamba list
Expand Down
Loading

0 comments on commit 06ba03b

Please sign in to comment.