Skip to content

aardwolf: Add version 0.2.16 (#4294) #3

aardwolf: Add version 0.2.16 (#4294)

aardwolf: Add version 0.2.16 (#4294) #3

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on upstream's own build-wheels.yml (cibuildwheel over a
# setuptools-rust build), narrowed to riscv64.
name: Build aardwolf wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/aardwolf.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-aardwolf.yml'
- 'docs/packages/aardwolf.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-aardwolf.yml'
- 'docs/packages/aardwolf.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: aardwolf
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
name: Build aardwolf ${{ matrix.version }} cp311-abi3-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
env:
AARDWOLF_VERSION: ${{ matrix.version }}
steps:
- name: Checkout aardwolf ${{ env.AARDWOLF_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: skelsec/aardwolf
ref: ${{ env.AARDWOLF_VERSION }}
persist-credentials: false
- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
env:
# Both ext-modules (_rle, _bulk) carry pyo3's abi3-py311 feature
# unconditionally, matching upstream's own cp311-only CIBW_BUILD;
# musllinux is dropped as rustup.rs ships no riscv64 musl toolchain.
CIBW_BUILD: cp311-manylinux_riscv64
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_CONFIG_SETTINGS: --build-option=--py-limited-api=cp311
# pyproject.toml declares no [tool.cibuildwheel] rust toolchain; the
# Rust toolchain setuptools-rust needs is installed in-container.
# aardwolf itself needs neither jpeg nor openssl, but installing the
# repaired wheel into the test venv pulls in Pillow and cryptography
# as runtime deps, and both lack a riscv64 wheel on public PyPI, so
# pip builds them from source here: Pillow's setup.py fails outright
# with `RequiredDependencyException: jpeg` (gotcha 422) and
# cryptography's openssl-sys build script can't find openssl via
# pkg-config. libjpeg-turbo-devel/openssl-devel are this image's
# names for those headers (mirrors build-pytango.yml/build-uamqp.yml).
CIBW_BEFORE_ALL_LINUX: >-
dnf -y install libjpeg-turbo-devel openssl-devel &&
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin"
CIBW_TEST_REQUIRES: pytest pytest-asyncio pytest-randomly pytest-timeout hypothesis PyYAML
# tests/unit/compression imports the pure-Python reference codecs from
# the repo-root `reference` package, and a packaging test reads
# pyproject.toml from the repo root; both are staged alongside `tests`.
CIBW_TEST_SOURCES: tests reference pyproject.toml
CIBW_TEST_COMMAND: >-
python -c "import aardwolf._rle, aardwolf._bulk; assert aardwolf._rle.__file__.endswith('.abi3.so'), aardwolf._rle.__file__; assert aardwolf._bulk.__file__.endswith('.abi3.so'), aardwolf._bulk.__file__" &&
python -m pytest -q tests/unit tests/fake_peer tests/component
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: aardwolf-${{ env.AARDWOLF_VERSION }}-cp311-abi3-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish aardwolf ${{ 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: aardwolf-${{ matrix.version }}-*-manylinux_riscv64