Skip to content
Open
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: 38 additions & 20 deletions .github/workflows/build-rs1090.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,41 @@ jobs:
package: rs1090
version: ${{ inputs.version }}

build_wheels:
# docs/packages/rs1090.yaml also declares musllinux targets, but the test
# step below needs pandas, which pypi.riseproject.dev ships for
# manylinux_riscv64 only (no musllinux_riscv64 wheel at all) -- confirmed
# against the Simple API, not assumed. Drop those rows here rather than
# build a wheel this job cannot test; this also keeps `publish`'s
# completeness check (ci_scripts/update_doc.py) from expecting a musllinux
# wheel that never gets uploaded.
manylinux_matrix:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.filter.outputs.matrix }}
steps:
- name: Drop musllinux rows
id: filter
env:
MATRIX: ${{ needs.setup.outputs.matrix }}
run: |
python3 -c "
import json, os
rows = [r for r in json.loads(os.environ['MATRIX']) if r['platform'] == 'manylinux']
print('matrix=' + json.dumps(rows))
" >> "$GITHUB_OUTPUT"

build_wheels:
needs: [setup, manylinux_matrix]
if: needs.setup.outputs.versions != '[]'
name: Build rs1090 ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python: ["cp312", "cp313", "cp314"]
# No musllinux: rustup.rs ships no riscv64 musl toolchain, and
# maturin-action has no musllinux riscv64 container to build in (it
# falls back to the host, where its `pip install` hits PEP 668).
include:
- python: cp312
interpreter: python3.12
python-version: '3.12'
- python: cp313
interpreter: python3.13
python-version: '3.13'
- python: cp314
interpreter: python3.14
python-version: '3.14'
include: ${{ fromJSON(needs.manylinux_matrix.outputs.matrix) }}

