Skip to content

Commit

Permalink
🐛🧪 Fix referencing GHA artifact @ whl builders
Browse files Browse the repository at this point in the history
It wasn't obvious right away, but referencing a job in the
`${{ needs }}` context that is not being depended on, and does not
even exist, silently returned an empty string for the whole expression
passed to the `name:` input of the `download-artifact` action
invocations. This subsequently triggered the behavior of said action to
change to "download all the artifacts that exist in the workflow".
This "download all" behavior has an additional quirk, though — it
downloads each artifact in a subdirectory named after the artifact name.
The behavior of the "download one specific artifact" mode, on the other
hand, is different in that it does not create an extra level of nesting.
This was the reason why it felt necessary to unpack two-levels deep
sdist tarballs in the first place.

With this patch, references to said sdists will change.
  • Loading branch information
webknjaz committed May 28, 2024
1 parent b15583c commit 9648407
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ env:
jobs:
python_sdist:
runs-on: ubuntu-22.04
outputs:
artifact_name: ${{ steps.build_sdist.outputs.artifact_name }}
steps:
- name: clone repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -258,7 +260,7 @@ jobs:
id: fetch_sdist
uses: actions/download-artifact@v4
with:
name: ${{ needs.build_sdist.outputs.artifact_name }}
name: ${{ needs.python_sdist.outputs.artifact_name }}

- name: configure docker foreign arch support
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -386,7 +388,7 @@ jobs:
id: fetch_sdist
uses: actions/download-artifact@v4
with:
name: ${{ needs.build_sdist.outputs.artifact_name }}
name: ${{ needs.python_sdist.outputs.artifact_name }}

- name: install python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -488,7 +490,7 @@ jobs:
id: fetch_sdist
uses: actions/download-artifact@v4
with:
name: ${{ needs.build_sdist.outputs.artifact_name }}
name: ${{ needs.python_sdist.outputs.artifact_name }}

- name: build/test wheels
uses: pypa/[email protected]
Expand Down

0 comments on commit 9648407

Please sign in to comment.