Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions .github/workflows/reusable-cibuildwheel.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
---

name: Build wheel
name: >-

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe why this name is so uncommon.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should show up in the sidebar with a clear message.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide a screenshot please?

I see that message in a context where there is not a button to click.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the text on the left sidebar, but I don't see a button that I shouldn't click.

Don't get me wrong, if you had the reason to write the text -- I respect it.

My intention is only to understand why you wrote the text and what exactly I shouldn't click.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a sidebar item, not a button. That page is never going to have any CI runs on it. And so I've been marking such pages as "don't click".
This is essentially the same concept I introduced in CPython with "modules" that are in-repo reusable workflows and aren't allowed to have any other triggers. Plus their filenames are prefixed per convention.

[DO NOT CLICK]
Reusable cibuildwheel

on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
dists-artifact-name:
description: Workflow artifact name containing dists
required: true
type: string
check-name:
description: A custom name for the Checks API-reported status
required: false
type: string
dists-artifact-name:
description: >-
Workflow artifact name containing dists.
Defaults to "python-package-distributions".
default: python-package-distributions
required: false
type: string
environment-variables:
description: >-
A newline-delimited blob of text with environment variables
Expand All @@ -32,8 +38,10 @@ on: # yamllint disable-line rule:truthy
required: false
type: string
source-tarball-name:
description: Sdist filename wildcard
required: true
default: >-
*.tar.gz
description: Sdist filename wildcard. Defaults to "*.tar.gz".
required: false
type: string
timeout-minutes:
description: Deadline for the job to complete
Expand Down Expand Up @@ -87,11 +95,11 @@ jobs:
print(f'hash={hash}', file=outputs_file)
shell: python

- name: Retrieve the project source from an sdist inside the GHA artifact
uses: re-actors/checkout-python-sdist@release/v2
- name: Download the source distribution
uses: actions/download-artifact@v4
with:
source-tarball-name: ${{ inputs.source-tarball-name }}
workflow-artifact-name: ${{ inputs.dists-artifact-name }}
name: ${{ inputs.dists-artifact-name }}
path: dist/

- name: Set up QEMU
if: inputs.qemu
Expand All @@ -101,6 +109,9 @@ jobs:

- name: Build wheels
uses: pypa/cibuildwheel@v3.0.0
with:
package-dir: >- # not necessarily a dir, we pass an acceptable sdist
dist/${{ inputs.source-tarball-name }}

- name: Upload built artifacts for testing and publishing
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions CHANGES/1199.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
When building wheels, the source distribution is now passed directly
to the ``cibuildwheel`` invocation -- by :user:`webknjaz`.
Loading