Skip to content

Merge pull request #7 from jaesung-cs/develop #12

Merge pull request #7 from jaesung-cs/develop

Merge pull request #7 from jaesung-cs/develop #12

Workflow file for this run

name: Release Python Package
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Vulkan SDK and Runtime (ubuntu, macos)
uses: jakoch/install-vulkan-sdk-action@v1.2.7
if: ${{ matrix.os != 'windows-latest' }}
with:
vulkan_version: 1.4.328.1
install_runtime: true
cache: true
stripdown: true
destination: ${{ github.workspace }}/VulkanSDK
- name: Install Vulkan SDK and Runtime (windows)
uses: jakoch/install-vulkan-sdk-action@v1.2.7
if: ${{ matrix.os == 'windows-latest' }}
with:
vulkan_version: 1.4.328.1
install_runtime: true
cache: true
stripdown: true
destination: C:\VulkanSDK
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build package
run: |
cibuildwheel ./binding --output-dir wheelhouse
ls ./wheelhouse
env:
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_MACOS: "arm64"
CIBW_SKIP: "pp* *-musllinux_*"
# Linux
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_34_x86_64:2025.04.19-1" # slangc requirements
CIBW_ENVIRONMENT_LINUX: >
VULKAN_SDK=/project/VulkanSDK/1.4.328.1/x86_64
PATH=$VULKAN_SDK/bin:$PATH
LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH
PKG_CONFIG_PATH=$VULKAN_SDK/lib/pkgconfig:$PKG_CONFIG_PATH
CMAKE_PREFIX_PATH=$VULKAN_SDK:$CMAKE_PREFIX_PATH
- name: Test package installation
run: |
pip install $(ls wheelhouse/*cp310*.whl)
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: splatstream-${{ matrix.os }}
path: wheelhouse/
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
attestations: false
path: dist/
merge-multiple: true
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: false