Skip to content

update contrib guide, add developer notes #1153

update contrib guide, add developer notes

update contrib guide, add developer notes #1153

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
test-build-full:
name: Test Linux, notebook + offscreen
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
include:
- name: Test py310
pyversion: '3.10'
- name: Test py311
pyversion: '3.11'
- name: Test py312
pyversion: '3.12'
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyversion }}
- name: Install llvmpipe and lavapipe for offscreen canvas
run: |
sudo apt-get update -y -qq
sudo apt-get install --no-install-recommends -y ffmpeg libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip setuptools
# remove pygfx from install_requires, we install using pygfx@main
sed -i "/pygfx/d" ./setup.py
pip install git+https://github.com/pygfx/pygfx.git@main
pip install -e ".["tests"]"
- name: Show wgpu backend
run:
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
- name: fetch git lfs files
run: |
git lfs fetch --all
git lfs pull
- name: Test examples
env:
PYGFX_EXPECT_LAVAPIPE: true
run: |
WGPU_FORCE_OFFSCREEN=1 pytest -v tests/
pytest -v examples
FASTPLOTLIB_NB_TESTS=1 pytest --nbmake examples/notebooks/
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: screenshot-diffs
path: |
examples/diffs
examples/notebooks/diffs
test-build-offscreen:
name: Test Linux, only offscreen
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
include:
- name: Test py310
pyversion: '3.10'
- name: Test py311
pyversion: '3.11'
- name: Test py312
pyversion: '3.12'
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyversion }}
- name: Install llvmpipe and lavapipe for offscreen canvas
run: |
sudo apt-get update -y -qq
sudo apt-get install --no-install-recommends -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip setuptools
# remove pygfx from install_requires, we install using pygfx@main
sed -i "/pygfx/d" ./setup.py
pip install git+https://github.com/pygfx/pygfx.git@main
pip install -e ".["tests-desktop"]"
- name: Show wgpu backend
run:
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
- name: fetch git lfs files
run: |
git lfs fetch --all
git lfs pull
- name: Test examples
env:
PYGFX_EXPECT_LAVAPIPE: true
run: |
WGPU_FORCE_OFFSCREEN=1 pytest -v tests/
pytest -v examples
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: screenshot-diffs
path: |
examples/diffs
# test-build-full-mac:
# name: Test Mac, notebook + glfw
# runs-on: macos-14
# if: ${{ !github.event.pull_request.draft }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - name: Test py310
# pyversion: '3.10'
# - name: Test py311
# pyversion: '3.11'
# - name: Test py312
# pyversion: '3.12'
# steps:
# - uses: actions/checkout@v3
# with:
# lfs: true
# - name: Set up Python
# uses: actions/setup-python@v3
# with:
# python-version: ${{ matrix.pyversion }}
# - name: Install dev dependencies
# run: |
# python -m pip install --upgrade pip setuptools
# # remove pygfx from install_requires, we install using pygfx@main
# pip install -e ".["tests"]"
# pip install git+https://github.com/pygfx/pygfx.git@main
# - name: Show wgpu backend
# run:
# python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
# - name: Test examples
# run: |
# pytest -v examples
# pytest --nbmake examples/notebooks/
# - uses: actions/upload-artifact@v3
# if: ${{ failure() }}
# with:
# name: screenshot-diffs
# path: |
# examples/desktop/diffs
# examples/notebooks/diffs
#
# test-build-glfw-mac:
# name: Test Mac, glfw
# runs-on: macos-14
# if: ${{ !github.event.pull_request.draft }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - name: Test py310
# pyversion: '3.10'
# - name: Test py311
# pyversion: '3.11'
# - name: Test py312
# pyversion: '3.12'
# steps:
# - uses: actions/checkout@v3
# with:
# lfs: true
# - name: Set up Python
# uses: actions/setup-python@v3
# with:
# python-version: ${{ matrix.pyversion }}
# - name: Install dev dependencies
# run: |
# python -m pip install --upgrade pip setuptools
# # remove pygfx from install_requires, we install using pygfx@main
# pip install -e ".["tests-desktop"]"
# pip install git+https://github.com/pygfx/pygfx.git@main
# - name: Show wgpu backend
# run:
# python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
# - name: Test examples
# run: |
# pytest -v examples
# - uses: actions/upload-artifact@v3
# if: ${{ failure() }}
# with:
# name: screenshot-diffs
# path: |
# examples/desktop/diffs