|
6 | 6 | #- main |
7 | 7 | # Release branches |
8 | 8 | #- "[0-9]+.[0-9]+.X" |
9 | | - |
| 9 | + |
10 | 10 | tags: |
11 | 11 | - '*' |
12 | 12 |
|
13 | 13 | # Manual run |
14 | 14 | workflow_dispatch: |
15 | 15 |
|
16 | 16 | 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 }} |
19 | 19 | runs-on: ${{ matrix.os }} |
20 | 20 | strategy: |
21 | 21 | matrix: |
22 | | - python-version: [3.9] |
| 22 | + python: ['3.6', '3.7', '3.8', '3.9', '3.10'] |
23 | 23 | include: |
24 | | - - os: ubuntu-20.04 |
| 24 | + - os: [windows-latest] |
| 25 | + arch: ["x86"] |
25 | 26 | steps: |
26 | 27 | - name: Check out repository |
27 | 28 | uses: actions/checkout@v2 |
28 | 29 |
|
29 | | - - name: Set up Python ${{ matrix.python-version }} |
| 30 | + - name: Set up Python ${{ matrix.python }} |
30 | 31 | uses: actions/setup-python@v2 |
31 | 32 | with: |
32 | | - python-version: ${{ matrix.python-version }} |
| 33 | + python-version: ${{ matrix.python }} |
33 | 34 |
|
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 |
36 | 40 | |
37 | 41 | - name: Save sdist |
38 | 42 | uses: actions/upload-artifact@v2 |
39 | 43 | 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: |
48 | 51 | matrix: |
| 52 | + python: ['3.6', '3.7', '3.8', '3.9', '3.10'] |
49 | 53 | include: |
50 | | - - os: windows-2019 |
51 | | - arch: "AMD64" |
52 | | - - os: windows-2019 |
53 | | - arch: "x86" |
54 | | - |
| 54 | + - os: [windows-latest] |
| 55 | + arch: ["AMD64"] |
55 | 56 | 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 | + |
82 | 77 | upload_pypi_test: |
83 | 78 | name: Upload to PyPI test |
84 | | - needs: [wheels] |
| 79 | + needs: [build_wheels_win_32, build_wheels_win_64] |
85 | 80 | runs-on: ubuntu-latest |
86 | 81 | steps: |
87 | 82 | - uses: actions/download-artifact@v2 |
|
98 | 93 |
|
99 | 94 | upload_pypi: |
100 | 95 | name: Upload to PyPI |
101 | | - needs: [wheels] |
| 96 | + needs: [build_wheels_win_32, build_wheels_win_64] |
102 | 97 | runs-on: ubuntu-latest |
103 | 98 | # upload to PyPI test on every tag starting with 'v' |
104 | 99 | if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') |
|
0 commit comments