docs: Update projects #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 The RISE Project | |
| # SPDX-License-Identifier: MIT | |
| --- | |
| # This workflow is based on: https://github.com/AntonKueltz/fastecdsa/blob/v4.0.0/.github/workflows/publish-to-prod.yaml | |
| name: Build fastecdsa wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/fastecdsa.yaml not released yet' | |
| required: false | |
| default: '' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-fastecdsa.yml' | |
| - 'docs/packages/fastecdsa.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-fastecdsa.yml' | |
| - 'docs/packages/fastecdsa.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: fastecdsa | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| name: Build fastecdsa ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 | |
| runs-on: ubuntu-24.04-riscv | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| # No cp314t: the pyo3 extension uses single-phase init, so importing it | |
| # re-enables the GIL, and upstream ships no free-threaded wheel. | |
| python: ["cp312", "cp313", "cp314"] | |
| env: | |
| FASTECDSA_VERSION: ${{ matrix.version }} | |
| steps: | |
| - name: Checkout fastecdsa v${{ env.FASTECDSA_VERSION }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: AntonKueltz/fastecdsa | |
| ref: v${{ env.FASTECDSA_VERSION }} | |
| persist-credentials: false | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 | |
| with: | |
| output-dir: wheelhouse/ | |
| only: ${{ matrix.python }}-manylinux_riscv64 | |
| env: | |
| CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} | |
| # v4.0.0 rewrote the extension in Rust (maturin, pyo3); it ships no | |
| # [tool.cibuildwheel], so the Rust toolchain its build backend needs is | |
| # installed in-container here and put on PATH for the build (same | |
| # pattern as build-fastuuid.yml). No more GMP: the new fastecdsa-rs-core | |
| # crate is pure Rust (crypto-bigint/num-bigint), so there is nothing left | |
| # to auditwheel-vendor and no extra CFLAGS/LDFLAGS to set. | |
| 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"' | |
| # pyproject.toml is deliberately left unstaged: its addopts demand pytest-cov | |
| # and its pythonpath would import the checkout instead of the wheel. | |
| CIBW_TEST_SOURCES: tests | |
| # tests/wycheproof/*.py and the point-at-infinity/ed25519/ed448 tests | |
| # import parameterized directly; upstream's own pyproject.toml test | |
| # extra lists it but CIBW_TEST_REQUIRES doesn't inherit extras. | |
| CIBW_TEST_REQUIRES: pytest parameterized | |
| CIBW_TEST_COMMAND: python -m pytest tests | |
| - name: Check the extension and licence made it into the wheel | |
| run: | | |
| python3 - wheelhouse/*.whl <<'EOF' | |
| import sys, zipfile | |
| names = zipfile.ZipFile(sys.argv[1]).namelist() | |
| sos = {n.split("/")[-1].split(".", 1)[0] for n in names if n.endswith(".so")} | |
| assert {"rust"} <= sos, sos | |
| lic = {n.split("/")[-1] for n in names if ".dist-info/licenses/" in n and not n.endswith("/")} | |
| assert lic == {"LICENSE"}, lic | |
| print(sorted(sos), sorted(lic)) | |
| EOF | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: fastecdsa-${{ env.FASTECDSA_VERSION }}-${{ matrix.python }}-manylinux_riscv64 | |
| path: wheelhouse/*.whl | |
| if-no-files-found: error | |
| publish: | |
| name: Publish fastecdsa ${{ 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: fastecdsa-${{ matrix.version }}-*-manylinux_riscv64 |