Skip to content

Commit a765f92

Browse files
committed
exclude the unwanted ubuntu-arm64 combination
1 parent a443270 commit a765f92

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/build-python-package.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ jobs:
1414
fail-fast: true
1515
matrix:
1616
os: [ubuntu-latest, macos-latest]
17-
macos_arch: [x86_64, arm64] # will only be used if os=macos-latest
17+
# Define macos_arch only if os is macos-latest; otherwise empty string
18+
macos_arch: [""]
19+
include:
20+
- os: macos-latest
21+
macos_arch: x86_64
22+
- os: macos-latest
23+
macos_arch: arm64
1824

1925
steps:
2026
- uses: actions/checkout@v4
@@ -32,14 +38,14 @@ jobs:
3238
fi
3339
3440
- name: Build wheels on Linux
35-
if: runner.os != 'macOS'
41+
if: matrix.os == 'ubuntu-latest'
3642
env:
3743
CIBW_BEFORE_BUILD: cd src/runtime/c && autoreconf -i && ./configure && make && sudo make install
3844
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
3945
run: cibuildwheel src/runtime/python --output-dir wheelhouse
4046

4147
- name: Build wheels on macOS
42-
if: runner.os == 'macOS'
48+
if: matrix.os == 'macos-latest'
4349
env:
4450
CIBW_ARCHS_MACOS: ${{ matrix.macos_arch }}
4551
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
@@ -54,7 +60,7 @@ jobs:
5460

5561
- uses: actions/upload-artifact@v4
5662
with:
57-
name: wheel-${{ matrix.os }}-${{ matrix.macos_arch || 'linux' }}
63+
name: wheel-${{ matrix.os }}${{ matrix.macos_arch && '-' + matrix.macos_arch || '' }}
5864
path: wheelhouse
5965

6066
build_sdist:

0 commit comments

Comments
 (0)