-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,78 +91,20 @@ jobs: | |
target: ${{ matrix.target }} | ||
manylinux: auto | ||
args: --release --out dist -i python${{ matrix.python-version }} | ||
- name: Install built wheel | ||
if: matrix.target == 'x86_64' | ||
- name: Debug dist directory | ||
run: | | ||
# List all wheels to debug | ||
echo "Available wheels:" | ||
echo "Contents of dist directory:" | ||
ls -la dist/ | ||
pip install -U pip pytest click>=8.0.0 | ||
pip install --find-links dist/ ${{ env.PACKAGE_NAME }} | ||
pytest -v | ||
echo "Full path of dist directory:" | ||
pwd | ||
echo "Total files in dist:" | ||
find dist -type f | wc -l | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-linux-${{ matrix.target }}-py${{ matrix.python-version }} | ||
path: dist | ||
|
||
# linux-cross: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# target: [aarch64, armv7, s390x, ppc64le, ppc64] | ||
# python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Build wheels | ||
# uses: PyO3/maturin-action@v1 | ||
# env: | ||
# PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }} | ||
# PYO3_CROSS: "1" | ||
# PYTHON_VERSION: ${{ matrix.python-version }} | ||
# with: | ||
# target: ${{ matrix.target }} | ||
# manylinux: auto | ||
# args: --release --out dist -i python${{ matrix.python-version }} | ||
# sccache: 'true' | ||
# docker-options: >- | ||
# --platform ${{ matrix.target == 'armv7' && 'linux/arm/v7' || | ||
# matrix.target == 'aarch64' && 'linux/arm64' || | ||
# matrix.target == 's390x' && 'linux/s390x' || | ||
# matrix.target == 'ppc64le' && 'linux/ppc64le' || | ||
# 'linux/amd64' }} | ||
# - uses: uraimo/[email protected] | ||
# if: matrix.target != 'ppc64' | ||
# name: Install built wheel | ||
# with: | ||
# arch: ${{ matrix.target }} | ||
# distro: ubuntu_latest | ||
# githubToken: ${{ github.token }} | ||
# install: | | ||
# apt-get update | ||
# apt-get install -y --no-install-recommends python3 python3-pip python3-venv | ||
# pip3 install -U pip pytest click>=8.0.0 | ||
# run: | | ||
# # List all wheels to debug | ||
# echo "Available wheels:" | ||
# ls -la dist/ | ||
|
||
# # Install using find-links to handle platform tags correctly | ||
# pip3 install --find-links dist/ ${{ env.PACKAGE_NAME }} | ||
# pytest -v | ||
# - name: Upload wheels | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: wheels-linux-cross-${{ matrix.target }}-py${{ matrix.python-version }} | ||
# path: dist | ||
path: dist/* | ||
if-no-files-found: error | ||
|
||
musllinux: | ||
runs-on: ubuntu-latest | ||
|
@@ -226,77 +168,6 @@ jobs: | |
name: wheels-musllinux-${{ matrix.target }}-py${{ matrix.python-version }} | ||
path: dist | ||
|
||
# musllinux-cross: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# platform: | ||
# - target: aarch64-unknown-linux-musl | ||
# arch: aarch64 | ||
# platform: linux/arm64 | ||
# - target: armv7-unknown-linux-musleabihf | ||
# arch: armv7 | ||
# platform: linux/arm/v7 | ||
# python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Build wheels | ||
# uses: PyO3/maturin-action@v1 | ||
# env: | ||
# PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }} | ||
# PYO3_CROSS: "1" | ||
# with: | ||
# target: ${{ matrix.platform.target }} | ||
# manylinux: musllinux_1_2 | ||
# args: --release --out dist -i python${{ matrix.python-version }} | ||
# sccache: 'true' | ||
# docker-options: "--platform ${{ matrix.platform.platform }}" | ||
# - uses: uraimo/run-on-arch-action@master | ||
# name: Install built wheel | ||
# with: | ||
# arch: ${{ matrix.platform.arch }} | ||
# distro: alpine_latest | ||
# githubToken: ${{ github.token }} | ||
# install: | | ||
# apk add --no-cache \ | ||
# python3 \ | ||
# py3-pip \ | ||
# gcc \ | ||
# musl-dev \ | ||
# python3-dev \ | ||
# rust \ | ||
# cargo \ | ||
# openssl-dev \ | ||
# pkgconfig | ||
# run: | | ||
# # Create and activate virtual environment | ||
# python3 -m venv /venv | ||
# . /venv/bin/activate | ||
|
||
# # Install Python dependencies | ||
# pip install --upgrade pip wheel setuptools | ||
# pip install pytest click>=8.0.0 | ||
|
||
# # Install in development mode | ||
# cd /io | ||
# pip install -e . | ||
|
||
# # Run tests | ||
# python -m pytest -v | ||
# - name: Upload wheels | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: wheels-musllinux-cross-${{ matrix.platform.target }}-py${{ matrix.python-version }} | ||
# path: dist | ||
|
||
|
||
sdist: | ||
runs-on: ubuntu-latest | ||
# Add permissions to job | ||
|
@@ -325,26 +196,35 @@ jobs: | |
id-token: write | ||
contents: read | ||
steps: | ||
- name: Create dist directory | ||
run: mkdir -p dist | ||
|
||
# Download each type of artifact explicitly | ||
- uses: actions/download-artifact@v3 | ||
- name: Prepare artifacts for release | ||
run: | | ||
# Create dist directory | ||
mkdir -p dist/ | ||
with: | ||
path: downloaded | ||
|
||
# Debug: Show current directory structure before moving files | ||
echo "Current directory structure:" | ||
ls -R | ||
- name: Debug downloaded artifacts | ||
run: | | ||
echo "Contents of downloaded directory:" | ||
ls -R downloaded/ | ||
# Move all wheel files and source distributions to dist/ | ||
find . -type f \( -name "*.whl" -o -name "*.tar.gz" \) -exec mv -v {} dist/ \; | ||
- name: Prepare artifacts for release | ||
run: | | ||
# Move all wheels and tarballs to dist directory | ||
find downloaded -type f \( -name "*.whl" -o -name "*.tar.gz" \) -exec cp -v {} dist/ \; | ||
# Debug: Show contents of dist directory | ||
echo "Contents of dist directory:" | ||
echo "Final contents of dist directory:" | ||
ls -la dist/ | ||
# Count files in dist directory | ||
echo "Number of distribution files:" | ||
find dist/ -type f | wc -l | ||
if [ $(find dist/ -type f | wc -l) -eq 0 ]; then | ||
echo "Error: No distribution files found!" | ||
exit 1 | ||
fi | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
|