Skip to content

Commit 1c704d1

Browse files
authored
Merge pull request #2450 from QuLogic/py313-wheels
ci: Drop cibuildwheel matrix generation
2 parents d3a6e72 + fcb8707 commit 1c704d1

File tree

1 file changed

+27
-38
lines changed

1 file changed

+27
-38
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Build and upload to PyPI
23

34
concurrency:
@@ -18,9 +19,12 @@ on:
1819
- reopened
1920
- labeled
2021

22+
permissions:
23+
contents: read
24+
2125
jobs:
2226
build_sdist:
23-
if: |
27+
if: >-
2428
github.event_name == 'release' ||
2529
(github.event_name == 'pull_request' && (
2630
(
@@ -67,62 +71,47 @@ jobs:
6771
path: dist/*.tar.gz
6872
if-no-files-found: error
6973

70-
generate-wheels-matrix:
71-
name: Generate wheels matrix
72-
needs: [build_sdist]
73-
runs-on: ubuntu-latest
74-
outputs:
75-
include: ${{ steps.set-matrix.outputs.include }}
76-
steps:
77-
- uses: actions/checkout@v4
78-
- name: Install cibuildwheel
79-
run: pipx install cibuildwheel==2.16.2
80-
- id: set-matrix
81-
run: |
82-
MATRIX=$(
83-
{
84-
cibuildwheel --print-build-identifiers --platform linux \
85-
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
86-
&& cibuildwheel --print-build-identifiers --platform macos \
87-
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \
88-
&& cibuildwheel --print-build-identifiers --platform windows \
89-
| jq -nRc '{"only": inputs, "os": "windows-2019"}'
90-
} | jq -sc
91-
)
92-
echo "include=$MATRIX" >> $GITHUB_OUTPUT
93-
env:
94-
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
95-
# Skip 32 bit builds and musllinux due to lack of numpy wheels
96-
CIBW_SKIP: "*-win32 *_i686 *-musllinux*"
97-
CIBW_ARCHS_MACOS: x86_64 arm64
98-
9974
build_wheels:
100-
name: Build ${{ matrix.os }} ${{ matrix.only }}
101-
needs: [generate-wheels-matrix, build_sdist]
75+
needs: build_sdist
76+
name: Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }}
77+
runs-on: ${{ matrix.os }}
10278
strategy:
10379
matrix:
104-
include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }}
105-
runs-on: ${{ matrix.os }}
80+
include:
81+
- os: ubuntu-latest
82+
cibw_archs: "x86_64"
83+
- os: windows-2019
84+
cibw_archs: "auto64"
85+
- os: macos-latest
86+
cibw_archs: "x86_64"
87+
- os: macos-latest
88+
cibw_archs: "arm64"
10689
defaults:
10790
run:
10891
shell: bash
109-
steps:
11092

93+
steps:
11194
- name: Download sdist
11295
uses: actions/download-artifact@v4
11396
with:
11497
name: cibw-sdist
11598
path: dist
11699

117-
- uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
100+
- name: Build wheels for CPython
101+
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
118102
with:
119-
only: ${{ matrix.only }}
120103
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
104+
env:
105+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
106+
# Skip 32 bit builds and musllinux due to lack of numpy wheels
107+
CIBW_SKIP: "*-win32 *_i686 *-musllinux*"
108+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
121109

122110
- uses: actions/upload-artifact@v4
123111
with:
124-
name: cibw-wheels-${{ matrix.os }}-${{ matrix.only }}
112+
name: cibw-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}
125113
path: ./wheelhouse/*.whl
114+
if-no-files-found: error
126115

127116
publish:
128117
name: Publish to PyPI

0 commit comments

Comments
 (0)