Update to v2.0.5 #10
Workflow file for this run
This file contains hidden or 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
| # Let's upload nestpy to PyPi to make it pip installable | |
| # Mostly based on https://github.com/marketplace/actions/pypi-publish | |
| # Some of this is a bit clunky, we have both Linux and MacOS build. | |
| # We apply the following strategy: | |
| # - For Mac, run both MacOS-latest (11.xx) and MacOS-10.15. The latter | |
| # seems to be required for to properly build the wheels commonly used. | |
| # For each python version and MacOS version, we run a separate action | |
| # to complete all the required wheels. | |
| # - For linux, use a nice pre-defined docker image from | |
| # "RalfG/python-wheels-manylinux-build@v0.4.2-manylinux2014_x86_64" | |
| # to build the wheels. This allows us to build several wheels in one | |
| # go. We build newer python versions explicitly with numpy 1.21 | |
| # (though this is probably not strictly required). | |
| name: Pipy | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [ published ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: False | |
| matrix: | |
| python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] | |
| os: [ "ubuntu-latest" , "macos-latest", "macos-10.15"] | |
| exclude: | |
| - python-version: 3.6 | |
| os: "ubuntu-latest" | |
| - python-version: 3.7 | |
| os: "ubuntu-latest" | |
| - python-version: 3.6 | |
| os: "macos-latest" | |
| - python-version: 3.7 | |
| os: "macos-latest" | |
| - python-version: 3.9 | |
| os: "ubuntu-latest" | |
| - python-version: "3.10" | |
| os: "ubuntu-latest" | |
| steps: | |
| # Setup steps | |
| - name: Setup python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: pip install wheel twine | |
| # -- Linux -- | |
| - name: Build weels (linux) python 3.8, 3.9, 3.10, 3.11 | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: RalfG/python-wheels-manylinux-build@v0.4.2-manylinux2014_x86_64 | |
| with: | |
| python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311' | |
| build-requirements: 'numpy==1.21.6' | |
| - name: Build legacy weels (linux) python 3.6, 3.7 | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: RalfG/python-wheels-manylinux-build@v0.4.2-manylinux2014_x86_64 | |
| with: | |
| python-versions: 'cp36-cp36m cp37-cp37m' | |
| build-requirements: 'numpy' | |
| - name: Publish wheels to PyPI (linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.pypi_password }} | |
| run: | | |
| twine upload dist/*-manylinux*.whl | |
| # -- MacOS -- | |
| - name: Build package (MAC) | |
| if: matrix.os != 'ubuntu-latest' | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.pypi_password }} | |
| run: | |
| | | |
| python setup.py bdist_wheel | |
| python -m twine upload -u "${TWINE_USERNAME}" -p "${TWINE_PASSWORD}" dist/*; |