Skip to content

feat: rgb, v2

feat: rgb, v2 #843

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: [v*]
pull_request:
workflow_dispatch:
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 }}
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_FROZEN: 1
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
# this one always segfaults
- python-version: "3.12"
os: ubuntu-latest
gui: pyside
canvas: vispy
- 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: ubuntu-latest
python-version: "3.11"
gui: pyqt
canvas: vispy
- os: ubuntu-latest
python-version: "3.13"
gui: pyqt
canvas: pygfx
- 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 uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
# https://github.com/pyvista/setup-headless-display-action/pull/26
- name: Configure curl to disable revocation checks and add retries
if: matrix.os == 'windows-latest'
run: |
echo --ssl-no-revoke > C:\Users\runneradmin\_curlrc
echo '--retry 5' >> C:\Users\runneradmin\_curlrc
type C:\Users\runneradmin\_curlrc
- 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: 🧪 Test (attempt 1)
id: test1
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" cov=1
- name: 🧪 Test (attempt 2)
if: steps.test1.outcome == 'failure'
id: test2
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" cov=1 verbose=1
- name: 🧪 Test (attempt 3)
if: steps.test2.outcome == 'failure'
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" cov=1 verbose=1
- name: 🧪 Test min dependencies (attempt 1)
id: min1
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" min=1
- name: 🧪 Test min dependencies (attempt 2)
if: steps.min1.outcome == 'failure'
id: min2
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" min=1 verbose=1
- name: 🧪 Test min dependencies (attempt 3)
if: steps.min2.outcome == 'failure'
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" min=1 verbose=1
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: covreport-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.gui }}-${{ matrix.canvas }}
path: ./.coverage*
include-hidden-files: true
test-array-libs:
runs-on: ubuntu-latest
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_FROZEN: 1
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: pyvista/setup-headless-display-action@v3
with:
qt: true
- name: Install llvmpipe and lavapipe for offscreen canvas
run: sudo apt install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: 🧪 Test (attempt 1)
id: test1
continue-on-error: true
run: make test extras="pyqt,pygfx" groups="array-libs" cov=1
- name: 🧪 Test (attempt 2)
if: steps.test1.outcome == 'failure'
id: test2
run: make test extras="pyqt,pygfx" groups="array-libs" cov=1 verbose=1
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: covreport-py${{ matrix.python-version }}-array-libs
path: ./.coverage*
include-hidden-files: true
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 }}
# make sure we can build docs without error
test-docs:
runs-on: macos-latest # nicer screenshots
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: 📚 Build docs
run: uv run --group docs mkdocs build --strict
- uses: actions/upload-artifact@v4
with:
name: docs
path: site
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/*"