Skip to content

Commit 17ea1d6

Browse files
committed
vispy: add build-vispy.yml for riscv64 wheels
1 parent 444c27e commit 17ea1d6

1 file changed

Lines changed: 87 additions & 0 deletions

File tree

.github/workflows/build-vispy.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# This workflow is based on: https://github.com/vispy/vispy/blob/v0.17.0/.github/workflows/wheels.yml
5+
name: Build vispy wheels (riscv64)
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'vispy version to build (git tag without leading v, e.g. 0.17.0)'
12+
required: true
13+
default: '0.17.0'
14+
pull_request:
15+
paths:
16+
- '.github/workflows/build-vispy.yml'
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ inputs.version || '0.17.0' }}-${{ github.head_ref || github.run_id }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: read # to fetch code (actions/checkout)
24+
25+
env:
26+
# `inputs.version` is empty on pull_request events; default there.
27+
VISPY_VERSION: ${{ inputs.version || '0.17.0' }}
28+
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
29+
30+
jobs:
31+
setup:
32+
uses: $/.github/workflows/_setup.yml
33+
34+
build_wheels:
35+
needs: [setup]
36+
name: Build vispy ${{ inputs.version || '0.17.0' }} ${{ matrix.python }}-manylinux_riscv64
37+
runs-on: ubuntu-24.04-riscv
38+
timeout-minutes: 60
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
# Per-interpreter (not abi3): the _sdf_cpu Cython extension links the
43+
# version-specific ABI.
44+
python:
45+
- "cp312"
46+
- "cp313"
47+
- "cp314"
48+
- "cp314t"
49+
50+
steps:
51+
- name: Checkout vispy v${{ env.VISPY_VERSION }}
52+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
53+
with:
54+
repository: vispy/vispy
55+
ref: v${{ env.VISPY_VERSION }}
56+
fetch-depth: 0 # hatch-vcs derives the version from `git describe`
57+
persist-credentials: false
58+
59+
- name: Build wheels
60+
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
61+
with:
62+
output-dir: wheelhouse/
63+
only: ${{ matrix.python }}-manylinux_riscv64
64+
env:
65+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
66+
# numpy is a build- and runtime dependency; only our registry has it
67+
# for riscv64, and PIP_ONLY_BINARY keeps a newer PyPI release from
68+
# winning the resolution and then compiling from sdist.
69+
CIBW_ENVIRONMENT: >-
70+
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
71+
PIP_ONLY_BINARY=numpy
72+
73+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
74+
with:
75+
name: vispy-${{ env.VISPY_VERSION }}-${{ matrix.python }}-manylinux_riscv64
76+
path: wheelhouse/*.whl
77+
if-no-files-found: error
78+
79+
publish:
80+
name: Publish vispy ${{ inputs.version || '0.17.0' }}
81+
needs: [setup, build_wheels]
82+
permissions:
83+
contents: write
84+
pull-requests: write
85+
uses: $/.github/workflows/_publish-wheel.yml
86+
with:
87+
artifact-pattern: vispy-${{ inputs.version || '0.17.0' }}-*-manylinux_riscv64

0 commit comments

Comments
 (0)