diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index addf0b46b..982ba7b10 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -3,20 +3,24 @@ # Safety check - Pillow builds require that CIBW_ARCHS is set, and that it only # contains a single value (even though cibuildwheel allows multiple values in # CIBW_ARCHS). -if [[ -z "$CIBW_ARCHS" ]]; then - echo "ERROR: Pillow builds require CIBW_ARCHS be defined." - exit 1 -fi -if [[ "$CIBW_ARCHS" == *" "* ]]; then - echo "ERROR: Pillow builds only support a single architecture in CIBW_ARCHS." - exit 1 -fi +echo "ENV CHECK: CIBW_ARCHS=$CIBW_ARCHS" +function check_cibw_archs { + if [[ -z "$CIBW_ARCHS" ]]; then + echo "ERROR: Pillow builds require CIBW_ARCHS be defined." + exit 1 + fi + if [[ "$CIBW_ARCHS" == *" "* ]]; then + echo "ERROR: Pillow builds only support a single architecture in CIBW_ARCHS." + exit 1 + fi +} # Setup that needs to be done before multibuild utils are invoked. Process # potential cross-build platforms before native platforms to ensure that we pick # up the cross environment. PROJECTDIR=$(pwd) if [[ "$CIBW_PLATFORM" == "ios" ]]; then + check_cibw_archs # On iOS, CIBW_ARCHS is actually a multi-arch - arm64_iphoneos, # arm64_iphonesimulator or x86_64_iphonesimulator. Split into the CPU # platform, and the iOS SDK. @@ -65,6 +69,7 @@ if [[ "$CIBW_PLATFORM" == "ios" ]]; then HOST_MESON_FLAGS="--cross-file $WORKDIR/meson-cross.txt -Dprefer_static=true -Ddefault_library=static" elif [[ "$(uname -s)" == "Darwin" ]]; then + check_cibw_archs # Build macOS dependencies in `build/darwin` # Install them into `build/deps/darwin` PLAT="${CIBW_ARCHS:-$AUDITWHEEL_ARCH}" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d1894ad86..9a62016a7 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -96,20 +96,17 @@ jobs: - name: "iOS arm64 device" platform: ios os: macos-13 - cibw_arch: arm64 - build: "*iphoneos" + cibw_arch: arm64_iphoneos iphoneos_deployment_target: "13.0" - name: "iOS arm64 simulator" platform: ios os: macos-13 - cibw_arch: arm64 - build: "*iphonesimulator" + cibw_arch: arm64_iphonesimulator iphoneos_deployment_target: "13.0" - name: "iOS x86_64 simulator" platform: ios os: macos-latest - cibw_arch: x86_64 - build: "*iphonesimulator" + cibw_arch: x86_64_iphonesimulator iphoneos_deployment_target: "13.0" steps: - uses: actions/checkout@v4