Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bgilbert committed Nov 1, 2023
1 parent a7b7200 commit 4a9bd80
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install Python tools
run: |
python -m pip install --upgrade pip
pip install build jinja2 pytest
pip install auditwheel build jinja2 setuptools pytest
- name: Install OpenSlide
run: |
case "${{ matrix.os }}" in
Expand All @@ -53,13 +53,36 @@ jobs:
;;
esac
- name: Build wheel
run: python -m build -w
run: |
if [[ "${{ matrix.os }}" == macos-* ]]; then
py_cflags=$(python -c 'import sysconfig; print(sysconfig.get_config_vars()["CFLAGS"])')
echo "Python compile flags: $py_cflags"
if [[ $py_cflags !~ "-arch x86_64" || $py_cflags !~ "-arch arm64" ]]; then
echo "Working around missing universal binary flags"
export CFLAGS="-arch x86_64 -arch arm64"
export LDFLAGS="$CFLAGS"
fi
fi
python -m build -w
if [[ "${{ matrix.os }}" == ubuntu-* ]]; then
mv dist old
auditwheel repair --only-plat -w dist old/*whl
fi
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 dist/*.whl
run: pip install artifacts/${basename}/*.whl
- name: Run tests
run: pytest -v
- name: Tile slide
run: python examples/deepzoom/deepzoom_tile.py --viewer -o tiled tests/fixtures/small.svs
- name: Archive wheel
uses: actions/upload-artifact@v3
with:
name: ${{ env.basename }}
path: artifacts
windows:
name: Windows
needs: pre-commit
Expand Down

0 comments on commit 4a9bd80

Please sign in to comment.