Skip to content

pybind interface for DSWbeta, Wishart, and Frobenius calculators #65

pybind interface for DSWbeta, Wishart, and Frobenius calculators

pybind interface for DSWbeta, Wishart, and Frobenius calculators #65

Workflow file for this run

name: MacOS Build
on:
push:
branches: [ dev ]
tags:
- v*
pull_request:
branches: [ dev ]
jobs:
build:
runs-on: macos-latest
if: ${{ startsWith(github.ref, 'refs/tags') || !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v2
- name: Install Python
run: |
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
- name: Checkout submodules
run: |
git submodule init
git submodule update
- name: Build zlib
run: |
git clone https://github.com/madler/zlib.git
mkdir zlib-build
cd zlib-build
cmake ../zlib -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../zlib-install
make install
cd ..
- name: Build ITK
run: |
mkdir ITK-build
cd ITK-build
cmake \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../ITK-install \
../ITK
make install
cd ..
- name: Build samseg
run: |
.github/workflows/macos_build.sh /usr/local/bin/python3.8
.github/workflows/macos_build.sh /usr/local/bin/python3.9
.github/workflows/macos_build.sh /usr/local/bin/python3.10
.github/workflows/macos_build.sh /usr/local/bin/python3.11
env:
ITK_DIR: ITK-install
ZLIB_INCLUDE_DIR: zlib-install/include
ZLIB_LIBRARY: zlib-install/lib/libz.a
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: macos-wheels
path: dist/*.whl
- name: Upload to PyPI
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
run: |
$PYTHON -m pip install twine
$PYTHON -m twine upload dist/*.whl -u __token__ -p "$PASSWORD"
env:
PASSWORD: ${{ secrets.PYPI_TOKEN }}
PYTHON: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3