Use MacOS 13 (x86_64) and 14 (arm64) for wheels #21
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 Wheels | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# do not cancel so we can see results | |
concurrency: | |
cancel-in-progress: false | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build-test-deploy: | |
name: Build MacOS Wheels | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
os: [macos-14] | |
python-version: ['3.10', '3.11', '3.12'] # change later | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install OSX System Dependencies | |
run: | | |
brew install --cask xquartz | |
brew install flex bison mpich | |
brew unlink mpich && brew install openmpi | |
cmake --version | |
# Uninstall libomp for compatibility with issue #817 | |
brew uninstall --ignore-dependencies libomp || echo "libomp doesn't exist" | |
brew install cmake | |
echo "$(brew --prefix)/opt/cmake/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix)/opt/flex/bin:$(brew --prefix)/opt/bison/bin" >> $GITHUB_PATH | |
- name: Install readline | |
run: | | |
sudo mkdir -p /opt/nrnwheel/$(uname -m) | |
sudo bash packaging/python/build_static_readline_osx.bash | |
- name: Build MacOS Wheel | |
run: | | |
packaging/python/build_wheels.bash osx ${{ matrix.python-version }} coreneuron | |
- name: Test wheel | |
run: | | |
minor_version="$(python -c 'import sys;print(sys.version_info.minor)')" | |
packaging/python/test_wheels.sh $(which python) wheelhouse/*cp3${minor_version}*.whl | |
- name: Upload wheel files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos-wheels-${{ matrix.python-version }} | |
path: wheelhouse/*.whl |