Update pip.yml

This commit is contained in:
2025-09-20 23:27:41 +05:30
parent 97eb8f6d1a
commit 761bf2d660
4 changed files with 24 additions and 25 deletions

View File

@ -18,13 +18,13 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
@ -38,46 +38,46 @@ jobs:
matrix:
# Build for both x86_64 and aarch64
arch: [x86_64, aarch64]
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Set up QEMU for aarch64 emulation
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build wheels
uses: pypa/cibuildwheel@v2.17
env:
# Only build for Linux
CIBW_PLATFORM: linux
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
# Python versions to build for
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-musllinux*" # Skip musl builds, focus on glibc
# Install system dependencies before building
CIBW_BEFORE_ALL_LINUX: >
yum install -y epel-release &&
yum install -y libbpf-devel kernel-headers ||
(apt-get update && apt-get install -y libbpf-dev linux-headers-generic)
# Test the built wheels
CIBW_TEST_COMMAND: "python -c 'import pylibbpf; print(f\"pylibbpf {pylibbpf.__version__} imported successfully\")'"
# Skip testing on emulated architectures (too slow)
CIBW_TEST_SKIP: "*-linux_aarch64"
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
@ -95,7 +95,7 @@ jobs:
environment:
name: pypi
# url: https://pypi.org/project/pylibbpf/${{ github.event.release.name }}
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
@ -103,7 +103,7 @@ jobs:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with: