Fix CMake and GitHub action for macOS #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: install homebrew packages | |
run: | | |
brew tap casacore/tap | |
brew install casacore | |
- name: make virtualenv | |
run: python3 -m venv venv | |
- name: Install Python dependencies | |
run: venv/bin/pip install --upgrade pip 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 | |
run: venv/bin/pip wheel -w dist . | |
- name: Delocate binary wheel | |
run: venv/bin/delocate-wheel -v dist/*.whl | |
- name: Publish macOS binary wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.whl |