Skip to content

Commit e026b82

Browse files
committed
tree-sitter-ruby: add build-tree-sitter-ruby.yml for riscv64 wheels
* Package: tree-sitter-ruby * Version: 0.23.1 * Source: https://github.com/tree-sitter/tree-sitter-ruby * Docs: https://github.com/tree-sitter/tree-sitter-ruby Compiles the Ruby tree-sitter grammar's parser and external scanner into the _binding extension. Upstream publishes no riscv64 wheel. Mirrors upstream's package-pypi.yml, same shape as the already-merged build-tree-sitter-java.yml / build-tree-sitter-cpp.yml / build-tree-sitter-rust.yml.
1 parent ab59920 commit e026b82

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# Based on upstream's wheel builder:
5+
# https://github.com/tree-sitter/workflows/blob/main/.github/workflows/package-pypi.yml
6+
name: Build tree-sitter-ruby wheels (riscv64)
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'tree-sitter-ruby version to build (git tag without leading v, e.g. 0.23.1)'
13+
required: true
14+
default: '0.23.1'
15+
pull_request:
16+
paths:
17+
- '.github/workflows/build-tree-sitter-ruby.yml'
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ inputs.version || '0.23.1' }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read # to fetch code (actions/checkout)
25+
26+
env:
27+
TREE_SITTER_RUBY_VERSION: ${{ inputs.version || '0.23.1' }}
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 tree-sitter-ruby ${{ inputs.version || '0.23.1' }} cp39-abi3-manylinux_riscv64
37+
runs-on: ubuntu-24.04-riscv
38+
timeout-minutes: 120
39+
40+
steps:
41+
- name: Checkout tree-sitter-ruby v${{ env.TREE_SITTER_RUBY_VERSION }}
42+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43+
with:
44+
repository: tree-sitter/tree-sitter-ruby
45+
ref: v${{ env.TREE_SITTER_RUBY_VERSION }}
46+
persist-credentials: false
47+
48+
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
49+
env:
50+
CIBW_ARCHS: riscv64
51+
CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64
52+
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
53+
CIBW_TEST_EXTRAS: core
54+
CIBW_TEST_SOURCES: bindings/python/tests
55+
CIBW_TEST_COMMAND: python -m unittest discover -v -s bindings/python/tests
56+
57+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
58+
with:
59+
name: tree-sitter-ruby-${{ env.TREE_SITTER_RUBY_VERSION }}-cp39-abi3-manylinux_riscv64
60+
path: ./wheelhouse/*.whl
61+
if-no-files-found: error
62+
63+
publish:
64+
name: Publish tree-sitter-ruby ${{ inputs.version || '0.23.1' }}
65+
needs: [setup, build_wheels]
66+
permissions:
67+
contents: write
68+
pull-requests: write
69+
uses: $/.github/workflows/_publish-wheel.yml
70+
with:
71+
artifact-pattern: tree-sitter-ruby-${{ inputs.version || '0.23.1' }}-*-manylinux_riscv64

0 commit comments

Comments
 (0)