diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml new file mode 100644 index 0000000..ccaa891 --- /dev/null +++ b/.github/workflows/release-wheels.yml @@ -0,0 +1,108 @@ +name: "Upload wheels to PyPI" +on: + workflow_run: + workflows: + - "Release new version" + branches: + - main + types: + - completed + +jobs: + build: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'ubuntu-24.04-arm', 'macos-15-intel', 'macos-latest'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install cibuildwheel + run: python -m pip install --upgrade cibuildwheel + + - name: Build wheels + env: + CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 + MACOSX_DEPLOYMENT_TARGET: "15.0" + CIBW_BUILD_VERBOSITY: 1 + + run: | + cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v4 + with: + name: wheels-${{ matrix.os }} + path: wheelhouse/*.whl + + sdist: + name: Build sdist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - run: | + python -m pip install --upgrade build + python -m build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz + + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + needs: [ build, sdist ] + + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + path: dist_all + name: wheels-ubuntu-latest + - uses: actions/download-artifact@v4 + with: + path: dist_all + name: wheels-ubuntu-24.04-arm + - uses: actions/download-artifact@v4 + with: + path: dist_all + name: wheels-macos-15-intel + - uses: actions/download-artifact@v4 + with: + path: dist_all + name: wheels-macos-latest + - uses: actions/download-artifact@v4 + with: + path: dist_all + name: sdist + + - run: | + shopt -s nullglob + for f in dist_all/*.zip; do + unzip -o "$f" -d dist_all/ + done + + - run: | + python -m pip install --upgrade twine + twine check dist_all/* + twine upload dist_all/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_DEPLOY_KEY }} \ No newline at end of file diff --git a/README.md b/README.md index 1bfabc2..412738c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![CAPIO-CL Logo](media/capiocl.png) +![CAPIO-CL Logo](https://raw.githubusercontent.com/High-Performance-IO/CAPIO-CL/main/media/capiocl.png) # CAPIO-CL — Cross-Application Programmable I/O Coordination Language @@ -127,6 +127,12 @@ CAPIO-CL now provides native **Python bindings** built using [pybind11](https:// These bindings expose the core C++ APIs (`Engine`, `Parser` and `Serializer`), directly to Python, allowing the CAPIO-CL logic to be used within python projects. +### Install from PyPI +CAPIO-CL is available on PyPI! Simply run +```bash +pip install py_capio_cl +``` + ### Building the Bindings You can build and install the Python bindings directly from the CAPIO-CL source tree using: