Migrate to meson build system with PPL 1.2 #96
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
| name: Distributions | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| tags: [ "*" ] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| sdist: | |
| name: Build sdist | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev | |
| - name: Build sdist | |
| run: | | |
| pip install build | |
| python -m build --sdist | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: dist-sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| needs: sdist | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - macos-15-intel | |
| - ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.3.1 | |
| with: | |
| output-dir: wheelhouse | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| pypi_publish: | |
| name: Upload to PyPI | |
| needs: [sdist, build_wheels] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: List all files in dist | |
| run: ls -lhR dist/ | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }} | |
| packages-dir: dist/ | |
| skip-existing: true | |
| verbose: true |