Skip to content

docs: Update projects #88

docs: Update projects

docs: Update projects #88

Workflow file for this run

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on: https://github.com/tornadoweb/tornado/blob/v6.5.8/.github/workflows/build.yml
name: Build tornado wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/tornado.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-tornado.yml'
- 'docs/packages/tornado.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-tornado.yml'
- 'docs/packages/tornado.yaml'
env:
UV_EXTRA_INDEX_URL: https://pypi.riseproject.dev/simple/
UV_INDEX_STRATEGY: unsafe-best-match
UV_ONLY_BINARY: ':all:'
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: tornado
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# remove other os, and keep only riscv64
# os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-15]
os: [ubuntu-24.04-riscv]
env:
TORNADO_VERSION: ${{ matrix.version }}
steps:
# we need to checkout upstream source
- name: Checkout tornado ${{ env.TORNADO_VERSION }}
uses: actions/checkout@v7
with:
repository: tornadoweb/tornado
ref: v${{ env.TORNADO_VERSION }}
persist-credentials: false
# we use uv instead of setup-python see https://pypi.riseproject.dev/python-wheels/development.html#uv
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
name: Install Python
with:
python-version: '3.12'
activate-environment: true
enable-cache: false
- name: Build wheels
# We need a more recent version of cibuildwheel to support riscv
# uses: pypa/cibuildwheel@v3.4.0
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
env:
# we try to reduce the number of builds so only build for 3.12+
# see our documentation https://pypi.riseproject.dev/python-wheels/development.html#target-python-versions
CIBW_BUILD: "cp312* cp313* cp314* cp314t*"
# increase timeout for riscv64 runners that are slower than usual build server
CIBW_ENVIRONMENT: 'ASYNC_TEST_TIMEOUT=30'
# 3.14t test succeeded but log an error on stderr which is interpreted as an error making the build fail.
# use --fail-if-logs=false to the test command, as upstream does on Windows
# https://github.com/tornadoweb/tornado/blob/0096f2897c98facdcd9716009ee934a7381af5ef/pyproject.toml#L26
CIBW_TEST_COMMAND: "python -m tornado.test --fail-if-logs=false"
- name: Audit ABI3 compliance
# This may be moved into cibuildwheel itself in the future. See
# https://github.com/pypa/cibuildwheel/issues/1342
run: "uv pip install abi3audit && abi3audit --verbose --summary ./wheelhouse/*.whl"
- uses: actions/upload-artifact@v7
with:
name: artifacts-${{ matrix.os }}
path: ./wheelhouse/*.whl
publish:
name: Publish tornado ${{ 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: artifacts-*