Skip to content

Fix CMake and GitHub action for macOS #165

Fix CMake and GitHub action for macOS

Fix CMake and GitHub action for macOS #165

Workflow file for this run

name: Build macOS Homebrew wheels
on:
push:
branches: [ master ]
tags: [ "*" ]
pull_request:
branches: [ master ]
jobs:
build_wheel_macos:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
# This is still pretty much an experimental feature
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Needed for `setuptools-scm`
fetch-depth: 0
# See https://github.com/orgs/Homebrew/discussions/3895#discussioncomment-4130560
- name: Ensure we use Homebrew Python
run: |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
brew unlink [email protected]
brew link [email protected]
- name: Install Homebrew packages
run: |
brew tap casacore/tap
brew install casacore
- name: Make virtualenv
# XXX Use Homebrew's numpy to be safe for now, especially since
# PyPI is now on numpy 2.0, which complicates matters
run: python3 -m venv venv --system-site-packages
- name: Install Python dependencies
run: venv/bin/pip install --upgrade pip six wheel delocate pytest
- name: Compile and install python-casacore
run: venv/bin/pip install .
- name: Run pytest
run: cd tests && ../venv/bin/pytest
- name: Make binary wheel
# XXX Use Homebrew's numpy to be safe for now, especially since
# PyPI is now on numpy 2.0, which complicates matters
run: venv/bin/pip wheel -w dist --no-build-isolation .
- name: Delocate binary wheel
run: venv/bin/delocate-wheel -v dist/*.whl
- name: Publish macOS binary wheels
uses: actions/upload-artifact@v4
with:
name: wheel_${{ matrix.os }}
path: dist/*.whl