Skip to content

Commit

Permalink
workflows: run tests on Windows
Browse files Browse the repository at this point in the history
Use a hardcoded URL for an openslide-winbuild binary ZIP.
  • Loading branch information
bgilbert committed Apr 3, 2021
1 parent d943795 commit bb4c9b6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
windows:
name: Windows
runs-on: windows-latest
env:
WINBUILD_RELEASE: 20171122
defaults:
run:
shell: bash
Expand All @@ -61,14 +63,30 @@ jobs:
- name: Install Python tools
run: |
python -m pip install --upgrade pip
pip install wheel
pip install pytest wheel
- name: Install OpenSlide
run: |
case "${{ matrix.python-arch }}" in
x86) zipname=openslide-win32-${WINBUILD_RELEASE} ;;
x64) zipname=openslide-win64-${WINBUILD_RELEASE} ;;
esac
mkdir -p c:\\openslide
cd c:\\openslide
curl -LO "https://github.com/openslide/openslide-winbuild/releases/download/v${WINBUILD_RELEASE}/${zipname}.zip"
7z x ${zipname}.zip
echo "OPENSLIDE_PATH=c:\\openslide\\${zipname}\\bin" >> $GITHUB_ENV
- name: Build wheel
run: |
python setup.py bdist_wheel
basename=openslide-python-wheels-$GITHUB_RUN_NUMBER-$(echo $GITHUB_SHA | cut -c-10)
mkdir -p "artifacts/${basename}"
mv dist/*.whl "artifacts/${basename}"
echo "basename=${basename}" >> $GITHUB_ENV
- name: Install
run: pip install -e .
- name: Run tests
# Reads OPENSLIDE_PATH
run: pytest -v
- name: Archive wheel
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit bb4c9b6

Please sign in to comment.