Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,50 @@ jobs:
~/Library/Caches/pip
~/.cache/pip
~/AppData/Local/pip/Cache
key: cibw-pip-${{ matrix.os }}-${{ hashFiles('pyproject.toml') }}
~/Library/Caches/cibuildwheel
~/.cache/cibuildwheel
~/AppData/Local/pypa/cibuildwheel/Cache
key: cibw-${{ matrix.os }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
cibw-pip-${{ matrix.os }}-
cibw-${{ matrix.os }}-

- uses: pypa/[email protected]
- uses: astral-sh/setup-uv@v7

- name: Pre-cache virtualenv for cibuildwheel
shell: bash
run: |
# cibuildwheel downloads virtualenv.pyz from GitHub which can hit 429 rate limits.
# Pre-download with GITHUB_TOKEN auth (5000 req/hr vs 60 unauthenticated).
# Versions must match cibuildwheel v2.22 virtualenv.toml.
case "$RUNNER_OS" in
Windows) CACHE_DIR="$(cygpath "$USERPROFILE/AppData/Local/pypa/cibuildwheel/Cache")" ;;
macOS) CACHE_DIR="$HOME/Library/Caches/cibuildwheel" ;;
*) CACHE_DIR="$HOME/.cache/cibuildwheel" ;;
esac
mkdir -p "$CACHE_DIR"
for VERSION in 20.27.1 20.21.1; do
FILE="$CACHE_DIR/virtualenv-${VERSION}.pyz"
if [ ! -f "$FILE" ]; then
echo "Downloading virtualenv-${VERSION}.pyz..."
curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors \
-H "Authorization: Bearer $GITHUB_TOKEN" \
"https://raw.githubusercontent.com/pypa/get-virtualenv/${VERSION}/public/virtualenv.pyz" \
-o "$FILE"
else
echo "virtualenv-${VERSION}.pyz already cached"
fi
done
env:
GITHUB_TOKEN: ${{ github.token }}

- uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_WINDOWS: AMD64 ARM64
CIBW_SKIP: "pp* *musllinux* *_i686 cp314t-win*"
CIBW_TEST_SKIP: "*macosx* *win* *aarch64 cp314t-*"
CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=:all:"
# CIBW_BEFORE_BUILD: "pip install --prefer-binary fire numpy opencv-python"
CIBW_SKIP: "pp* *musllinux* *_i686"
CIBW_TEST_SKIP: "*macosx* *win* *aarch64"
# Use uv to avoid transient GitHub rate limits during build
CIBW_BUILD_FRONTEND: "build[uv]"

- name: Verify clean directory
run: git diff --exit-code
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "pybind11_pixelmatch"
version = "0.1.4"
version = "0.1.5"
description="A C++17 port of the JavaScript pixelmatch library (with python binding), providing a small pixel-level image comparison library."
readme = "README.md"
authors = [
Expand Down
Loading