Skip to content

Commit 84e03f5

Browse files
authored
Merge pull request #223 from paddyroddy/main
Fix wheel building for `3.12`
2 parents a2d0b23 + fcb7a8d commit 84e03f5

1 file changed

Lines changed: 46 additions & 33 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,20 @@ jobs:
1313
name: Build SDist
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
17-
with:
18-
submodules: true
16+
- uses: actions/checkout@v4
1917

2018
- name: Build SDist
2119
run: pipx run build --sdist
2220

2321
- name: Check metadata
2422
run: pipx run twine check dist/*
2523

26-
- uses: actions/upload-artifact@v2
24+
- uses: actions/upload-artifact@v4
2725
with:
26+
name: artifact-sdist
2827
path: dist/*.tar.gz
2928

3029
build_wheels:
31-
strategy:
32-
fail-fast: false
33-
matrix:
34-
# Launch separate job for each python. The build is so much longer than
35-
# machine configuration/setup, so parallel builds will be faster. More
36-
# importantly, github times out after 6 hours _per job_.
37-
cpversion: ["cp36", "cp37", "cp38", "cp39", "cp310", "cp311"]
38-
os: [ { runs-on: ubuntu-latest, cibw-arch: manylinux_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_arm64}, { runs-on: windows-latest, cibw-arch: win_amd64} ]
39-
exclude:
40-
- os: { runs-on: macos-latest, cibw-arch: macosx_arm64}
41-
cpversion: "cp36"
42-
- os: { runs-on: macos-latest, cibw-arch: macosx_arm64}
43-
cpversion: "cp37"
44-
45-
46-
4730
name: Build wheels ${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }}
4831
runs-on: ${{ matrix.os.runs-on }}
4932

@@ -59,48 +42,78 @@ jobs:
5942
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
6043
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.13 CMAKE_OSX_ARCHITECTURES=\"${{ matrix.os.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.os.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.os.cibw-arch == 'macosx_universal2' && 'arm64;x86_64' || '' }}\""
6144

45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
# Launch separate job for each python. The build is so much longer than
49+
# machine configuration/setup, so parallel builds will be faster. More
50+
# importantly, github times out after 6 hours _per job_.
51+
cpversion:
52+
- cp36
53+
- cp37
54+
- cp38
55+
- cp39
56+
- cp310
57+
- cp311
58+
- cp312
59+
os:
60+
- runs-on: ubuntu-latest
61+
cibw-arch: manylinux_x86_64
62+
- runs-on: macos-latest
63+
cibw-arch: macosx_x86_64
64+
- runs-on: macos-latest
65+
cibw-arch: macosx_arm64
66+
- runs-on: windows-latest
67+
cibw-arch: win_amd64
68+
exclude:
69+
- cpversion: cp36
70+
os:
71+
runs-on: macos-latest
72+
cibw-arch: macosx_arm64
73+
- cpversion: cp37
74+
os:
75+
runs-on: macos-latest
76+
cibw-arch: macosx_arm64
6277

6378
steps:
64-
- uses: actions/checkout@v3
65-
with:
66-
submodules: 'recursive'
79+
- uses: actions/checkout@v4
6780

68-
- uses: actions/setup-python@v2
81+
- uses: actions/setup-python@v5
6982
name: Install Python
70-
with:
71-
python-version: '3.7'
7283

7384
- name: Install cibuildwheel
7485
run: |
7586
python -m pip install --upgrade pip
76-
python -m pip install cibuildwheel==2.12.0
87+
python -m pip install cibuildwheel
7788
7889
- name: Build wheels
7990
run: |
8091
python -m cibuildwheel --output-dir wheelhouse
8192
8293
# Upload binaries to github
83-
- uses: actions/upload-artifact@v2
94+
- uses: actions/upload-artifact@v4
8495
with:
85-
path: |
96+
name: artifact-wheel-${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }}
97+
path: |-
8698
./wheelhouse/*.whl
8799
./wheelhouse/*.tar.gz
88100
89101
# # Push the resulting binaries to pypi on a tag starting with 'v'
90102
upload_pypi:
91-
needs: [build_wheels]
103+
needs: build_wheels
92104
runs-on: ubuntu-latest
93105
# upload to PyPI on every tag starting with 'v'
94106
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
95107
# alternatively, to publish when a GitHub Release is created, use the following rule:
96108
if: github.event_name == 'release' && github.event.action == 'published'
97109
steps:
98-
- uses: actions/download-artifact@v2
110+
- uses: actions/download-artifact@v4
99111
with:
100-
name: artifact
112+
pattern: artifact-*
113+
merge-multiple: true
101114
path: dist
102115

103-
- uses: pypa/gh-action-pypi-publish@v1.5.0
116+
- uses: pypa/gh-action-pypi-publish@v1.8.11
104117
with:
105118
user: __token__
106119
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)