Modernize packaging and update to support pymc > v4 #63
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: Packaging | |
on: | |
release: | |
types: | |
- published | |
pull_request: | |
branches: | |
- main | |
env: | |
CIBW_BUILD: "cp38-* cp39-*" | |
CIBW_SKIP: "*-win32 *musllinux* *i686*" | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
jobs: | |
# build_wheels: | |
# name: Build ${{ matrix.python-version }} wheels on ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# os: [ubuntu-latest, macos-latest] # , windows-latest] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - uses: actions/setup-python@v3 | |
# name: Install Python | |
# with: | |
# # Note: cibuildwheel builds for many Python versions beyond this one | |
# python-version: "3.9" | |
# - name: Install MSVC / Visual C++ | |
# if: runner.os == 'Windows' | |
# uses: ilammy/msvc-dev-cmd@v1 | |
# - name: Build wheels | |
# run: | | |
# python -m pip install cibuildwheel | |
# python -m cibuildwheel --output-dir wheelhouse | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: "3.9" | |
- name: Build sdist | |
run: | | |
python -m pip install build | |
python -m build --sdist | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
# needs: [build_wheels, build_sdist] | |
needs: [build_sdist] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
# To test: repository_url: https://test.pypi.org/legacy/ |