Skip to content

Commit 06b5410

Browse files
committed
ci: build pure-Python wheel via python -m build; keep accelerated wheels on cibuildwheel; upload all artifacts together
1 parent acba67a commit 06b5410

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

.github/workflows/test-upload.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,28 @@ on:
1313
- "false"
1414

1515
jobs:
16-
build_wheels:
17-
# We'll build on a matrix of OSes and Python versions.
18-
runs-on: ${{ matrix.os }}
19-
strategy:
20-
matrix:
21-
os: [macOS-latest, ubuntu-latest, windows-latest]
22-
env:
23-
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
24-
CIBW_ENVIRONMENT: "PIP_NO_CACHE_DIR=1"
25-
CIBW_BUILD_VERBOSITY: 3
26-
16+
build_base_wheel:
17+
# Build the pure-Python wheel once (no platform matrix needed)
18+
runs-on: ubuntu-latest
2719
steps:
2820
- name: Check out code
2921
uses: actions/checkout@v4
3022

3123
- name: Install build dependencies
3224
run: |
33-
pip install --upgrade pip && pip install cibuildwheel twine
25+
pip install --upgrade pip && pip install build
3426
35-
- name: Upgrade pip, setuptools, wheel
36-
run: python -m pip install --upgrade setuptools wheel
27+
- name: Build base wheel (pure-Python svv)
28+
run: python -m build --wheel --outdir dist
3729

38-
- name: Build wheels (pure-Python svv)
39-
env:
40-
# Ensure we do NOT build extensions for the main wheel
41-
SVV_BUILD_EXTENSIONS: "0"
42-
run: cibuildwheel --output-dir dist
43-
44-
- name: Upload artifacts
30+
- name: Upload base wheel artifact
4531
uses: actions/upload-artifact@v4
4632
with:
47-
name: cibw-wheels-${{ matrix.os }}
48-
path: dist
33+
name: base-wheel
34+
path: dist/*.whl
4935

5036
build_sdist:
51-
needs: [build_wheels]
37+
needs: [build_base_wheel]
5238
runs-on: ubuntu-latest
5339
steps:
5440
- uses: actions/checkout@v4
@@ -95,12 +81,13 @@ jobs:
9581
path: dist
9682

9783
upload_testpypi_all:
98-
needs: [build_wheels, build_wheels_accelerated, build_sdist]
84+
needs: [build_base_wheel, build_wheels_accelerated, build_sdist]
9985
runs-on: ubuntu-latest
10086
steps:
10187
- uses: actions/download-artifact@v4
10288
with:
103-
pattern: cibw-*
89+
# download all artifacts from previous jobs (base wheel, sdist, accelerated wheels)
90+
pattern: '*'
10491
path: dist
10592
merge-multiple: true
10693
- name: Install twine

0 commit comments

Comments
 (0)