Skip to content

Commit eaf336a

Browse files
committed
fix(ci): avoid duplicate py3-none release builds
1 parent 02d6bee commit eaf336a

3 files changed

Lines changed: 20 additions & 34 deletions

File tree

‎.github/workflows/build-and-release.yaml‎

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-22.04, windows-2022, macos-14, macos-15]
14+
# Use explicit Apple Silicon and Intel macOS runners so each job
15+
# produces a distinct wheel artifact.
16+
os: [ubuntu-22.04, windows-2022, macos-15, macos-15-intel]
1517

1618
steps:
1719
- uses: actions/checkout@v4
@@ -82,7 +84,9 @@ jobs:
8284
# Keep native arm64 builds on a portable CPU baseline instead of
8385
# tuning wheels to the hosted runner.
8486
CIBW_ENVIRONMENT: CMAKE_ARGS="-DGGML_NATIVE=off"
85-
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
87+
# wheel.py-api = "py3" means one aarch64 build covers every supported
88+
# CPython version, so building more just duplicates the artifact name.
89+
CIBW_BUILD: "cp38-*"
8690
with:
8791
output-dir: wheelhouse
8892

@@ -93,27 +97,8 @@ jobs:
9397
path: ./wheelhouse/*.whl
9498

9599
build_wheels_riscv64:
96-
name: Build riscv64 wheels (${{ matrix.shard.name }})
100+
name: Build riscv64 wheels
97101
runs-on: ubuntu-latest
98-
strategy:
99-
fail-fast: false
100-
matrix:
101-
shard:
102-
- name: cp310
103-
build: "cp310-*"
104-
artifact: wheels_riscv64_cp310
105-
- name: cp311
106-
build: "cp311-*"
107-
artifact: wheels_riscv64_cp311
108-
- name: cp312
109-
build: "cp312-*"
110-
artifact: wheels_riscv64_cp312
111-
- name: cp313
112-
build: "cp313-*"
113-
artifact: wheels_riscv64_cp313
114-
- name: cp314
115-
build: "cp314-*"
116-
artifact: wheels_riscv64_cp314
117102
steps:
118103
- uses: actions/checkout@v4
119104
with:
@@ -133,16 +118,16 @@ jobs:
133118
# Build riscv64 wheels against a conservative baseline instead of
134119
# enabling RVV-related extensions from the build container.
135120
CIBW_ENVIRONMENT: CMAKE_ARGS="-DGGML_NATIVE=off -DGGML_RVV=off -DGGML_RV_ZFH=off -DGGML_RV_ZVFH=off -DGGML_RV_ZICBOP=off -DGGML_RV_ZIHINTPAUSE=off"
136-
# Split the emulated riscv64 build into one Python version per job
137-
# to minimize wall-clock time without changing the release artifacts.
138-
CIBW_BUILD: ${{ matrix.shard.build }}
121+
# wheel.py-api = "py3" means one riscv64 build covers every supported
122+
# CPython version, so sharding by interpreter only duplicates assets.
123+
CIBW_BUILD: "cp310-*"
139124
with:
140125
output-dir: wheelhouse
141126

142127
- name: Upload wheels as artifacts
143128
uses: actions/upload-artifact@v4
144129
with:
145-
name: ${{ matrix.shard.artifact }}
130+
name: wheels_riscv64
146131
path: ./wheelhouse/*.whl
147132

148133
build_sdist:

‎.github/workflows/build-wheels-cuda.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
run: |
2222
$matrix = @{
2323
'os' = @('ubuntu-22.04') #, 'windows-2022')
24-
'pyver' = @("3.9", "3.10", "3.11", "3.12")
24+
# wheel.py-api = "py3" makes the CUDA wheel interpreter-agnostic,
25+
# so one builder per toolkit version is sufficient.
26+
'pyver' = @("3.9")
2527
'cuda' = @("12.1.1", "12.2.2", "12.3.2", "12.4.1") #, "12.5.1", "12.6.1")
2628
'releasetag' = @("basic")
2729
}

‎.github/workflows/build-wheels-metal.yaml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ permissions:
77

88
jobs:
99
build_wheels:
10-
name: Build wheels on ${{ matrix.os }}
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
os: [macos-14, macos-15]
10+
name: Build wheels on macos-15
11+
runs-on: macos-15
1512

1613
steps:
1714
- uses: actions/checkout@v4
@@ -38,14 +35,16 @@ jobs:
3835
CIBW_REPAIR_WHEEL_COMMAND: ""
3936
CIBW_ARCHS: "arm64"
4037
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DGGML_METAL=on -DCMAKE_CROSSCOMPILING=ON"
41-
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
38+
# wheel.py-api = "py3" means one Metal wheel covers every supported
39+
# CPython version, so extra selectors only repeat the same artifact.
40+
CIBW_BUILD: "cp39-*"
4241
with:
4342
package-dir: .
4443
output-dir: wheelhouse2
4544

4645
- uses: actions/upload-artifact@v4
4746
with:
48-
name: wheels-mac_${{ matrix.os }}
47+
name: wheels-mac
4948
path: ./wheelhouse2/*.whl
5049

5150
release:

0 commit comments

Comments
 (0)