Corrections to CI configuration.

This commit is contained in:
Russell Keith-Magee 2025-06-21 17:33:09 +08:00
parent 59f3557f06
commit e430bde7e2
No known key found for this signature in database
GPG Key ID: 3D2DAB6A37BB5BC3
2 changed files with 16 additions and 14 deletions

View File

@ -3,20 +3,24 @@
# Safety check - Pillow builds require that CIBW_ARCHS is set, and that it only # 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 # contains a single value (even though cibuildwheel allows multiple values in
# CIBW_ARCHS). # CIBW_ARCHS).
if [[ -z "$CIBW_ARCHS" ]]; then echo "ENV CHECK: CIBW_ARCHS=$CIBW_ARCHS"
echo "ERROR: Pillow builds require CIBW_ARCHS be defined." function check_cibw_archs {
exit 1 if [[ -z "$CIBW_ARCHS" ]]; then
fi echo "ERROR: Pillow builds require CIBW_ARCHS be defined."
if [[ "$CIBW_ARCHS" == *" "* ]]; then exit 1
echo "ERROR: Pillow builds only support a single architecture in CIBW_ARCHS." fi
exit 1 if [[ "$CIBW_ARCHS" == *" "* ]]; then
fi 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 # Setup that needs to be done before multibuild utils are invoked. Process
# potential cross-build platforms before native platforms to ensure that we pick # potential cross-build platforms before native platforms to ensure that we pick
# up the cross environment. # up the cross environment.
PROJECTDIR=$(pwd) PROJECTDIR=$(pwd)
if [[ "$CIBW_PLATFORM" == "ios" ]]; then if [[ "$CIBW_PLATFORM" == "ios" ]]; then
check_cibw_archs
# On iOS, CIBW_ARCHS is actually a multi-arch - arm64_iphoneos, # On iOS, CIBW_ARCHS is actually a multi-arch - arm64_iphoneos,
# arm64_iphonesimulator or x86_64_iphonesimulator. Split into the CPU # arm64_iphonesimulator or x86_64_iphonesimulator. Split into the CPU
# platform, and the iOS SDK. # 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" HOST_MESON_FLAGS="--cross-file $WORKDIR/meson-cross.txt -Dprefer_static=true -Ddefault_library=static"
elif [[ "$(uname -s)" == "Darwin" ]]; then elif [[ "$(uname -s)" == "Darwin" ]]; then
check_cibw_archs
# Build macOS dependencies in `build/darwin` # Build macOS dependencies in `build/darwin`
# Install them into `build/deps/darwin` # Install them into `build/deps/darwin`
PLAT="${CIBW_ARCHS:-$AUDITWHEEL_ARCH}" PLAT="${CIBW_ARCHS:-$AUDITWHEEL_ARCH}"

View File

@ -96,20 +96,17 @@ jobs:
- name: "iOS arm64 device" - name: "iOS arm64 device"
platform: ios platform: ios
os: macos-13 os: macos-13
cibw_arch: arm64 cibw_arch: arm64_iphoneos
build: "*iphoneos"
iphoneos_deployment_target: "13.0" iphoneos_deployment_target: "13.0"
- name: "iOS arm64 simulator" - name: "iOS arm64 simulator"
platform: ios platform: ios
os: macos-13 os: macos-13
cibw_arch: arm64 cibw_arch: arm64_iphonesimulator
build: "*iphonesimulator"
iphoneos_deployment_target: "13.0" iphoneos_deployment_target: "13.0"
- name: "iOS x86_64 simulator" - name: "iOS x86_64 simulator"
platform: ios platform: ios
os: macos-latest os: macos-latest
cibw_arch: x86_64 cibw_arch: x86_64_iphonesimulator
build: "*iphonesimulator"
iphoneos_deployment_target: "13.0" iphoneos_deployment_target: "13.0"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4