Build distribution #51
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 distribution | |
| on: [workflow_dispatch] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04, macOS-14, macOS-15] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| if: matrix.os == 'macOS-13' || matrix.os == 'macOS-14' || matrix.os == 'macOS-15' | |
| with: | |
| xcode-version: latest-stable | |
| - name: Build package | |
| uses: pypa/[email protected] | |
| with: | |
| output-dir: wheelhouse | |
| env: | |
| CIBW_BEFORE_ALL_MACOS: | |
| brew update && | |
| brew upgrade cmake && | |
| brew install boost && | |
| pip install --upgrade pip | |
| CIBW_BEFORE_ALL_LINUX: " | |
| { yum makecache && yum install -y boost-devel; } || | |
| { apt-get update && apt-get install libboost-all-dev; } | |
| " | |
| CIBW_ARCHS_MACOS: "native" | |
| CIBW_ARCHS_LINUX: "x86_64 aarch64" | |
| CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.13" | |
| CIBW_SKIP: "pp* *-manylinux_i686 *-musllinux_*" | |
| # - uses: actions/upload-artifact@v3 | |
| # with: | |
| # path: ./wheelhouse/*.whl | |
| # build_sdist: | |
| # name: Build source distribution | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # - name: Build sdist | |
| # run: python -m build --outdir dist | |
| # - uses: actions/upload-artifact@v3 | |
| # with: | |
| # path: dist/*.tar.gz | |
| # upload_pypi: | |
| # needs: [build_wheels, build_sdist] | |
| # runs-on: ubuntu-latest | |
| # if: github.event_name == 'push' | |
| # # if: github.event_name == 'release' && github.event.action == 'published' | |
| # steps: | |
| # - uses: actions/download-artifact@v3 | |
| # with: | |
| # name: artifact | |
| # path: dist | |
| # - uses: pypa/[email protected] | |
| # with: | |
| # user: __token__ | |
| # password: ${{ secrets.pypi_test_password }} | |
| # repository_url: https://test.pypi.org/legacy/ | |
| # verify_metadata: false |