feat: add pygfx-backed histogram #637
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
tags: [v*] | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
# run every week (for --pre release tests) | |
- cron: "0 0 * * 0" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-manifest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pipx run check-manifest | |
test: | |
name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.gui }} ${{ matrix.canvas }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# using 3.12 as main current version, until 3.13 support | |
# is ubiquitous in upstream dependencies | |
python-version: ["3.10", "3.12"] | |
gui: [pyside, pyqt, jupyter, wxpython] | |
canvas: [vispy, pygfx] | |
exclude: | |
# unsolved intermittent segfaults on this combo | |
- python-version: "3.10" | |
gui: pyside | |
# wxpython does not build wheels for ubuntu or macos-latest py3.10 | |
- os: ubuntu-latest | |
gui: wxpython | |
- os: macos-latest | |
gui: wxpython | |
python-version: "3.10" | |
include: | |
# test a couple more python variants, without | |
# full os/gui/canvas matrix coverage | |
- os: ubuntu-latest | |
python-version: "3.13" | |
gui: jupyter | |
canvas: vispy | |
- os: ubuntu-latest | |
python-version: "3.13" | |
gui: jupyter | |
canvas: pygfx | |
# pyside6 is struggling with 3.9 | |
- os: ubuntu-latest | |
python-version: "3.9" | |
gui: pyqt | |
canvas: vispy | |
- os: macos-13 | |
gui: wxpython | |
python-version: "3.9" | |
canvas: vispy | |
- os: windows-latest | |
gui: jupyter | |
python-version: "3.9" | |
canvas: pygfx | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: 📦 Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e '.[test,${{ matrix.gui }},${{ matrix.canvas }}]' | |
- uses: pyvista/setup-headless-display-action@v3 | |
with: | |
qt: ${{ matrix.gui == 'pyside' || matrix.gui == 'pyqt' }} | |
- name: Install llvmpipe and lavapipe for offscreen canvas | |
if: matrix.os == 'ubuntu-latest' && matrix.canvas == 'pygfx' | |
run: | | |
sudo apt-get update -y -qq | |
sudo apt install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers | |
- name: install pytest-qt | |
if: matrix.gui == 'pyside' || matrix.gui == 'pyqt' | |
run: pip install pytest-qt | |
- name: 🧪 Test | |
run: | | |
pytest --cov --cov-report=xml -v --color yes tests | |
- uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
test-array-libs: | |
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2 | |
with: | |
os: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
extras: "test,vispy,third_party_arrays,pyqt" | |
coverage-upload: artifact | |
pip-post-installs: "pytest-qt" | |
qt: pyqt6 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.10", "3.12"] | |
# make sure we can build docs without error | |
test-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
cache: "pip" | |
- name: 📦 Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e '.[docs]' | |
- name: 📚 Build docs | |
run: mkdocs build --strict | |
upload_coverage: | |
if: always() | |
needs: [test, test-array-libs] | |
uses: pyapp-kit/workflows/.github/workflows/upload-coverage.yml@v2 | |
secrets: | |
codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
deploy: | |
name: Deploy | |
needs: test | |
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: 👷 Build | |
run: | | |
python -m pip install build | |
python -m build | |
- name: 🚢 Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
files: "./dist/*" |