Repository navigation
Conversation
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
- Use setup-uv instead of setup-python, since uv is generally faster and supports more architectures (e.g. riscv64) - Use 'uv pip' and 'uv build' everywhere instead of 'pip' and 'python -m build' - Add UV_* variables to environment for use with uv build frontend - Add ubuntu-24.04-riscv runner label and riscv64 build variables Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Reviewer's GuideThe workflows are migrated to uv for Python setup, dependency installation, sdist creation, and cibuildwheel builds, while adding RISE native riscv64 runners and package-index configuration so RISC-V wheels and tests can be produced alongside existing platforms. Sequence diagram for uv-based wheel and sdist publishingsequenceDiagram
participant Workflow as GitHub Actions
participant UV as uv
participant CIBW as cibuildwheel
participant Index as RISE package index
participant PyPI as PyPI
Workflow->>UV: setup-uv
Workflow->>UV: uv pip install build
Workflow->>UV: uv build --sdist
Workflow->>CIBW: build wheels with CIBW_BUILD_FRONTEND
CIBW->>UV: install build dependencies
UV->>Index: resolve packages using UV_EXTRA_INDEX_URL
CIBW-->>Workflow: platform wheels
Workflow->>PyPI: publish sdist and wheels
Flow diagram for riscv64 wheel generationflowchart TD
Start["Calculate wheel matrix"] --> Runner["ubuntu-24.04-riscv"]
Runner --> Setup["Set CIBW_ARCHS to riscv64"]
Setup --> Build["cibuildwheel uses uv frontend"]
Build --> Env["Pass RISE index environment into Linux container"]
Env --> Wheel["Upload riscv64 wheel artifact"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/fast-built-and-test.yml" line_range="33-37" />
<code_context>
- - uses: actions/setup-python@v7
- name: Install Python
+ - name: Python ${{ matrix.config.python }}
+ uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
</code_context>
<issue_to_address>
**issue (bug_risk):** The workflows reference `matrix.config.python`, but the fast-test matrix defines `python_version` directly and the distribution jobs have no matrix at all. Consequently, fast-test setup-uv receives an empty Python version instead of the requested matrix version, and the distribution step labels render without a Python version.
**Suggested fix:** Use `${{ matrix.python_version }}` in the fast-test job and a literal `3.13` (or remove the expression) in the distribution step names.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and the release and test workflows now silently allow an external package index to win dependency resolution via unsafe-best-match, so a compromised or incorrect package there could execute during builds and potentially be incorporated into published artifacts. Reverting the workflow would not recall any already-published wheels or packages produced under that dependency policy.
Blocking findings: .github/workflows/fast-built-and-test.yml:37
- Use setup-uv instead of setup-python, since uv is faster and supports more architectures (e.g. riscv64) by default - Add UV_* variables to the environment enabling binary wheel downloads from the RISE Python registry, if PyPI doesn't have them - Use 'uv pip install' wherever 'pip install' is found - Add the ubuntu-24.04-riscv runner label to the matrix Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Be more explicit about using the relevant interpreter's pip module in case pip isn't on the path. Also pass the RISE package registry as an environment variable, so that tests on riscv64 can find binary wheels to download if they're not on PyPI. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1f57f51 to
9d3ca96
Compare
Update the workflows and pyproject.toml to use uv, then make use of RISE's Native RISC-V Runners to build ijson for riscv64. This requires enabling them for the repository as a GitHub Application. More info is available here: https://riscv-runners.riseproject.dev/
I tried a test run on my fork. You can review the results here: threexc#1
This is being done on behalf of RISE, using the RISC-V Wheels dashboard to track upstream support for the Python ecosystem.
Summary by Sourcery
Adopt uv across packaging workflows and add riscv64 testing and wheel builds.
New Features:
Enhancements:
CI: