Skip to content

pytera: Add version 0.1.2 #1

pytera: Add version 0.1.2

pytera: Add version 0.1.2 #1

Workflow file for this run

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on: https://github.com/PyO3Lab/pytera/blob/v0.1.2/.github/workflows/ci.yml
name: Build pytera wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/pytera.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-pytera.yml'
- 'docs/packages/pytera.yaml'
- 'patches/pytera/**'
push:
branches: [main]
paths:
- '.github/workflows/build-pytera.yml'
- 'docs/packages/pytera.yaml'
- 'patches/pytera/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: pytera
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build pytera ${{ matrix.version }} cp38-abi3-${{ matrix.libc }}_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
libc: ["manylinux", "musllinux"]
env:
PYTERA_VERSION: ${{ matrix.version }}
steps:
- name: Checkout pytera v${{ env.PYTERA_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: PyO3Lab/pytera
ref: v${{ env.PYTERA_VERSION }}
persist-credentials: false
- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false
- name: Patch pytera source
run: git apply python-wheels/patches/pytera/${{ env.PYTERA_VERSION }}/*.patch
- name: Build wheel
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: riscv64gc-unknown-linux-gnu
args: --release --out dist
manylinux: ${{ matrix.libc == 'musllinux' && 'musllinux_1_2' || '2_39' }}
- name: Install Python
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: '3.12'
activate-environment: true
enable-cache: false
- name: Test wheel
run: |
set -euo pipefail
uv pip install pytest dist/*.whl
python -c "import pytera._core as m; assert m.__file__.endswith('.so'), m.__file__"
pytest tests
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pytera-${{ env.PYTERA_VERSION }}-cp38-abi3-${{ matrix.libc }}_riscv64
path: dist/*.whl
if-no-files-found: error
publish:
name: Publish pytera ${{ 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
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
artifact-pattern: pytera-${{ matrix.version }}-*riscv64