Conversation
|
📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/simplify-ci |
|
oh shit this is actually working 🤯 |
|
wow after lots of git actions bash wrangling and sed garbling my idea actually worked 😲 ! @clewis7 this will require a more thorough review XD |
| 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: 30 | ||
| if: ${{ !github.event.pull_request.draft }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: Test py311 | ||
| pyversion: '3.11' | ||
| - name: Test py312 | ||
| pyversion: '3.12' | ||
| - name: Test py313 | ||
| pyversion: '3.13' | ||
| 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 xorg-dev | ||
| - 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 |
There was a problem hiding this comment.
git is stupid, this entire block is actually the previous non-notebooks test pipeline that came after afterwards
| name: Test Linux | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| timeout-minutes: 10 |
There was a problem hiding this comment.
we can go back to 10 mins now that we don't have python3.10 which required more time due to no imgui wheels existing for it.
| # 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/,$//")]" |
There was a problem hiding this comment.
I copy pasted the sed from stackoverflow
|
Oh wait I can use bash to exclude the ImageWidget nb for the pytest call when imgui doesn't exists |
| # 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/,$//")]" |
I wouldn't say I like the sed, it's an ugly garble but useful 😂 |
A successfull attempt to do the following: 😄
Also updated to use uplaod-artifacts v4, but for reasons I do not understand it merges the imgui and non-imgui images within the same uploaded zip file even though I specify two separate filenames as specified by their docs. One of the artifacts contains both the imgui and non-imgui screnshots (wtf?) and the other one has only the imgui versions which makes no sense (wtf 2) 🤷♂️ . Anyways this is fine for us for now so I don't think we should hold back for this minor quirk of upload-artifacts (they might fix it in a future version sooner than us figuring it out)
closes #678