###################################################################### # Build macosx_arm64 natively # # macosx_arm64 for macos >= 14 used to be built here, but are now # built on GHA. ###################################################################### macosx_arm64_task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' env: CIRRUS_CLONE_SUBMODULES: true macos_instance: matrix: image: ghcr.io/cirruslabs/macos-runner:sonoma matrix: - env: CIBW_BUILD: cp311-* cp312* cp313* env: PATH: /usr/local/lib:/usr/local/include:$PATH CIBW_ARCHS: arm64 build_script: | brew install micromamba gfortran micromamba shell init -s bash --root-prefix ~/micromamba source ~/.bash_profile micromamba create -n numpydev micromamba activate numpydev micromamba install -y -c conda-forge python=3.11 2>/dev/null # Use scipy-openblas wheels export INSTALL_OPENBLAS=true export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET='11.0' INSTALL_OPENBLAS=true RUNNER_OS=macOS PKG_CONFIG_PATH=$PWD/.openblas" # needed for submodules git submodule update --init # need to obtain all the tags so setup.py can determine FULLVERSION git fetch origin uname -m python -c "import platform;print(platform.python_version());print(platform.system());print(platform.machine())" clang --version python -m pip install cibuildwheel cibuildwheel wheels_artifacts: path: "wheelhouse/*" ###################################################################### # Upload all wheels ###################################################################### wheels_upload_task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' # Artifacts don't seem to be persistent from task to task. # Rather than upload wheels at the end of each cibuildwheel run we do a # final upload here. This is because a run may be on different OS for # which bash, etc, may not be present. depends_on: - macosx_arm64 compute_engine_instance: image_project: cirrus-images image: family/docker-builder platform: linux cpu: 1 env: NUMPY_STAGING_UPLOAD_TOKEN: ENCRYPTED[!5a69522ae0c2af9edb2bc1cdfeaca6292fb3666d9ecd82dca0615921834a6ce3b702352835d8bde4ea2a9ed5ef8424ac!] NUMPY_NIGHTLY_UPLOAD_TOKEN: ENCRYPTED[4376691390321cd5e76613ec21de8456cc0af0164971dd9542f985a017dc30ccb4d40e60f59184618e2d55afd63e93b7] upload_script: | apt-get update apt-get install -y curl wget export IS_SCHEDULE_DISPATCH="false" export IS_PUSH="false" # cron job if [[ "$CIRRUS_CRON" == "nightly" ]]; then export IS_SCHEDULE_DISPATCH="true" fi # a manual build was started if [[ "$CIRRUS_BUILD_SOURCE" == "api" && "$CIRRUS_COMMIT_MESSAGE" == "API build for null" ]]; then export IS_SCHEDULE_DISPATCH="true" fi # only upload wheels to staging if it's a tag beginning with 'v' and you're # on a maintenance branch if [[ "$CIRRUS_TAG" == v* ]] && [[ $CIRRUS_TAG != *"dev0"* ]]; then export IS_PUSH="true" fi if [[ $IS_PUSH == "true" ]] || [[ $IS_SCHEDULE_DISPATCH == "true" ]]; then # install miniconda in the home directory. For some reason HOME isn't set by Cirrus export HOME=$PWD # install miniconda for uploading to anaconda wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh bash miniconda.sh -b -p $HOME/miniconda3 $HOME/miniconda3/bin/conda init bash source $HOME/miniconda3/bin/activate conda install -y anaconda-client # The name of the zip file is derived from the `wheels_artifact` line. # If you change the artifact line to `myfile_artifact` then it would be # called myfile.zip curl https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/wheels.zip --output wheels.zip unzip wheels.zip source ./tools/wheels/upload_wheels.sh # IS_PUSH takes precedence over IS_SCHEDULE_DISPATCH set_upload_vars # Will be skipped if not a push/tag/scheduled build upload_wheels fi