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
21 changes: 21 additions & 0 deletions .github/workflows/binary-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ name: Build and test binary wheels
# the commands outside an environment (and on Windows, away from the
# environment's other files).
#
# A repository that builds its binaries itself, instead of downloading them,
# builds them in an earlier job of the same workflow run and names those
# artifacts in `binaries-artifacts`; see include-what-you-use-wheel.
#
# The workflow uploads the wheels as the artifact `wheels`, and the files that
# `release-files-command` writes to release/ as the artifact `release-files`.
# Its last job, "All wheels pass", fails when any other job did not pass: it
Expand Down Expand Up @@ -60,6 +64,17 @@ on:
type: string
required: false
default: ""
binaries-artifacts:
description: >-
A name pattern of artifacts that earlier jobs of the calling
workflow run uploaded, e.g. binary-*, for a repository that builds
its binaries itself (include-what-you-use-wheel). Each matching
artifact is downloaded to binaries/<artifact name>/ before the
wheels are built, for the recipe to read. Empty means the recipe
downloads everything itself.
type: string
required: false
default: ""
release-files-command:
description: >-
A command that writes extra files for the GitHub release to release/,
Expand Down Expand Up @@ -142,6 +157,12 @@ jobs:
with:
python-version: "3.x"
- run: python -m pip install --group build
- name: Download the binaries built by the calling workflow
if: inputs.binaries-artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: ${{ inputs.binaries-artifacts }}
path: binaries
# The inputs win; the recipe (hatch-prebuilt 0.3 or later) fills in the rest.
- name: Read the recipe
id: recipe
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@ anyone.
| --- | --- | --- |
| [clang-include-cleaner-wheel](https://github.com/cpp-linter/clang-include-cleaner-wheel) | [clang-include-cleaner](https://pypi.org/project/clang-include-cleaner/) | clang-include-cleaner |
| [clang-apply-replacements-wheel](https://github.com/cpp-linter/clang-apply-replacements-wheel) | [clang-apply-replacements](https://pypi.org/project/clang-apply-replacements/) | clang-apply-replacements |
| [llvm-cov-wheel](https://github.com/cpp-linter/llvm-cov-wheel) | [llvm-cov](https://pypi.org/project/llvm-cov/) | llvm-cov, llvm-profdata |
| [ccache-wheel](https://github.com/cpp-linter/ccache-wheel) | [ccache-bin](https://pypi.org/project/ccache-bin/) | ccache |

[clangd-wheel](https://github.com/cpp-linter/clangd-wheel) and
[llvm-cov-wheel](https://github.com/cpp-linter/llvm-cov-wheel) join with their first releases.
[include-what-you-use-wheel](https://github.com/cpp-linter/include-what-you-use-wheel) join with
their first releases.

The LLVM tools come from the
[clang-tools-static-binaries](https://github.com/cpp-linter/clang-tools-static-binaries)
releases, unchanged, so such a repository needs only the tool's name in its `pyproject.toml`.
A tool whose upstream publishes its own binaries, like ccache, says where they come from in a
small `hatch_build.py`.
small `hatch_build.py`. A tool with no binaries anywhere, like include-what-you-use, builds them
in its own workflow and hands them to `binary-wheels.yml` as artifacts.

A wheel repository is a `pyproject.toml`, the pinned `sources.json`, its version file, a README, a
smoke test and three short workflows that call the ones here. To start one, see
Expand Down
Loading