Skip to content

Build distribution

Build distribution #62

Workflow file for this run

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-22.04-arm, ubuntu-24.04, ubuntu-24.04-arm, macOS-14, macOS-13]
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'
with:
xcode-version: latest-stable
- name: Build package
uses: pypa/[email protected]
with:
output-dir: wheelhouse
env:
MACOSX_DEPLOYMENT_TARGET: 13.0
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: "native"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.13"
CIBW_SKIP: "pp* *musllinux*"
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build sdist
env:
CIBW_BEFORE_ALL_LINUX:
pip install --upgrade pip &&
pip install build
run: python -m build --outdir dist
- uses: actions/upload-artifact@v4
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