env:
RS1090_VERSION: ${{ matrix.version }}
Expand All @@ -96,18 +107,25 @@ jobs:
- name: Patch rs1090 source
run: git apply python-wheels/patches/rs1090/${{ env.RS1090_VERSION }}/*.patch

- name: Determine target interpreter
id: interp
run: |
v="${{ matrix.python }}"
v="${v#cp}"
echo "value=python${v:0:1}.${v:1}" >> "$GITHUB_OUTPUT"

- name: Build wheel
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
working-directory: python
target: riscv64gc-unknown-linux-gnu
args: --release -i ${{ matrix.interpreter }} --out dist
args: --release -i ${{ steps.interp.outputs.value }} --out dist
manylinux: '2_39'

- name: Install Python
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ steps.interp.outputs.value }}
activate-environment: true
enable-cache: false

Expand All @@ -133,7 +151,7 @@ jobs:

publish:
name: Publish rs1090 ${{ matrix.version }}
needs: [setup, build_wheels]
needs: [setup, manylinux_matrix, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
Expand All @@ -146,5 +164,5 @@ jobs:
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
matrix: ${{ needs.setup.outputs.matrix }}
matrix: ${{ needs.manylinux_matrix.outputs.matrix }}
artifact-pattern: rs1090-${{ matrix.version }}-*riscv64
24 changes: 11 additions & 13 deletions .github/workflows/build-sudachipy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
# https://github.com/WorksApplications/sudachi.rs/blob/v0.7.0/.github/workflows/build-python-wheels.yml
# 0.7.0 switched the python/ build from setuptools-rust to maturin, whose
# pyo3 dependency now enables the "abi3-py310" feature (python/Cargo.toml):
# one cp310 wheel loads on every newer non-free-threaded CPython, so the
# matrix collapses to it plus the separate free-threaded cp314t build
# (CLAUDE.md gotcha 11), same shape as build-apache-tvm-ffi.yml.
# one cp310 wheel loads on every newer non-free-threaded CPython, so a
# version declared with a `3.10-abi3:manylinux` target collapses to it plus
# the separate free-threaded cp314t build (CLAUDE.md gotcha 11), same shape
# as build-apache-tvm-ffi.yml. needs.setup.outputs.matrix (_setup.yml) does
# that collapsing per version already; a pre-0.7.0 version with no abi3
# target instead gets one wheel per declared interpreter.
name: Build sudachipy wheels (riscv64)

on:
Expand Down Expand Up @@ -61,14 +64,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python: ["cp310", "cp314t"]
include:
# tokenizers has no free-threaded wheel anywhere (abi3-only); its sdist
# build is unproven here, so drop just the one test module that needs it.
- python: "cp314t"
drop_pretokenizer_test: "rm tests/test_pretokenizers.py &&"
test_requires: 'sudachidict_core'
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

env:
SUDACHIPY_VERSION: ${{ matrix.version }}
Expand Down Expand Up @@ -111,11 +107,13 @@ jobs:
CIBW_ENVIRONMENT: PATH="$PATH:$HOME/.cargo/bin" PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
# pypi.riseproject.dev's newest tokenizers (0.22.2) is behind PyPI's
# (0.23.2, no riscv64 wheel); pin so pip resolves to ours.
CIBW_TEST_REQUIRES: ${{ matrix.test_requires || 'tokenizers==0.22.2 sudachidict_core' }}
# tokenizers has no free-threaded wheel anywhere (abi3-only); its sdist
# build is unproven here, so drop just the one test module that needs it.
CIBW_TEST_REQUIRES: ${{ matrix.python == 'cp314t' && 'sudachidict_core' || 'tokenizers==0.22.2 sudachidict_core' }}
# Upstream's own build_and_test.sh test command, run against {package}
# (gotcha 5) since cibuildwheel tests from an empty scratch directory.
CIBW_TEST_COMMAND: >-
bash -c "cd {package}/python && ${{ matrix.drop_pretokenizer_test }} python -m unittest discover -s tests -v"
bash -c "cd {package}/python && ${{ matrix.python == 'cp314t' && 'rm tests/test_pretokenizers.py &&' || '' }} python -m unittest discover -s tests -v"

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-theine-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python: ['cp312', 'cp313', 'cp314', 'cp314t']
platform: ['manylinux', 'musllinux']
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

env:
THEINE_CORE_VERSION: ${{ matrix.version }}
Expand Down
50 changes: 35 additions & 15 deletions .github/workflows/build-wolfxl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,42 @@ jobs:
package: wolfxl
version: ${{ inputs.version }}

build_wheels:
# docs/packages/wolfxl.yaml also declares musllinux targets, but the test
# dependencies this job installs (Pillow, at least) have no
# musllinux_riscv64 wheel on pypi.riseproject.dev (confirmed against the
# Simple API, not assumed) and the test suite below isn't set up to run
# inside a musllinux container. Drop those rows here rather than build a
# wheel this job cannot test; this also keeps `publish`'s completeness
# check (ci_scripts/update_doc.py) from expecting a musllinux wheel that
# never gets uploaded.
manylinux_matrix:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.filter.outputs.matrix }}
steps:
- name: Drop musllinux rows
id: filter
env:
MATRIX: ${{ needs.setup.outputs.matrix }}
run: |
python3 -c "
import json, os
rows = [r for r in json.loads(os.environ['MATRIX']) if r['platform'] == 'manylinux']
print('matrix=' + json.dumps(rows))
" >> "$GITHUB_OUTPUT"

build_wheels:
needs: [setup, manylinux_matrix]
if: needs.setup.outputs.versions != '[]'
name: Build wolfxl ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# No abi3 (pyo3 has no abi3-pyNN feature here), so one wheel per interpreter.
python: ['cp312', 'cp313', 'cp314', 'cp314t']
include:
# gotcha 711: the RLIMIT_AS-headroom OOM test is defeated by cp314t's own
# allocator (confirmed off riscv64, off wolfxl's code, with a pure-stdlib
# repro) -- not a build or porting bug. Deselect it for cp314t only; the
# other three legs keep the full suite.
- python: 'cp314t'
test_deselect: >-
--deselect=tests/test_streaming_oom_error.py::test_allocation_failure_raises_memory_error_not_panic
include: ${{ fromJSON(needs.manylinux_matrix.outputs.matrix) }}

env:
WOLFXL_VERSION: ${{ matrix.version }}
Expand Down Expand Up @@ -185,6 +201,10 @@ jobs:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: '16'
CARGO_PROFILE_RELEASE_OPT_LEVEL: '1'
run: |
# gotcha 711: the RLIMIT_AS-headroom OOM test is defeated by cp314t's own
# allocator (confirmed off riscv64, off wolfxl's code, with a pure-stdlib
# repro) -- not a build or porting bug. Deselect it for cp314t only; the
# other legs keep the full suite.
pytest tests -q -n auto --dist worksteal \
--ignore=tests/vendored_openpyxl \
--ignore-glob='tests/test_ooxml_*.py' \
Expand All @@ -198,7 +218,7 @@ jobs:
--ignore=tests/test_openpyxl_compat_oracle.py \
--ignore=tests/test_openpyxl_corpus_runner_summary.py \
--deselect=tests/test_calc_functions.py::TestWhitelist::test_public_formula_counts_match_whitelist \
${{ matrix.test_deselect }}
${{ matrix.python == 'cp314t' && '--deselect=tests/test_streaming_oom_error.py::test_allocation_failure_raises_memory_error_not_panic' || '' }}

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand All @@ -208,7 +228,7 @@ jobs:

publish:
name: Publish wolfxl ${{ matrix.version }}
needs: [setup, build_wheels]
needs: [setup, manylinux_matrix, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
Expand All @@ -221,5 +241,5 @@ jobs:
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
matrix: ${{ needs.setup.outputs.matrix }}
matrix: ${{ needs.manylinux_matrix.outputs.matrix }}
artifact-pattern: wolfxl-${{ matrix.version }}-*-manylinux_riscv64
Loading