4444 matrix :
4545 os : [ubuntu-latest, macos-latest]
4646 python-version : [3.8, 3.9, "3.10", "3.11", "3.12", "3.13-dev"]
47+ openslide : [package, openslide-bin]
4748 include :
4849 - os : ubuntu-latest
4950 python-version : " 3.12"
51+ openslide : package
5052 sdist : sdist
5153 # Python 3.8 is too old to support universal binaries, and
5254 # setup-python's Python 3.9 and 3.10 won't build them. Use the
8688 run : |
8789 python -m pip install --upgrade pip
8890 pip install auditwheel build jinja2 pytest
89- - name : Install OpenSlide
91+ - name : Install OpenSlide (package)
92+ if : matrix.openslide == 'package'
9093 run : |
9194 case "${{ matrix.os }}" in
9295 ubuntu-latest)
99102 brew install openslide
100103 ;;
101104 esac
105+ - name : Install OpenSlide (openslide-bin)
106+ if : matrix.openslide == 'openslide-bin'
107+ run : pip install openslide-bin
102108 - name : Build dist
103109 run : |
104110 if [ -z "${{ matrix.sdist }}" ]; then
@@ -124,9 +130,10 @@ jobs:
124130 fi
125131 mkdir -p "artifacts/whl/${{ needs.pre-commit.outputs.dist-base }}"
126132 mv dist/* "artifacts/whl/${{ needs.pre-commit.outputs.dist-base }}"
127- # save version-specific wheels and oldest abi3 wheel
133+ # from pkg builds, save version-specific wheels and oldest abi3 wheel
128134 python -c 'import sys
129- if sys.version_info < (3, 12): print("archive_wheel=1")' >> $GITHUB_ENV
135+ if sys.version_info < (3, 12) and "${{ matrix.openslide }}" == "package":
136+ print("archive_wheel=1")' >> $GITHUB_ENV
130137 - name : Install
131138 run : pip install artifacts/whl/${{ needs.pre-commit.outputs.dist-base }}/*.whl
132139 - name : Run tests
@@ -158,6 +165,7 @@ jobs:
158165 strategy :
159166 matrix :
160167 python-version : [3.8, 3.9, "3.10", "3.11", "3.12", "3.13-dev"]
168+ openslide : [zip, wheel]
161169 steps :
162170 - name : Check out repo
163171 uses : actions/checkout@v4
@@ -169,7 +177,8 @@ jobs:
169177 run : |
170178 python -m pip install --upgrade pip
171179 pip install build flask pytest
172- - name : Install OpenSlide
180+ - name : Install OpenSlide (zip)
181+ if : matrix.openslide == 'zip'
173182 env :
174183 GH_TOKEN : ${{ github.token }}
175184 run : |
@@ -184,14 +193,18 @@ jobs:
184193 --pattern "${zipname}.zip"
185194 7z x ${zipname}.zip
186195 echo "OPENSLIDE_PATH=c:\\openslide\\${zipname}\\bin" >> $GITHUB_ENV
196+ - name : Install OpenSlide (wheel)
197+ if : matrix.openslide == 'wheel'
198+ run : pip install openslide-bin
187199 - name : Build wheel
188200 run : |
189201 python -m build -w
190202 mkdir -p "artifacts/whl/${{ needs.pre-commit.outputs.dist-base }}"
191203 mv dist/*.whl "artifacts/whl/${{ needs.pre-commit.outputs.dist-base }}"
192- # save version-specific wheels and oldest abi3 wheel
193- python -c 'import sys
194- if sys.version_info < (3, 12): print("archive_wheel=1")' >> $GITHUB_ENV
204+ # from zip builds, save version-specific wheels and oldest abi3 wheel
205+ python -c 'import sys;
206+ if sys.version_info < (3, 12) and "${{ matrix.openslide }}" == "zip":
207+ print("archive_wheel=1")' >> $GITHUB_ENV
195208 - name : Install
196209 run : pip install artifacts/whl/${{ needs.pre-commit.outputs.dist-base }}/*.whl
197210 - name : Run tests
0 commit comments