Skip to content

Commit 182007e

Browse files
committed
Explicitly specify architectures
1 parent f0bec35 commit 182007e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/wheel.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,32 @@ jobs:
1616
# macos-12 is an intel runner, macos-14 is a arm64 runner
1717
os: [ubuntu-latest, windows-latest, macos-12, macos-14]
1818
archs: ["native"]
19-
include:
20-
- os: ubuntu-latest
21-
archs: "aarch64"
19+
build_all:
20+
- ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')) || contains(github.event.pull_request.labels.*.name, 'test all wheels')}}
2221
env:
2322
CIBW_TEST_COMMAND: python -c "import numcodecs"
2423
CIBW_BUILD: "cp310-* cp311-* cp312-*"
25-
CIBW_SKIP: "pp* *-musllinux_* *win32 *_i686 *_s390x"
26-
CIBW_ARCHS: ${{ matrix.archs }}
24+
CIBW_ARCHS_MACOS: native
25+
CIBW_ARCHS_WINDOWS: native
26+
CIBW_ARCHS_LINUX: "x86_64 aarch64"
2727
# note: CIBW_ENVIRONMENT is now set in pyproject.toml
2828

2929
steps:
3030
- uses: actions/checkout@v4
3131
with:
3232
submodules: true
3333

34-
- uses: pypa/[email protected]
34+
- name: Restrict number of wheel builds on PRs
35+
if: ${{ !matrix.build_all }}
36+
run: |
37+
echo "CIBW_BUILD=cp310-win_amd64 cp311-manylinux_x86_64 cp312-macosx_x86_64 cp312-macosx_arm64" >> $GITHUB_ENV
3538
3639
- name: Set up QEMU
37-
if: ${{ matrix.archs == 'aarch64' }}
40+
if: ${{ matrix.os == 'ubuntu-latest' }}
3841
uses: docker/setup-qemu-action@v3
3942

43+
- uses: pypa/[email protected]
44+
4045
- uses: actions/upload-artifact@v4
4146
with:
4247
name: wheels-${{ matrix.os }}

0 commit comments

Comments
 (0)