Skip to content

Commit

Permalink
fix: update the build-ci wheels actions (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Jul 11, 2024
1 parent e1e8ac1 commit 3196d4f
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions build-ci-wheels/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ inputs:
required: true
type: string

library-name:
description: >
Name of the Python library. This is the name used when uploading the wheel
and source distribution as artifacts. The name should be the same one used
in the PyPI index.
required: true
type: string

operating-system:
description: >
Name of the operating system where the library is installed.
required: true
type: string

# Optional inputs

cibw-build:
Expand All @@ -54,13 +68,6 @@ inputs:
required: false
type: string

cibw-skip:
description: >
Desired conditions to skip when building the wheels.
default: "*-musllinux*"
required: false
type: string

cibw-archs:
description: >
Desired build architecture.
Expand Down Expand Up @@ -91,36 +98,25 @@ runs:
platforms: arm64

- name: "Build wheels for CPython ${{ inputs.python-version }}"
if: ${{ inputs.cibw-build != 'cp38-*' && inputs.requires-pypy == 'false' }}
uses: pypa/cibuildwheel@v2.16.2
if: ${{ inputs.requires-pypy == 'false' }}
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_BUILD: ${{ inputs.cibw-build }}
CIBW_SKIP: ${{ inputs.cibw-skip }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_ARCHS: ${{ inputs.cibw-archs }}

- name: "Build wheels for CPython 3.8"
if: ${{ inputs.cibw-build == 'cp38-*' && inputs.requires-pypy == 'false' }}
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BUILD: ${{ inputs.cibw-build }}
CIBW_SKIP: ${{ inputs.cibw-skip }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_ARCHS: ${{ inputs.cibw-archs }}

- name: "Build wheels for PyPy"
if: ${{ inputs.requires-pypy == 'true' && inputs.cibw-archs != 'aarch64' }}
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_BUILD: "pp38-* pp39-*"
CIBW_BUILD: "pp39-*"
CIBW_SKIP: ${{ inputs.cibw-skip }}
CIBW_ARCHS: ${{ inputs.cibw-archs }}

- name: "Upload wheel"
uses: actions/upload-artifact@v4
with:
name: wheels
name: ${{ inputs.library-name }}-${{ inputs.operating-system }}-${{ inputs.python-version }}-wheels
path: ./wheelhouse/*.whl
retention-days: 7

0 comments on commit 3196d4f

Please sign in to comment.