Skip to content

Commit de765fe

Browse files
committed
Update pypi.yml
Pass build architecture to cmake command
1 parent a77fcc1 commit de765fe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/pypi.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ jobs:
2222
- name: macOS_X86
2323
os: macos-latest
2424
archs: x86_64
25+
extra_option: -DCMAKE_OSX_ARCHITECTURES=x86_64
2526

2627
- name: macOS_ARM
2728
os: macos-latest
2829
archs: arm64
30+
extra_option: -DCMAKE_OSX_ARCHITECTURES=arm64
2931

3032
name: Wheels for ${{ matrix.target.name }}
3133
runs-on: ${{ matrix.target.os }}
@@ -66,11 +68,7 @@ jobs:
6668
CIBW_ARCHS: >-
6769
${{ matrix.target.archs }}
6870
CIBW_BEFORE_ALL: >-
69-
if [[ "${{ matrix.target.name }}" == "macOS_X86" ]]; then
70-
cmake -DBUILD_INTERFACE_PYTHON=ON -DTEST_OPENMP=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64 -S . -B build
71-
else
72-
cmake -DBUILD_INTERFACE_PYTHON=ON -DTEST_OPENMP=OFF -S . -B build
73-
fi
71+
cmake -DBUILD_INTERFACE_PYTHON=ON -DTEST_OPENMP=OFF ${{ matrix.target.extra_option }} -S . -B build
7472
cmake --build build --config Release --clean-first --target runnerPostStatic
7573
CIBW_ENVIRONMENT: >-
7674
RUNNERPOST_SRC=../src

0 commit comments

Comments
 (0)