Bumps the actions group with 2 updates in the / directory: [actions/setup-python](https://github.com/actions/setup-python) and [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance). Updates `actions/setup-python` from 5 to 6 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) Updates `actions/attest-build-provenance` from 2.4.0 to 3.0.0 - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](https://github.com/actions/attest-build-provenance/compare/e8998f949152b193b063cb0ec769d69d929409be...977bb373ede98d70efdf65b84cb5f73e068dcc2a) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/attest-build-provenance dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
92 lines
3.0 KiB
YAML
92 lines
3.0 KiB
YAML
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: ''
|
|
only:
|
|
description: 'Build a specific wheel only. No need for arch/platform if this is set'
|
|
required: false
|
|
default: ''
|
|
branding:
|
|
icon: package
|
|
color: yellow
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: actions/setup-python@v6
|
|
id: python
|
|
with:
|
|
python-version: "3.11 - 3.13"
|
|
update-environment: false
|
|
|
|
- id: cibw
|
|
run: |
|
|
# Install cibuildwheel
|
|
"${{ steps.python.outputs.python-path }}" -u << "EOF"
|
|
import os
|
|
import shutil
|
|
import sys
|
|
import venv
|
|
|
|
from pathlib import Path
|
|
from subprocess import run
|
|
|
|
|
|
class EnvBuilder(venv.EnvBuilder):
|
|
def __init__(self):
|
|
super().__init__()
|
|
|
|
def setup_scripts(self, context):
|
|
pass
|
|
|
|
def post_setup(self, context):
|
|
super().post_setup(context)
|
|
self.bin_path = Path(context.env_exe).parent
|
|
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
|
|
|
|
|
|
print("::group::Install cibuildwheel")
|
|
venv_path = Path(r"${{ runner.temp }}") / "cibw"
|
|
if venv_path.exists():
|
|
shutil.rmtree(venv_path)
|
|
builder = EnvBuilder()
|
|
builder.create(venv_path)
|
|
cibw_path = [path for path in builder.bin_path.glob("cibuildwheel*") if path.stem == "cibuildwheel"][0]
|
|
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
|
|
f.write(f"cibw-path={cibw_path}\n")
|
|
print("::endgroup::")
|
|
EOF
|
|
shell: bash
|
|
|
|
# Redirecting stderr to stdout to fix interleaving issue in Actions.
|
|
- run: >
|
|
"${{ steps.cibw.outputs.cibw-path }}"
|
|
"${{ inputs.package-dir }}"
|
|
${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}}
|
|
${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}}
|
|
${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
|
|
2>&1
|
|
shell: bash
|
|
if: runner.os != 'Windows'
|
|
|
|
# Windows needs powershell to interact nicely with Meson
|
|
- run: >
|
|
& "${{ steps.cibw.outputs.cibw-path }}"
|
|
"${{ inputs.package-dir }}"
|
|
${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}}
|
|
${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}}
|
|
${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
|
|
shell: pwsh
|
|
if: runner.os == 'Windows'
|