Skip to content

Fix/fix mutable

Fix/fix mutable #9

Workflow file for this run

name: Build Wheels
on:
workflow_dispatch:
pull_request:
push:
tags:
- "v*.*.*"
jobs:
build_sdist:
name: "sdist"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install poetry
uses: snok/install-poetry@v1
- name: Build sdist
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry build --format=sdist
- uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist/*.tar.gz
build_wheels:
name: "${{ matrix.os }} py${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: macos-13
python-version: "3.12"
target: arm64
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install --only main
- name: Build wheel
run: poetry build --format=wheel
- name: Setup test environment
run: |
python -m pip install --upgrade pip
python -m pip install pytest pandas
python -m pip install dist/*.whl
- name: Run tests
run: |
cd tests
python -m pytest
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.target && format('-{0}', matrix.target) || '' }}
path: dist/*.whl
upload_to_pypi:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs: ["build_sdist", "build_wheels"]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: wheels
pattern: wheels-*
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: wheels/
skip_existing: true