Skip to content

Commit 7e51750

Browse files
committed
Building wheel for Win x86 and x64
1 parent 5bd18d3 commit 7e51750

File tree

1 file changed

+45
-50
lines changed

1 file changed

+45
-50
lines changed

.github/workflows/deploy-wheels.yml

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,82 +6,77 @@ on:
66
#- main
77
# Release branches
88
#- "[0-9]+.[0-9]+.X"
9-
9+
1010
tags:
1111
- '*'
1212

1313
# Manual run
1414
workflow_dispatch:
1515

1616
jobs:
17-
sdist:
18-
name: Build ${{ matrix.architecture }} SOURCE on ${{ matrix.os }} for Python ${{ matrix.python-version }}
17+
build_wheels_win_32:
18+
name: Build Windows x86 wheels for Python ${{ matrix.python }}
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
matrix:
22-
python-version: [3.9]
22+
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
2323
include:
24-
- os: ubuntu-20.04
24+
- os: [windows-latest]
25+
arch: ["x86"]
2526
steps:
2627
- name: Check out repository
2728
uses: actions/checkout@v2
2829

29-
- name: Set up Python ${{ matrix.python-version }}
30+
- name: Set up Python ${{ matrix.python }}
3031
uses: actions/setup-python@v2
3132
with:
32-
python-version: ${{ matrix.python-version }}
33+
python-version: ${{ matrix.python }}
3334

34-
- name: Build sdist
35-
run: python setup.py sdist
35+
- name: Build bdist
36+
run: |
37+
python -m pip install setuptools --upgrade
38+
python -m pip install wheel --upgrade
39+
python setup.py bdist_wheel --plat-name=win32
3640
3741
- name: Save sdist
3842
uses: actions/upload-artifact@v2
3943
with:
40-
path: dist/*.tar.gz
41-
42-
wheels:
43-
name: Build ${{ matrix.arch }} WHEELS on ${{ matrix.os }}
44-
runs-on: ${{ matrix.os }}
45-
needs: [sdist]
46-
strategy:
47-
#https://github.com/scikit-build/cmake-python-distributions/blob/master/.github/workflows/build.yml
44+
path: dist/*.whl
45+
if-no-files-found: error
46+
47+
build_wheels_win_64:
48+
name: Build Windows x64 wheels for Python ${{ matrix.python }}
49+
runs-on: ${{ matrix.os }}
50+
strategy:
4851
matrix:
52+
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
4953
include:
50-
- os: windows-2019
51-
arch: "AMD64"
52-
- os: windows-2019
53-
arch: "x86"
54-
54+
- os: [windows-latest]
55+
arch: ["AMD64"]
5556
steps:
56-
- name: "Checkout files"
57-
uses: actions/checkout@v2
58-
59-
- name: Build wheels
60-
uses: pypa/cibuildwheel@v2.1.1
61-
env:
62-
CIBW_ARCHS: "${{ matrix.arch }}"
63-
64-
- name: "Upload artifact"
65-
uses: actions/upload-artifact@v2
66-
with:
67-
path: ./wheelhouse/*.whl
68-
if-no-files-found: error
69-
70-
#check_dist:
71-
# name: Check dist
72-
# needs: [sdist_win, wheels]
73-
# runs-on: ubuntu-20.04
74-
# steps:
75-
# - uses: actions/download-artifact@v2
76-
# with:
77-
# name: artifact
78-
# path: dist
79-
#
80-
# - run: pipx run twine check --strict dist/*
81-
57+
- name: Check out repository
58+
uses: actions/checkout@v2
59+
60+
- name: Set up Python ${{ matrix.python }}
61+
uses: actions/setup-python@v2
62+
with:
63+
python-version: ${{ matrix.python }}
64+
65+
- name: Build bdist wheel
66+
run: |
67+
python -m pip install setuptools --upgrade
68+
python -m pip install wheel --upgrade
69+
python setup.py bdist_wheel --plat-name=win_amd64
70+
71+
- name: Save wheel
72+
uses: actions/upload-artifact@v2
73+
with:
74+
path: dist/*.whl
75+
if-no-files-found: error
76+
8277
upload_pypi_test:
8378
name: Upload to PyPI test
84-
needs: [wheels]
79+
needs: [build_wheels_win_32, build_wheels_win_64]
8580
runs-on: ubuntu-latest
8681
steps:
8782
- uses: actions/download-artifact@v2
@@ -98,7 +93,7 @@ jobs:
9893

9994
upload_pypi:
10095
name: Upload to PyPI
101-
needs: [wheels]
96+
needs: [build_wheels_win_32, build_wheels_win_64]
10297
runs-on: ubuntu-latest
10398
# upload to PyPI test on every tag starting with 'v'
10499
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

0 commit comments

Comments
 (0)