Files
cibuildwheel/action.yml
T

60 lines
1.7 KiB
YAML
Raw Normal View History

2020-12-21 11:49:31 -05:00
name: cibuildwheel
description: 'Installs and runs cibuildwheel on the current runner'
inputs:
package-dir:
description: 'Input directory, defaults to "."'
required: false
default: .
output-dir:
description: 'Folder to place the outputs in, defaults to "wheelhouse"'
required: false
default: wheelhouse
config-file:
description: 'File containing the config, defaults to {package}/pyproject.toml'
required: false
default: ''
2022-09-09 08:34:47 -04:00
only:
description: 'Build a specific wheel only. No need for arch/platform if this is set'
required: false
default: ''
2020-12-21 11:49:31 -05:00
branding:
icon: package
color: yellow
runs:
using: composite
steps:
# Set up a non-EOL, cibuildwheel & pipx supported Python version
2022-07-11 09:34:04 -05:00
- uses: actions/setup-python@v4
id: python
with:
python-version: "3.8 - 3.11"
update-environment: false
2020-12-21 11:49:31 -05:00
2021-06-30 18:10:01 -04:00
# Redirecting stderr to stdout to fix interleaving issue in Actions.
- run: >
pipx run
--python '${{ steps.python.outputs.python-path }}'
2021-07-09 16:06:16 -04:00
--spec '${{ github.action_path }}'
cibuildwheel
"${{ inputs.package-dir }}"
--output-dir "${{ inputs.output-dir }}"
2021-10-26 15:16:58 -04:00
--config-file "${{ inputs.config-file }}"
2022-09-09 08:34:47 -04:00
--only "${{ inputs.only }}"
2021-06-30 18:10:01 -04:00
2>&1
2021-07-09 16:06:16 -04:00
shell: bash
if: runner.os != 'Windows'
# Windows needs powershell to interact nicely with Meson
- run: >
pipx run
--python "${{ steps.python.outputs.python-path }}"
--spec "${{ github.action_path }}"
cibuildwheel
"${{ inputs.package-dir }}"
--output-dir '"${{ inputs.output-dir }}"'
--config-file '"${{ inputs.config-file }}"'
--only '"${{ inputs.only }}"'
shell: pwsh
if: runner.os == 'Windows'