Skip to content

docs: Update projects #40

docs: Update projects

docs: Update projects #40

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `quick-tests` job of
# https://github.com/rohaquinlop/complexipy/blob/8.0.0/.github/workflows/CI.yml
name: Build complexipy wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/complexipy.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-complexipy.yml'
- 'docs/packages/complexipy.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-complexipy.yml'
- 'docs/packages/complexipy.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: complexipy
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build complexipy ${{ 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) }}
# complexipy is a PyO3 extension built per-interpreter (not abi3 -
# upstream ships cp3x-cp3x wheels, no abi3 feature on the pyo3
# dependency), so every Python version needs its own build.
python: ["cp312", "cp313", "cp314", "cp314t"]
env:
COMPLEXIPY_VERSION: ${{ matrix.version }}
steps:
- name: Checkout complexipy ${{ env.COMPLEXIPY_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: rohaquinlop/complexipy
ref: ${{ env.COMPLEXIPY_VERSION }}
persist-credentials: false
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
# Only manylinux: rustup.rs ships no riscv64 musl host toolchain, so
# musllinux can't build (same reason build-fastuuid.yml skips it).
only: ${{ matrix.python }}-manylinux_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# complexipy ships no [tool.cibuildwheel], so the Rust toolchain its
# maturin backend needs is installed in-container here and put on
# PATH for the build.
CIBW_BEFORE_ALL_LINUX: >-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin"'
# Tests live at the repo root; stage them (and pyproject.toml, for
# [tool.pytest.ini_options]) into the test working directory so
# `import complexipy` resolves to the installed wheel, not the
# repo's own complexipy/ source directory (which is left unstaged).
CIBW_TEST_SOURCES: tests pyproject.toml
CIBW_TEST_REQUIRES: pytest
# Mirrors upstream's quick-tests job: pytest suite, then the CLI
# console script exercised with the same exclude/ignore flags
# upstream's own CI runs against tests/src.
CIBW_TEST_COMMAND: >-
python -c "import complexipy._complexipy as m; assert m.__file__.endswith('.so'), m.__file__" &&
python -m pytest -v tests &&
complexipy tests/src --exclude "exclude_dir/**" --ignore-complexity &&
complexipy tests/src --exclude "**/test_exclude*.py" --ignore-complexity
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: complexipy-${{ env.COMPLEXIPY_VERSION }}-${{ matrix.python }}-manylinux_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish complexipy ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: complexipy-${{ matrix.version }}-*-manylinux_riscv64