diff --git a/appveyor.yml b/appveyor.yml index c9502e81..0f57bbfa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,10 @@ configuration: - Release environment: ARCH: amd64 + # Hunter 0.24.0's CMake scripts declare a minimum version below 3.5, which + # CMake >= 4 rejects. The environment variable (unlike -D) also reaches + # Hunter's child cmake invocations. Ignored by CMake < 4. + CMAKE_POLICY_VERSION_MINIMUM: 3.5 matrix: - VS: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 diff --git a/circle.yml b/circle.yml index 2054c6d8..18674b7c 100644 --- a/circle.yml +++ b/circle.yml @@ -276,7 +276,17 @@ jobs: - test-python-package - run: name: "Build wheels" - command: sh scripts/ci/python_build_wheels.sh + # Build a universal2 (x86_64 + arm64) wheel. The architecture flags + # must reach both the cmake build of the static libraries and the + # cffi extension build. + command: | + export MACOSX_DEPLOYMENT_TARGET=11.0 + export CMAKE_OSX_ARCHITECTURES="arm64;x86_64" + export ARCHFLAGS="-arch arm64 -arch x86_64" + export CFLAGS="-arch arm64 -arch x86_64" + export LDFLAGS="-arch arm64 -arch x86_64" + export _PYTHON_HOST_PLATFORM="macosx-11.0-universal2" + sh scripts/ci/python_build_wheels.sh - store_artifacts: path: ~/project/dist destination: dist