Add Ideals, and start to try to work away from cypari dependency #94
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
| name: Build and Deploy to PyPI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| checks: | |
| name: Run linters | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| - name: Install lint dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ruff pylint | |
| - name: Run Ruff | |
| run: ruff check . | |
| - name: Require test docstrings | |
| # Require docstrings on all unit tests! | |
| run: | | |
| python -m pylint tests --disable=all --enable=C0115,C0116 --no-docstring-rgx="^(?!(test_|Test)).*" | |
| build: | |
| name: Build wheels on ${{ matrix.os }} | |
| needs: checks | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, windows-11-arm, macos-latest, macos-15-intel, ubuntu-latest, ubuntu-24.04-arm] | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| env: | |
| CIBW_TEST_SOURCES: "tests pyproject.toml" | |
| CIBW_BUILD_FRONTEND: "build[uv]" | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' # caching pip dependencies | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Generate and place stubs | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade mypy "sympy<=1.12.1" | |
| stubgen -p quadint --include-private --include-docstrings --inspect-mode | |
| cp -r out/quadint/. quadint-stubs/ | |
| rm -rf out | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip uv | |
| python -m pip install cibuildwheel | |
| - name: Build wheels | |
| run: | | |
| python -m cibuildwheel --output-dir wheelhouse | |
| shell: bash | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions-${{ matrix.os }} | |
| path: wheelhouse/ | |
| publish-to-pypi: | |
| name: Publish Python distribution to PyPI | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/quadint | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true |