2020-12-24 07:04:30 +00:00
|
|
|
name: main
|
2020-12-20 05:33:52 +00:00
|
|
|
|
2020-12-22 20:48:36 +00:00
|
|
|
on: [push, pull_request]
|
2020-12-20 05:33:52 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-12-22 20:48:36 +00:00
|
|
|
test:
|
2020-12-22 20:20:14 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
timeout-minutes: 30
|
2020-12-20 05:33:52 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-15 21:10:41 +00:00
|
|
|
os: [ubuntu-20.04 , windows-latest, macos-latest]
|
|
|
|
qt-lib: [pyqt, pyside]
|
2020-12-20 05:33:52 +00:00
|
|
|
python-version: [3.7, 3.8, 3.9]
|
|
|
|
include:
|
|
|
|
- python-version: "3.7"
|
2021-01-15 21:10:41 +00:00
|
|
|
qt-lib: "pyqt"
|
|
|
|
qt-version: "PyQt5~=5.12.0"
|
2020-12-20 05:33:52 +00:00
|
|
|
numpy-version: "~=1.17.0"
|
2021-01-15 21:10:41 +00:00
|
|
|
- python-version: "3.7"
|
|
|
|
qt-lib: "pyside"
|
|
|
|
qt-version: "PySide2~=5.12.0"
|
|
|
|
numpy-version: "~=1.17.0"
|
|
|
|
- python-version: "3.8"
|
|
|
|
qt-lib: "pyqt"
|
|
|
|
qt-version: "PyQt5~=5.15.0"
|
|
|
|
numpy-version: "~=1.19.0"
|
2020-12-20 05:33:52 +00:00
|
|
|
- python-version: "3.8"
|
2021-01-15 21:10:41 +00:00
|
|
|
qt-lib: "pyside"
|
|
|
|
qt-version: "PySide2~=5.15.0"
|
2020-12-20 05:33:52 +00:00
|
|
|
numpy-version: "~=1.19.0"
|
|
|
|
- python-version: "3.9"
|
2021-01-15 21:10:41 +00:00
|
|
|
qt-lib: "pyqt"
|
2021-01-18 04:38:28 +00:00
|
|
|
qt-version: "PyQt6"
|
2021-01-15 21:10:41 +00:00
|
|
|
numpy-version: "~=1.19.0"
|
|
|
|
- python-version: "3.9"
|
|
|
|
qt-lib: "pyside"
|
|
|
|
qt-version: "PySide6"
|
|
|
|
numpy-version: "~=1.19.0"
|
2020-12-20 05:33:52 +00:00
|
|
|
steps:
|
2021-01-20 04:10:00 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Checkout test-data
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: pyqtgraph/test-data
|
|
|
|
path: .pyqtgraph/test-data
|
2020-12-20 05:33:52 +00:00
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
# Semantic version range syntax or exact version of a Python version
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: "Install Windows-Mesa OpenGL DLL"
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2020-12-22 06:21:35 +00:00
|
|
|
curl -LJO https://github.com/pal1000/mesa-dist-win/releases/download/19.2.7/mesa3d-19.2.7-release-msvc.7z
|
|
|
|
7z x mesa3d-19.2.7-release-msvc.7z
|
2020-12-20 05:33:52 +00:00
|
|
|
cd x64
|
|
|
|
xcopy opengl32.dll C:\windows\system32\mesadrv.dll*
|
|
|
|
xcopy opengl32.dll C:\windows\syswow64\mesadrv.dll*
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v DLL /t REG_SZ /d "mesadrv.dll" /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v DriverVersion /t REG_DWORD /d 1 /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v Flags /t REG_DWORD /d 1 /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v Version /t REG_DWORD /d 2 /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v DLL /t REG_SZ /d "mesadrv.dll" /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v DriverVersion /t REG_DWORD /d 1 /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v Flags /t REG_DWORD /d 1 /f
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL" /v Version /t REG_DWORD /d 2 /f
|
|
|
|
shell: cmd
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
2020-12-22 20:15:59 +00:00
|
|
|
pip install --upgrade pip
|
2021-01-29 08:13:27 +00:00
|
|
|
pip install ${{ matrix.qt-version }} numpy${{ matrix.numpy-version }} scipy pyopengl h5py matplotlib
|
2020-12-20 05:33:52 +00:00
|
|
|
pip install .
|
2020-12-22 07:19:38 +00:00
|
|
|
pip install pytest pytest-cov pytest-xdist coverage
|
2020-12-20 05:33:52 +00:00
|
|
|
- name: "Install Linux VirtualDisplay"
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
2021-01-21 22:14:17 +00:00
|
|
|
sudo apt-get update -y
|
2020-12-22 05:39:31 +00:00
|
|
|
sudo apt-get install -y libxkbcommon-x11-0 x11-utils
|
|
|
|
sudo apt-get install --no-install-recommends -y libyaml-dev libegl1-mesa libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0
|
2021-01-15 21:10:41 +00:00
|
|
|
sudo apt-get install -y libopengl0
|
2020-12-20 05:33:52 +00:00
|
|
|
pip install pytest-xvfb
|
|
|
|
- name: 'Debug Info'
|
|
|
|
run: |
|
|
|
|
echo python location: `which python`
|
|
|
|
echo python version: `python --version`
|
|
|
|
echo pytest location: `which pytest`
|
|
|
|
echo installed packages
|
|
|
|
pip list
|
|
|
|
echo pyqtgraph system info
|
|
|
|
python -c "import pyqtgraph as pg; pg.systemInfo()"
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
QT_DEBUG_PLUGINS: 1
|
2020-12-22 05:39:31 +00:00
|
|
|
- name: 'XVFB Display Info'
|
|
|
|
run: |
|
|
|
|
xvfb-run --server-args="-screen 0, 1920x1200x24 -ac +extension GLX +render -noreset" python -c "from pyqtgraph.opengl.glInfo import GLTest"
|
|
|
|
xvfb-run --server-args="-screen 0, 1920x1200x24 -ac +extension GLX +render -noreset" python -m pyqtgraph.util.get_resolution
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
- name: 'Display Info'
|
|
|
|
run: |
|
|
|
|
python -c "from pyqtgraph.opengl.glInfo import GLTest"
|
|
|
|
python -m pyqtgraph.util.get_resolution
|
|
|
|
if: runner.os != 'Linux'
|
2020-12-20 05:33:52 +00:00
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
2020-12-22 20:48:36 +00:00
|
|
|
mkdir $SCREENSHOT_DIR
|
2021-04-11 13:51:44 +00:00
|
|
|
pytest pyqtgraph examples -v \
|
2020-12-22 07:19:38 +00:00
|
|
|
-n auto \
|
2020-12-24 07:04:30 +00:00
|
|
|
--junitxml pytest.xml \
|
2020-12-20 05:33:52 +00:00
|
|
|
--cov pyqtgraph --cov-report=xml --cov-report=html
|
|
|
|
shell: bash
|
2020-12-22 20:48:36 +00:00
|
|
|
- name: Upload Screenshots
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Screenshots (Python ${{ matrix.python-version }} - Qt-Bindings ${{ matrix.qt-lib }} - OS ${{ matrix.os }})
|
|
|
|
path: $SCREENSHOT_DIR
|
|
|
|
if-no-files-found: ignore
|
|
|
|
env:
|
|
|
|
SCREENSHOT_DIR: ./screenshots
|
2020-12-22 20:20:14 +00:00
|
|
|
|
|
|
|
build-wheel:
|
2020-12-22 20:48:36 +00:00
|
|
|
name: build wheel
|
2020-12-22 20:20:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python 3.9
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.9'
|
|
|
|
- name: Build Wheel
|
|
|
|
run: |
|
|
|
|
python -m pip install setuptools wheel
|
|
|
|
python setup.py bdist_wheel
|