15
15
16
16
jobs :
17
17
test-build-full :
18
- name : Test Linux
19
- runs-on : ubuntu-latest
18
+ name : Tests
20
19
timeout-minutes : 25
21
20
if : ${{ !github.event.pull_request.draft }}
22
21
strategy :
26
25
imgui_dep : ["imgui", ""]
27
26
notebook_dep : ["notebook", ""]
28
27
pygfx_version : ["pygfx-release", "pygfx-main"]
28
+ os : ["ubuntu-latest", "macos-latest"]
29
+ runs-on : ${{ matrix.os }}
29
30
steps :
30
31
- uses : actions/checkout@v4
31
32
with :
35
36
with :
36
37
python-version : ${{ matrix.python }}
37
38
- name : Install llvmpipe and lavapipe for offscreen canvas
39
+ if : ${{ matrix.os == 'ubuntu-latest' }}
38
40
run : |
39
41
sudo apt-get update -y -qq
40
42
sudo apt-get install --no-install-recommends -y ffmpeg libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers xorg-dev
43
+ - name : Set up Homebrew
44
+ if : ${{ matrix.os == 'macos-latest' }}
45
+ id : set-up-homebrew
46
+ uses : Homebrew/actions/setup-homebrew@master
47
+ - name : Install gsed
48
+ if : ${{ matrix.os == 'macos-latest' }}
49
+ run : |
50
+ brew install gnu-sed
51
+ echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH"
41
52
- name : Install pygx from main
42
53
if : ${{ matrix.pygfx_version == 'pygfx-main' }}
43
54
run : |
@@ -56,115 +67,30 @@ jobs:
56
67
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
57
68
- name : Test components
58
69
env :
59
- PYGFX_EXPECT_LAVAPIPE : true
70
+ WGPU_FORCE_OFFSCREEN : 1
60
71
run : |
61
- WGPU_FORCE_OFFSCREEN=1 pytest -v tests/
72
+ pytest -v tests/
62
73
- name : Test examples
63
74
env :
64
- PYGFX_EXPECT_LAVAPIPE : true
75
+ WGPU_FORCE_OFFSCREEN : 1
65
76
run : |
66
- WGPU_FORCE_OFFSCREEN=1 pytest -v examples/
77
+ pytest -v examples/
67
78
- name : Test examples notebooks, exclude ImageWidget notebook
68
79
if : ${{ matrix.notebook_dep == 'notebook' }}
69
80
env :
70
- PYGFX_EXPECT_LAVAPIPE : true
81
+ FASTPLOTLIB_NB_TESTS : 1
71
82
# test notebooks, exclude ImageWidget notebooks
72
- run : FASTPLOTLIB_NB_TESTS=1 pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "*.ipynb" ! -name "image_widget*.ipynb" -print | xargs)
83
+ run : pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "*.ipynb" ! -name "image_widget*.ipynb" -print | xargs)
73
84
- name : Test ImageWidget notebooks
74
85
# test image widget notebooks only if imgui is installed
75
86
if : ${{ matrix.notebook_dep == 'notebook' && matrix.imgui_dep == 'imgui' }}
76
87
env :
77
- PYGFX_EXPECT_LAVAPIPE : true
78
- run : FASTPLOTLIB_NB_TESTS=1 pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "image_widget*.ipynb" -print | xargs)
88
+ FASTPLOTLIB_NB_TESTS : 1
89
+ run : pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "image_widget*.ipynb" -print | xargs)
79
90
- uses : actions/upload-artifact@v4
80
91
if : ${{ failure() }}
81
92
with :
82
93
name : screenshot-diffs-${{ matrix.pyversion }}-${{ matrix.imgui_dep }}-${{ matrix.notebook_dep }}
83
94
path : |
84
95
examples/diffs
85
96
examples/notebooks/diffs
86
-
87
-
88
- # test-build-full-mac:
89
- # name: Test Mac, notebook + glfw
90
- # runs-on: macos-14
91
- # if: ${{ !github.event.pull_request.draft }}
92
- # strategy:
93
- # fail-fast: false
94
- # matrix:
95
- # include:
96
- # - name: Test py310
97
- # pyversion: '3.10'
98
- # - name: Test py311
99
- # pyversion: '3.11'
100
- # - name: Test py312
101
- # pyversion: '3.12'
102
- # steps:
103
- # - uses: actions/checkout@v3
104
- # with:
105
- # lfs: true
106
- # - name: Set up Python
107
- # uses: actions/setup-python@v3
108
- # with:
109
- # python-version: ${{ matrix.pyversion }}
110
- # - name: Install dev dependencies
111
- # run: |
112
- # python -m pip install --upgrade pip setuptools
113
- # # remove pygfx from install_requires, we install using pygfx@main
114
- # pip install -e ".["tests"]"
115
- # pip install git+https://github.com/pygfx/pygfx.git@main
116
- # - name: Show wgpu backend
117
- # run:
118
- # python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
119
- # - name: Test examples
120
- # run: |
121
- # pytest -v examples
122
- # pytest --nbmake examples/notebooks/
123
- # - uses: actions/upload-artifact@v3
124
- # if: ${{ failure() }}
125
- # with:
126
- # name: screenshot-diffs
127
- # path: |
128
- # examples/desktop/diffs
129
- # examples/notebooks/diffs
130
- #
131
- # test-build-glfw-mac:
132
- # name: Test Mac, glfw
133
- # runs-on: macos-14
134
- # if: ${{ !github.event.pull_request.draft }}
135
- # strategy:
136
- # fail-fast: false
137
- # matrix:
138
- # include:
139
- # - name: Test py310
140
- # pyversion: '3.10'
141
- # - name: Test py311
142
- # pyversion: '3.11'
143
- # - name: Test py312
144
- # pyversion: '3.12'
145
- # steps:
146
- # - uses: actions/checkout@v3
147
- # with:
148
- # lfs: true
149
- # - name: Set up Python
150
- # uses: actions/setup-python@v3
151
- # with:
152
- # python-version: ${{ matrix.pyversion }}
153
- # - name: Install dev dependencies
154
- # run: |
155
- # python -m pip install --upgrade pip setuptools
156
- # # remove pygfx from install_requires, we install using pygfx@main
157
- # pip install -e ".["tests-desktop"]"
158
- # pip install git+https://github.com/pygfx/pygfx.git@main
159
- # - name: Show wgpu backend
160
- # run:
161
- # python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
162
- # - name: Test examples
163
- # run: |
164
- # pytest -v examples
165
- # - uses: actions/upload-artifact@v3
166
- # if: ${{ failure() }}
167
- # with:
168
- # name: screenshot-diffs
169
- # path: |
170
- # examples/desktop/diffs
0 commit comments