File: python-wheels.yml

package info (click to toggle)
openexr 3.4.6%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 41,948 kB
  • sloc: cpp: 166,793; ansic: 26,769; python: 2,990; sh: 581; makefile: 9
file content (88 lines) | stat: -rw-r--r-- 2,585 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# 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
          - os: macos-latest
            arch: arm64
          - os: windows-latest
            arch: x64

    steps:

      - name: Checkout
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Install Python 
        uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
        with:
          python-version: '3.x'

      - name: Create sdist
        # Only create it once.
        if: ${{ matrix.os == 'ubuntu-latest' }}
        run: pipx run build --sdist . --outdir wheelhouse

      - name: Build wheel
        uses: pypa/cibuildwheel@v3.3
        env:
          CIBW_ARCHS_MACOS: x86_64 arm64 universal2
          # Build Python 3.8 through 3.13
          # Skip 32-bit wheels builds on Windows
          # Also skip the PyPy builds, since they fail the unit tests
          CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*"
          CIBW_SKIP: "*-win32 *_i686"
          CIBW_TEST_SKIP: "*-macosx*arm64"

      - name: Upload artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: wheels-${{ matrix.os }}-${{ matrix.arch }}
          path: |
            ./wheelhouse/*.whl
            ./wheelhouse/*.tar.gz