Added some old working notebooks #70
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 and upload to PyPI | |
# to publish when a (published) GitHub Release is created, use the following: | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
# Disable building PyPy wheels on all platforms | |
CIBW_SKIP: "pp* *musllinux*" | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-10.15] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup gfortran | |
if: ${{ matrix.os == 'macos-10.15' }} | |
run: | | |
# this is taken verbatim from the numpy azure pipeline setup. | |
set -xe | |
# same version of gfortran as the open-libs and numpy-wheel builds | |
curl -L https://github.com/MacPython/gfortran-install/raw/master/archives/gfortran-4.9.0-Mavericks.dmg -o gfortran.dmg | |
GFORTRAN_SHA256=$(shasum -a 256 gfortran.dmg) | |
KNOWN_SHA256="d2d5ca5ba8332d63bbe23a07201c4a0a5d7e09ee56f0298a96775f928c3c4b30 gfortran.dmg" | |
if [ "$GFORTRAN_SHA256" != "$KNOWN_SHA256" ]; then | |
echo sha256 mismatch | |
exit 1 | |
fi | |
hdiutil attach -mountpoint /Volumes/gfortran gfortran.dmg | |
sudo installer -pkg /Volumes/gfortran/gfortran.pkg -target / | |
otool -L /usr/local/gfortran/lib/libgfortran.3.dylib | |
# Manually symlink gfortran-4.9 to plain gfortran for f2py. | |
# No longer needed after Feb 13 2020 as gfortran is already present | |
# and the attempted link errors. Keep this for future reference. | |
# ln -s /usr/local/bin/gfortran-4.9 /usr/local/bin/gfortran | |
- name: Build wheels | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
# to publish when a GitHub Release is created, use the following rule: | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |