Skip to content

awscrt: Add version 0.37.0 #36

awscrt: Add version 0.37.0

awscrt: Add version 0.37.0 #36

Workflow file for this run

# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on: https://github.com/awslabs/aws-crt-python/blob/v0.36.2/continuous-delivery/build-wheels-manylinux2014-aarch64.sh
name: Build awscrt wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/awscrt.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-awscrt.yml'
- 'docs/packages/awscrt.yaml'
- 'patches/awscrt/**'
push:
branches: [main]
paths:
- '.github/workflows/build-awscrt.yml'
- 'docs/packages/awscrt.yaml'
- 'patches/awscrt/**'
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: awscrt
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build awscrt ${{ matrix.version }} ${{ matrix.wheel_tag }}-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 740
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# setup.py picks the tag from the interpreter it runs on, so the matrix is
# over build interpreters and wheel_tag is what comes out. Upstream's release
# script builds the same set (plus cp39/cp310, which predate our floor).
# Each abi3 wheel is built on the oldest interpreter its tag claims and only
# re-tested on the next one, so cp311 is here despite our cp312 floor: awscrt
# defines PY_SSIZE_T_CLEAN and parses "s#"/"z#" throughout.
# wheel_tag is a real matrix dimension (not include-only) so it fans out
# against every pending version instead of collapsing to one combination
# per include entry (CLAUDE.md gotcha 402).
wheel_tag: [cp311-abi3, cp313-abi3, cp314-cp314t]
include:
- wheel_tag: cp311-abi3
builds: cp311-manylinux_riscv64 cp312-manylinux_riscv64
- wheel_tag: cp313-abi3
builds: cp313-manylinux_riscv64 cp314-manylinux_riscv64
- wheel_tag: cp314-cp314t
builds: cp314t-manylinux_riscv64
env:
AWSCRT_VERSION: ${{ matrix.version }}
steps:
- name: Checkout awscrt v${{ env.AWSCRT_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: awslabs/aws-crt-python
ref: v${{ env.AWSCRT_VERSION }}
submodules: recursive
persist-credentials: false
# First step of upstream's release script: awscrt/__init__.py carries a
# 1.0.0.dev0 placeholder in git, and every wheel is named from it.
- name: Stamp awscrt.__version__ from the tag
run: |
python3 continuous-delivery/update-version.py
grep -q "__version__ = '${AWSCRT_VERSION}'" awscrt/__init__.py
- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false
# Only some versions need patching, so a missing directory is not an error.
- name: Apply patches
run: |
patches="$PWD/python-wheels/patches/awscrt/${AWSCRT_VERSION}"
if [ -d "$patches" ]; then
git apply -v "$patches"/*.patch
fi
- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
env:
CIBW_ARCHS: riscv64
CIBW_BUILD: ${{ matrix.builds }}
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
# cibuildwheel's default abi3audit run rejects any abi3 wheel exporting a
# Py-prefixed symbol it doesn't know; awscrt's source/module.h declares 17
# such helpers, so upstream's own released wheels fail it too.
CIBW_AUDIT_COMMAND: ''
# Upstream's builder runs the whole suite; these are the two test deps from
# its `dev` extra (the rest of that extra is docs and packaging tooling).
CIBW_TEST_REQUIRES: websockets>=13.1 h2==4.1.0
# The h2 mock-server tests load test/../crt/aws-c-http/tests/{mock_server,resources},
# which test-sources keeps at the same relative path. Staging test/ alone also
# keeps the checkout's awscrt/ package from shadowing the wheel.
CIBW_TEST_SOURCES: test crt/aws-c-http/tests/mock_server crt/aws-c-http/tests/resources
CIBW_TEST_ENVIRONMENT: AWS_TEST_LOCALHOST=1
CIBW_TEST_COMMAND: python -m unittest discover --verbose
- name: Check wheel contains the compiled extension
run: |
set -eu
for whl in wheelhouse/*.whl; do
echo "$whl"
unzip -l "$whl" | grep '\.so$'
done
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: awscrt-${{ env.AWSCRT_VERSION }}-${{ matrix.wheel_tag }}-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error
publish:
name: Publish awscrt ${{ 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: awscrt-${{ matrix.version }}-*-manylinux_riscv64