use LineInfiniteSegmentMaterial
for LinearSelector
(#813)
#277
This file contains hidden or 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 | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
jobs: | |
test-build-full: | |
name: Tests - pygfx release | |
timeout-minutes: 25 | |
if: ${{ !github.event.pull_request.draft }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.11", "3.12", "3.13"] | |
imgui_dep: ["imgui", ""] | |
notebook_dep: ["notebook", ""] | |
os: ["ubuntu-latest", "macos-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install llvmpipe and lavapipe for offscreen canvas | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
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 xorg-dev | |
- name: Set up Homebrew | |
if: ${{ matrix.os == 'macos-latest' }} | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install gsed | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
brew install gnu-sed | |
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH" | |
- name: Install fastplotlib | |
run: | | |
# create string with one of: tests,imgui,notebook; test,imgui; test,notebook ; tests | |
# sed removes trailing comma | |
# install fastplotlib with given extras options from above | |
pip install -e ".[$(echo "tests,${{ matrix.imgui_dep }},${{ matrix.notebook_dep }}" | sed -e "s/,\+/,/g" -e "s/,$//")]" | |
- name: Show wgpu backend | |
run: | |
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)" | |
- name: Test components | |
env: | |
RENDERCANVAS_FORCE_OFFSCREEN: 1 | |
run: | | |
pytest -v tests/ | |
- name: Test examples | |
env: | |
RENDERCANVAS_FORCE_OFFSCREEN: 1 | |
run: | | |
pytest -v examples/ | |
- name: Test examples notebooks, exclude ImageWidget notebook | |
if: ${{ matrix.notebook_dep == 'notebook' }} | |
env: | |
FASTPLOTLIB_NB_TESTS: 1 | |
# test notebooks, exclude ImageWidget notebooks | |
run: pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "*.ipynb" ! -name "image_widget*.ipynb" -print | xargs) | |
- name: Test ImageWidget notebooks | |
# test image widget notebooks only if imgui is installed | |
if: ${{ matrix.notebook_dep == 'notebook' && matrix.imgui_dep == 'imgui' }} | |
env: | |
FASTPLOTLIB_NB_TESTS: 1 | |
run: pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "image_widget*.ipynb" -print | xargs) | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: screenshot-diffs-${{ matrix.os }}-${{ matrix.pyversion }}-${{ matrix.imgui_dep }}-${{ matrix.notebook_dep }} | |
path: | | |
examples/diffs | |
examples/notebooks/diffs |