Skip to content

Commit ed3fb98

Browse files
committed
workflows: build and archive wheels on Windows
1 parent 2e86679 commit ed3fb98

1 file changed

Lines changed: 37 additions & 3 deletions

File tree

‎.github/workflows/python.yml‎

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
branches: [master]
88

99
jobs:
10-
build:
11-
name: Tests
10+
linux:
11+
name: Linux
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
@@ -26,10 +26,44 @@ jobs:
2626
pip install pytest
2727
- name: Install OpenSlide
2828
run: sudo apt-get install libopenslide0
29-
- name: Build
29+
- name: Install
3030
run: pip install -e .
3131
- name: Run tests
3232
run: pytest -v
33+
windows:
34+
name: Windows
35+
runs-on: windows-latest
36+
defaults:
37+
run:
38+
shell: bash
39+
strategy:
40+
matrix:
41+
python-version: [3.6, 3.7, 3.8, 3.9]
42+
python-arch: [x86, x64]
43+
steps:
44+
- name: Check out repo
45+
uses: actions/checkout@v2
46+
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.python-arch }}
47+
uses: actions/setup-python@v2
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
architecture: ${{ matrix.python-arch }}
51+
- name: Install Python tools
52+
run: |
53+
python -m pip install --upgrade pip
54+
pip install wheel
55+
- name: Build wheel
56+
run: |
57+
python setup.py bdist_wheel
58+
basename=openslide-python-wheels-$GITHUB_RUN_NUMBER-$(echo $GITHUB_SHA | cut -c-10)
59+
mkdir -p "artifacts/${basename}"
60+
mv dist/*.whl "artifacts/${basename}"
61+
echo "basename=${basename}" >> $GITHUB_ENV
62+
- name: Archive wheel
63+
uses: actions/upload-artifact@v2
64+
with:
65+
name: ${{ env.basename }}
66+
path: artifacts
3367
docs:
3468
name: Docs
3569
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)