Use uvx to run cibuildwheel on RISC-V (#118)
* Use uvx to run cibuildwheel on RISC-V Oldest uvx mistake ever Cache bust on arch * Choose Python explicitly * Simplify os/arch handling * Add name * Use official * Cache only for local builds * Zizmor is not happy
This commit is contained in:
parent
2c740a9551
commit
8e2fa4cc6e
28
.github/workflows/wheels.yml
vendored
28
.github/workflows/wheels.yml
vendored
@ -19,7 +19,7 @@ permissions: {}
|
||||
|
||||
jobs:
|
||||
wheels:
|
||||
name: Building for ${{ matrix.os }}${{ matrix.name_suffix || '' }}
|
||||
name: Building for ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -31,8 +31,6 @@ jobs:
|
||||
- os: windows-11-arm
|
||||
- os: macOS-14
|
||||
- os: ubuntu-24.04-riscv
|
||||
cibw_archs: "riscv64"
|
||||
name_suffix: "-riscv64"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
@ -43,30 +41,24 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
if: matrix.cibw_archs != 'riscv64'
|
||||
with:
|
||||
enable-cache: false
|
||||
enable-cache: "false"
|
||||
|
||||
# Use the GitHub Action for all platforms except riscv64
|
||||
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
|
||||
if: matrix.cibw_archs != 'riscv64'
|
||||
- name: Build wheels on ${{ matrix.os }}
|
||||
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
|
||||
if: ${{ !endsWith(matrix.os, 'riscv') }}
|
||||
env:
|
||||
CIBW_ARCHS: ${{ matrix.cibw_archs || 'auto' }}
|
||||
CIBW_ARCHS: auto
|
||||
|
||||
# On riscv64 native runners, run cibuildwheel via pipx to avoid
|
||||
# the GitHub Action's setup-python call (not available for riscv64)
|
||||
- name: Build wheels (riscv64 native)
|
||||
if: matrix.cibw_archs == 'riscv64'
|
||||
run: |
|
||||
export PATH="$(ls -d /opt/python-3.1*/bin 2>/dev/null | sort -V | tail -1):$PATH"
|
||||
python3 --version
|
||||
python3 -m pip install pipx
|
||||
pipx run cibuildwheel --output-dir wheelhouse
|
||||
- name: Build wheels on ${{ matrix.os }}
|
||||
run: uvx --python 3.14 cibuildwheel --output-dir wheelhouse
|
||||
if: ${{ endsWith(matrix.os, 'riscv') }}
|
||||
env:
|
||||
CIBW_ARCHS: riscv64
|
||||
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: wheels-${{ matrix.os }}${{ matrix.name_suffix || '' }}-${{ strategy.job-index }}
|
||||
name: wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||
path: ./wheelhouse/*.whl
|
||||
...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user