Skip to content

fix: missing cibuildwheel installation #43

fix: missing cibuildwheel installation

fix: missing cibuildwheel installation #43

Workflow file for this run

name: CD
on:
push:
tags:
- "v*"
permissions:
id-token: "write"
contents: "write"
packages: "write"
pull-requests: "read"
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}
- name: Setup Python 3.10.4
uses: actions/setup-python@v3
with:
python-version: "3.10.4"
- name: Setup Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.2
- name: Install Dependencies
run: |
poetry install --only test
- name: Setup CMake
uses: jwlawson/[email protected]
with:
cmake-version: "3.16.x"
- name: Build
run: |
cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_PYBIND11=ON -DPRINT_BENCHMARK=OFF -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=OFF
make libstreamvbyte libstreamvbyte_tests
- name: Test
run: |
./libstreamvbyte_tests
poetry run python -m pytest ./tests/test.py
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
build_wheels:
name: Build wheels of ${{ matrix.version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build_sdist
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: [cp38-*, cp39-*, cp310-*, cp311-*, cp312-*, cp313-*]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}
- uses: actions/setup-python@v5
- name: Setup QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.19.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.version }}
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: auto aarch64
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BUILD_VERBOSITY_MACOS: 3
CIBW_PRERELEASE_PYTHONS: True
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
release-pypi:
name: Release to PyPI
needs: build_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}
- uses: actions/setup-python@v5
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
release-github:
name: Release to GitHub
needs: build_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Release Tagged Version
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
dist/**