Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Commit 6b972e3

Browse files
Add --platform all
1 parent 2eb617b commit 6b972e3

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/cd.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ on:
1414
default: ""
1515
platforms:
1616
description: >
17-
Comma-separated values of platforms to build wheels for
17+
Comma-separated list of specific platforms to build wheels for, or use 'all' to build for all supported platforms
1818
required: false
19-
default: "x86_64-windows,aarch64-windows,x86-windows,x86_64-macos,aarch64-macos,i386-linux,x86-linux,x86_64-linux,aarch64-linux,armv7a-linux,arm-linux,powerpc64le-linux,s390x-linux,riscv64-linux"
19+
default: "all"
2020
push_to_pypi:
2121
description: >
2222
Whether to push the built wheels to PyPI. Can be 'true' or 'false', defaults to 'false'.
@@ -51,11 +51,10 @@ jobs:
5151
platforms=${GITHUB_EVENT_INPUTS_PLATFORMS}
5252
IFS=',' read -r -a platform_array <<< "$platforms"
5353
for platform in "${platform_array[@]}"; do
54-
cmd="uv run make_wheels.py --outdir dist/ --version ${GITHUB_EVENT_INPUTS_VERSION}"
54+
cmd="uv run make_wheels.py --outdir dist/ --version ${GITHUB_EVENT_INPUTS_VERSION} --platform $platform"
5555
if [ -n "${GITHUB_EVENT_INPUTS_SUFFIX}" ]; then
5656
cmd="$cmd --suffix ${GITHUB_EVENT_INPUTS_SUFFIX}"
5757
fi
58-
cmd="$cmd --platform $platform"
5958
eval "$cmd"
6059
done
6160

make_wheels.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,16 +343,21 @@ def get_argparser():
343343
help="version to package, use `latest` for latest release, `master` for nightly build")
344344
parser.add_argument('--suffix', default='', help="wheel version suffix")
345345
parser.add_argument('--outdir', default='dist/', help="target directory")
346-
parser.add_argument('--platform', action='append', choices=list(ZIG_PYTHON_PLATFORMS.keys()), default=[],
347-
help="platform to build for, can be repeated")
346+
parser.add_argument('--platform', action='append', default=[],
347+
help="platform(s) to build for, can be repeated. Use 'all' to build for all supported platforms.")
348348
return parser
349349

350350

351351
def main():
352352
args = get_argparser().parse_args()
353353
logging.getLogger("wheel").setLevel(logging.WARNING)
354+
355+
platforms = args.platform
356+
if 'all' in platforms:
357+
platforms = list(ZIG_PYTHON_PLATFORMS.keys())
358+
354359
fetch_and_write_ziglang_wheels(outdir=args.outdir, zig_version=args.version,
355-
wheel_version_suffix=args.suffix, platforms=args.platform)
360+
wheel_version_suffix=args.suffix, platforms=platforms)
356361

357362

358363
if __name__ == '__main__':

0 commit comments

Comments
 (0)