zero-fill deep sample-count table for zero-length compressed input #1562
Workflow file for this run
This file contains hidden or 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
| # SPDX-License-Identifier: BSD-3-Clause | |
| # Copyright (c) Contributors to the OpenEXR Project. | |
| name: Python Wheels | |
| on: | |
| # Run on all changes (PR and push) to the python binding | |
| # source/configuration files, except on the release branches, which | |
| # have their own workflow, which also publish to pypi/test.pypi. | |
| # Note that changes to the core libraries will *not* | |
| # trigger building the wheels. However, the main ci workflow does | |
| # build and test the bindings (for a single python version on a | |
| # single arch) | |
| push: | |
| paths: | |
| - 'cmake/**' | |
| - 'src/lib/**' | |
| - 'src/wrappers/python/**' | |
| - 'pyproject.toml' | |
| - '!share/ci/**' | |
| - '!.github/workflows/**' | |
| - '.github/workflows/python-wheels.yml' | |
| pull_request: | |
| paths: | |
| - 'cmake/**' | |
| - 'src/lib/**' | |
| - 'src/wrappers/python/**' | |
| - 'pyproject.toml' | |
| - '!share/ci/**' | |
| - '!.github/workflows/**' | |
| - '.github/workflows/python-wheels.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build_wheels: | |
| name: Python Wheels - ${{ matrix.os }}-${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| arch: x64 | |
| - os: ubuntu-24.04-arm | |
| arch: arm64 | |
| - os: macos-15-intel | |
| arch: x64 | |
| cibw_archs_macos: x86_64 universal2 | |
| - os: macos-latest | |
| arch: arm64 | |
| cibw_archs_macos: arm64 | |
| - os: windows-latest | |
| arch: x64 | |
| permissions: | |
| contents: read | |
| actions: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Install Python | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: '3.x' | |
| - name: Create sdist | |
| # Only create it once. | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: pipx run build==1.2.2.post1 --sdist . --outdir wheelhouse | |
| - name: Build wheel | |
| uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0 | |
| with: | |
| output-dir: wheelhouse | |
| env: | |
| # Split macOS arches across runners so artifact merge does not collide on filenames. | |
| CIBW_ARCHS_MACOS: ${{ matrix.cibw_archs_macos }} | |
| # Build Python 3.9 through 3.13 | |
| # Skip 32-bit wheels builds on Windows | |
| # Also skip the PyPy builds, since they fail the unit tests | |
| CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*" | |
| CIBW_SKIP: "*-win32 *_i686" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.arch }} | |
| path: | | |
| ./wheelhouse/*.whl | |
| ./wheelhouse/*.tar.gz | |
| verify_publish_artifacts: | |
| name: Verify merged wheel artifacts | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| actions: read | |
| steps: | |
| - name: Download wheel artifacts separately | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: wheels-* | |
| path: artifacts | |
| - name: Detect duplicate distribution filenames | |
| run: | | |
| set -euo pipefail | |
| mapfile -t dupes < <( | |
| find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec basename {} \; \ | |
| | sort \ | |
| | uniq -d | |
| ) | |
| if ((${#dupes[@]} > 0)); then | |
| echo "::error::Duplicate distribution filenames across build artifacts:" | |
| printf ' %s\n' "${dupes[@]}" | |
| exit 1 | |
| fi | |
| - name: Download wheel artifacts (as publish does) | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Verify wheel ZIP integrity | |
| run: | | |
| set -euo pipefail | |
| shopt -s nullglob | |
| wheels=(dist/*.whl) | |
| if ((${#wheels[@]} == 0)); then | |
| echo "::error::No wheels found in dist/" | |
| exit 1 | |
| fi | |
| for wheel in "${wheels[@]}"; do | |
| echo "Checking $wheel" | |
| python3 -m zipfile -t "$wheel" | |
| done | |
| - name: Validate distribution metadata | |
| run: pipx run twine==6.1.0 check dist/* |