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
58 changes: 58 additions & 0 deletions .github/workflows/benchmark-riscv64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Benchmark riscv64 wheel build

on:
workflow_dispatch:

# Standalone riscv64-only wheel build for timing purposes.
# Bypasses the full CI pipeline (which requires a release to exist on the fork).
# Produces real build times on ubuntu-24.04-riscv (RISE native runner) for
# upstream discussion at jcrist/msgspec#987.

permissions:
contents: read

jobs:
sdist:
name: Build source distribution
runs-on: ubuntu-latest
outputs:
sdist-name: ${{ steps.build.outputs.sdist-name }}
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- name: Build sdist
id: build
run: |
uv build --sdist
sdist_name=$(basename dist/*.tar.gz)
echo "sdist-name=${sdist_name}" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@v5
with:
name: artifact-sdist
path: dist/${{ steps.build.outputs.sdist-name }}
if-no-files-found: error

build-riscv64:
name: Build wheels on ubuntu-24.04-riscv for riscv64
needs: sdist
runs-on: ubuntu-24.04-riscv
steps:
- uses: actions/checkout@v5
- name: Download source distribution
uses: actions/download-artifact@v6
with:
name: artifact-sdist
path: dist
- name: Build & Test Wheels (riscv64 native)
run: |
export PATH="/opt/python-3.12/bin:$PATH"
pip install cibuildwheel==3.2.1
python3 -m cibuildwheel --output-dir wheelhouse dist/${{ needs.sdist.outputs.sdist-name }}
env:
CIBW_ARCHS: riscv64
CIBW_CONFIG_FILE: .cibuildwheel.toml
- uses: actions/upload-artifact@v5
with:
name: artifact-wheels-riscv64
path: wheelhouse/*.whl
if-no-files-found: error
16 changes: 16 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
archs: aarch64
- os: ubuntu-latest
archs: x86_64
- os: ubuntu-24.04-riscv
archs: riscv64
- os: macos-latest
archs: arm64
- os: macos-15-intel
Expand Down Expand Up @@ -51,7 +53,21 @@ jobs:
if: runner.os != 'Linux'
uses: astral-sh/setup-uv@v7

# On riscv64 the pypa/cibuildwheel action calls actions/setup-python
# internally, which has no riscv64 binaries. Install and run cibuildwheel
# directly via pip instead.
- name: Build & Test Wheels (riscv64 native)
if: matrix.archs == 'riscv64'
run: |
export PATH="/opt/python-3.12/bin:$PATH"
pip install cibuildwheel==3.2.1
python3 -m cibuildwheel --output-dir wheelhouse dist/${{ inputs.sdist-name }}
env:
CIBW_ARCHS: riscv64
CIBW_CONFIG_FILE: .cibuildwheel.toml

- name: Build & Test Wheels
if: matrix.archs != 'riscv64'
uses: pypa/cibuildwheel@v3.2.1
with:
config-file: .cibuildwheel.toml
Expand Down
Loading