Skip to content

Commit

Permalink
Merge pull request #265 from bgilbert/autobin
Browse files Browse the repository at this point in the history
workflows: autodetect latest openslide-bin release
  • Loading branch information
bgilbert committed Mar 19, 2024
2 parents 7a7e70d + c46c953 commit 2792f11
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ jobs:
name: Windows
needs: pre-commit
runs-on: windows-latest
env:
BIN_RELEASE: 20231011
defaults:
run:
shell: bash
Expand All @@ -171,11 +169,18 @@ jobs:
python -m pip install --upgrade pip
pip install build flask pytest
- name: Install OpenSlide
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p c:\\openslide
cd c:\\openslide
zipname=openslide-win64-${BIN_RELEASE}
curl -LfO "https://github.com/openslide/openslide-bin/releases/download/v${BIN_RELEASE}/${zipname}.zip"
release=$(gh release list -R openslide/openslide-bin -L 1 \
--json tagName --exclude-drafts --exclude-pre-releases | \
jq -r .[0].tagName | \
tr -d v)
zipname="openslide-win64-${release}"
gh release download -R openslide/openslide-bin "v${release}" \
--pattern "${zipname}.zip"
7z x ${zipname}.zip
echo "OPENSLIDE_PATH=c:\\openslide\\${zipname}\\bin" >> $GITHUB_ENV
- name: Build wheel
Expand Down

0 comments on commit 2792f11

Please sign in to comment.