From b0c3d1403c4f89131e4a2219add9bbacc549d743 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 20 Nov 2026 18:22:46 +0100 Subject: [PATCH] workflows: migrate canonical cibuildwheel builds --- .github/workflows/_build-cibuildwheel.yml | 23 +- .github/workflows/build-ahocorasick-rs.yml | 56 ++--- .github/workflows/build-alienplatform.yml | 86 +++---- .github/workflows/build-aliyun-log-fastpb.yml | 56 ++--- .github/workflows/build-anchorpy-core.yml | 70 +++--- .github/workflows/build-apsw.yml | 38 +-- .github/workflows/build-argus-redact.yml | 148 ++++++------ .github/workflows/build-based58.yml | 78 +++---- .github/workflows/build-cachebox.yml | 59 ++--- .github/workflows/build-camb.yml | 50 ++-- .github/workflows/build-chemfiles.yml | 57 ++--- .github/workflows/build-chonkie-core.yml | 87 +++---- .github/workflows/build-cityseer.yml | 68 ++---- .github/workflows/build-clarabel.yml | 101 ++++---- .github/workflows/build-cohere-melody.yml | 66 ++---- .github/workflows/build-complexipy.yml | 78 +++---- .github/workflows/build-componentize-py.yml | 77 +++---- .github/workflows/build-comrak.yml | 61 ++--- .github/workflows/build-cosmos-xenna.yml | 218 ++++++++---------- .github/workflows/build-cql2.yml | 86 +++---- .github/workflows/build-css-inline.yml | 93 +++----- .github/workflows/build-cwcwidth.yml | 100 +++----- .github/workflows/build-datefinder.yml | 68 ++---- .github/workflows/build-deepfilterlib.yml | 84 +++---- .github/workflows/build-demoparser2.yml | 124 ++++------ .github/workflows/build-docvortex.yml | 178 +++++++------- .github/workflows/build-dust-riven.yml | 52 ++--- .github/workflows/build-eclipse-zenoh.yml | 96 +++----- .github/workflows/build-editdistpy.yml | 52 ++--- .../workflows/build-fast-query-parsers.yml | 70 +++--- .github/workflows/build-fast-walk.yml | 64 ++--- .github/workflows/build-fastbloom-rs.yml | 82 +++---- .github/workflows/build-fastdigest.yml | 64 ++--- .github/workflows/build-faster-eth-utils.yml | 56 ++--- .github/workflows/build-fastexcel.yml | 85 +++---- .github/workflows/build-fastnanoid.yml | 56 ++--- .github/workflows/build-flashtext2.yml | 68 +++--- .github/workflows/build-fonttools.yml | 56 ++--- .github/workflows/build-gigatoken.yml | 107 ++++----- .github/workflows/build-gnureadline.yml | 42 +--- .github/workflows/build-google-crc32c.yml | 83 +++---- .github/workflows/build-grimp.yml | 79 +++---- .github/workflows/build-headroom-ai.yml | 64 ++--- .github/workflows/build-hogql-parser-rs.yml | 69 ++---- .github/workflows/build-html-to-markdown.yml | 106 ++++----- .github/workflows/build-iceoryx2.yml | 89 +++---- .github/workflows/build-ignore-python.yml | 58 ++--- .github/workflows/build-indexed-gzip.yml | 110 +++------ .github/workflows/build-json-tools-rs.yml | 69 ++---- .../build-jsonpath-rust-bindings.yml | 56 ++--- .github/workflows/build-libipld.yml | 50 ++-- .../build-lingua-language-detector.yml | 76 +++--- .github/workflows/build-loro.yml | 55 ++--- .github/workflows/build-mapfile-parser.yml | 144 +++++------- .github/workflows/build-markdown-it-pyrs.yml | 58 ++--- .github/workflows/build-mft.yml | 67 ++---- .github/workflows/build-minijinja.yml | 69 +++--- .github/workflows/build-ml-dtypes.yml | 53 ++--- .github/workflows/build-moviepilot-rust.yml | 47 ++-- .github/workflows/build-murmurhash2.yml | 66 ++---- .github/workflows/build-netifaces2.yml | 64 ++--- .github/workflows/build-ngrok.yml | 78 +++---- .github/workflows/build-opendal.yml | 90 +++----- .github/workflows/build-openjd-model.yml | 77 +++---- .github/workflows/build-openslide-python.yml | 36 +-- .github/workflows/build-oss-harmony.yml | 67 ++---- .github/workflows/build-packmol.yml | 46 ++-- .github/workflows/build-patiencediff.yml | 59 ++--- .github/workflows/build-phonors.yml | 67 ++---- .github/workflows/build-piper-phonemize.yml | 154 ++++++------- .github/workflows/build-polars-cloud.yml | 78 +++---- .github/workflows/build-pqcrypto.yml | 53 ++--- .../workflows/build-private-attribute-cpp.yml | 43 +--- .github/workflows/build-pulp.yml | 75 +++--- .../workflows/build-py-ballisticcalc-exts.yml | 61 ++--- .github/workflows/build-py-horned-owl.yml | 66 ++---- .github/workflows/build-py-rust-stemmers.yml | 63 ++--- .github/workflows/build-py-svg-hush.yml | 60 ++--- .github/workflows/build-pycrc32.yml | 66 ++---- .github/workflows/build-pycrdt.yml | 59 ++--- .github/workflows/build-pycryptodomex.yml | 80 ++----- .github/workflows/build-pyfixest.yml | 104 ++++----- .github/workflows/build-pyiceberg-core.yml | 108 ++++----- .github/workflows/build-pyjnius.yml | 38 +-- .github/workflows/build-pykvfinder.yml | 39 +--- .github/workflows/build-pymicro-vad.yml | 45 ++-- .github/workflows/build-pyoxipng.yml | 64 ++--- .github/workflows/build-pyrage.yml | 62 ++--- .github/workflows/build-pysentry-rs.yml | 52 ++--- .github/workflows/build-pysequoia.yml | 57 ++--- .github/workflows/build-python-calamine.yml | 63 ++--- .github/workflows/build-python-ripgrep.yml | 88 +++---- .github/workflows/build-rbloom.yml | 60 ++--- .github/workflows/build-regress.yml | 53 ++--- .github/workflows/build-renkin.yml | 88 +++---- .github/workflows/build-rensa.yml | 66 ++---- .github/workflows/build-resvg-py.yml | 72 +++--- .github/workflows/build-rigour.yml | 108 ++++----- .github/workflows/build-river.yml | 118 ++++------ .github/workflows/build-ruff-format.yml | 85 +++---- .github/workflows/build-rustpy-xlsxwriter.yml | 73 +++--- .github/workflows/build-scikit-learn.yml | 55 ++--- .github/workflows/build-scikit-misc.yml | 43 +--- .github/workflows/build-sentry-cli.yml | 47 ++-- .github/workflows/build-shazamio-core.yml | 65 ++---- .github/workflows/build-silx.yml | 78 +++---- .github/workflows/build-sparse-dot-topn.yml | 45 +--- .github/workflows/build-sqlglotc.yml | 142 +++++------- .github/workflows/build-starlark-pyo3.yml | 60 ++--- .github/workflows/build-stripy.yml | 48 ++-- .github/workflows/build-symengine.yml | 122 ++++------ .github/workflows/build-tach.yml | 86 +++---- .github/workflows/build-tantivy.yml | 68 +++--- .github/workflows/build-tcod.yml | 152 +++++------- .../workflows/build-test-results-parser.yml | 56 ++--- .github/workflows/build-tibs.yml | 57 ++--- .github/workflows/build-tiktoken.yml | 31 +-- .github/workflows/build-tinyobjloader.yml | 55 ++--- .github/workflows/build-torchft.yml | 131 +++++------ .github/workflows/build-typeid-python.yml | 62 ++--- .github/workflows/build-typst.yml | 67 +++--- .github/workflows/build-tzfpy.yml | 65 ++---- .github/workflows/build-ua-parser-rs.yml | 95 ++++---- .../build-unicode-segmentation-rs.yml | 72 +++--- .github/workflows/build-usearch.yml | 81 +++---- .github/workflows/build-uuid-utils.yml | 53 ++--- .github/workflows/build-vaex-core.yml | 110 ++++----- .github/workflows/build-vodozemac.yml | 58 ++--- .github/workflows/build-vtracer.yml | 72 +++--- .github/workflows/build-whenever.yml | 54 ++--- .github/workflows/build-wren-core-py.yml | 69 ++---- .github/workflows/build-wreq.yml | 117 ++++------ .github/workflows/build-xgrammar.yml | 153 ++++++------ 133 files changed, 3725 insertions(+), 6257 deletions(-) diff --git a/.github/workflows/_build-cibuildwheel.yml b/.github/workflows/_build-cibuildwheel.yml index 9a50f52b2b95..bcf57d1e921d 100644 --- a/.github/workflows/_build-cibuildwheel.yml +++ b/.github/workflows/_build-cibuildwheel.yml @@ -41,6 +41,16 @@ on: required: false default: 1 type: number + checkout-fetch-tags: + description: Whether actions/checkout fetches tags. + required: false + default: false + type: boolean + checkout-sparse-checkout: + description: Newline-separated sparse-checkout patterns. + required: false + default: '' + type: string patches: description: Apply patches///*.patch before building. required: false @@ -260,6 +270,8 @@ jobs: path: ${{ inputs.package }} submodules: ${{ inputs['checkout-submodules'] }} fetch-depth: ${{ inputs['checkout-fetch-depth'] }} + fetch-tags: ${{ inputs['checkout-fetch-tags'] }} + sparse-checkout: ${{ inputs['checkout-sparse-checkout'] }} persist-credentials: false - name: Checkout patches @@ -388,15 +400,20 @@ jobs: if name == "CIBW_TEST_SOURCES" and value: sources = [] for source in shlex.split(value): - if source.startswith("{project}"): + if source.startswith((f"{{project}}/{package}", f"/project/{package}")): + pass + elif source.startswith("{project}"): source = source.replace("{project}", f"{{project}}/{package}", 1) + elif source == "/project" or source.startswith("/project/"): + source = source.replace("/project", f"/project/{package}", 1) elif not os.path.isabs(source): source = os.path.join(package, source) sources.append(source) value = " ".join(sources) elif value: - value = value.replace("{project}", f"{{project}}/{package}") - value = re.sub(r"/project(?=/|[\s:'\"]|$)", f"/project/{package}", value) + suffix = rf"/{re.escape(package)}(?=/|[\s:'\"]|$)" + value = re.sub(rf"\{{project\}}(?!{suffix})", f"{{project}}/{package}", value) + value = re.sub(rf"/project(?!{suffix})(?=/|[\s:'\"]|$)", f"/project/{package}", value) if not value: continue delimiter = f"cibw_{uuid.uuid4().hex}" diff --git a/.github/workflows/build-ahocorasick-rs.yml b/.github/workflows/build-ahocorasick-rs.yml index ae6bc72db2b6..590a1aae011a 100644 --- a/.github/workflows/build-ahocorasick-rs.yml +++ b/.github/workflows/build-ahocorasick-rs.yml @@ -48,48 +48,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build ahocorasick-rs ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - AHOCORASICK_RS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout ahocorasick-rs ${{ env.AHOCORASICK_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: G-Research/ahocorasick_rs - ref: ${{ env.AHOCORASICK_RS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # ahocorasick_rs ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest hypothesis - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import ahocorasick_rs; assert ahocorasick_rs.ahocorasick_rs.__file__.endswith('.so'), ahocorasick_rs.ahocorasick_rs.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ahocorasick-rs-${{ env.AHOCORASICK_RS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "ahocorasick-rs" + version: "${{ matrix.version }}" + repository: "G-Research/ahocorasick_rs" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # ahocorasick_rs ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest hypothesis" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import ahocorasick_rs; assert ahocorasick_rs.ahocorasick_rs.__file__.endswith('.so'), ahocorasick_rs.ahocorasick_rs.__file__" && + python -m pytest -v tests publish: name: Publish ahocorasick-rs ${{ matrix.version }} diff --git a/.github/workflows/build-alienplatform.yml b/.github/workflows/build-alienplatform.yml index 9353765529ad..d659d58b8ec0 100644 --- a/.github/workflows/build-alienplatform.yml +++ b/.github/workflows/build-alienplatform.yml @@ -59,63 +59,43 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build alienplatform ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - # riscv64 builds run several times slower than x86_64; raised from 120 after jobs were killed mid-build by the timeout, not a dead runner. - timeout-minutes: 360 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - ALIENPLATFORM_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout alienplatform ${{ env.ALIENPLATFORM_REF }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: alienplatform/alien - ref: ${{ env.ALIENPLATFORM_REF }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: crates/alien-bindings-python - output-dir: wheelhouse/ - only: ${{ matrix.python }}-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # alien-bindings-python ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - # package-dir is the crate subdirectory, but Cargo still resolves - # the enclosing workspace root (Cargo.lock) by walking up from - # there, so no extra workspace checkout step is needed. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_TOOLCHAIN }} - CIBW_ENVIRONMENT: >- - PATH="$PATH:$HOME/.cargo/bin" - RUSTUP_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Base `import alienplatform` only loads the compiled extension: - # grpcio/protobuf are the optional [worker] extra, imported lazily - # inside worker_runtime.py's functions, never at module load. - # storage()/kv()/etc. build a lazy handle synchronously with no - # network or credential access, so this is a safe smoke test - - # matching upstream's own wheels job, which runs no test command at - # all against this feature set (its pytest suite only covers a - # separate --features local build, see python-bindings.yml's `test` - # job). - CIBW_TEST_COMMAND: >- - python -c "import alienplatform; - s = alienplatform.storage('files'); - print('alienplatform OK:', type(s).__name__)" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: alienplatform-${{ env.ALIENPLATFORM_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # riscv64 builds run several times slower than x86_64; raised from 120 after jobs were killed mid-build by the timeout, not a dead runner. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "alienplatform" + version: "${{ matrix.version }}" + repository: "alienplatform/alien" + ref: "b33b2c81540e1faeee91ef682f3e022039420bac" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + timeout-minutes: 360 + cibw-package-dir: "crates/alien-bindings-python" + cibw-build: "${{ matrix.python }}-manylinux_riscv64" + # alien-bindings-python ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + # package-dir is the crate subdirectory, but Cargo still resolves + # the enclosing workspace root (Cargo.lock) by walking up from + # there, so no extra workspace checkout step is needed. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_TOOLCHAIN }} + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" RUSTUP_TOOLCHAIN=nightly-2026-10-03" + # Base `import alienplatform` only loads the compiled extension: + # grpcio/protobuf are the optional [worker] extra, imported lazily + # inside worker_runtime.py's functions, never at module load. + # storage()/kv()/etc. build a lazy handle synchronously with no + # network or credential access, so this is a safe smoke test - + # matching upstream's own wheels job, which runs no test command at + # all against this feature set (its pytest suite only covers a + # separate --features local build, see python-bindings.yml's `test` + # job). + cibw-test-command: > + python -c "import alienplatform; + s = alienplatform.storage('files'); + print('alienplatform OK:', type(s).__name__)" publish: name: Publish alienplatform ${{ matrix.version }} diff --git a/.github/workflows/build-aliyun-log-fastpb.yml b/.github/workflows/build-aliyun-log-fastpb.yml index d276a3362d01..8ced6682d020 100644 --- a/.github/workflows/build-aliyun-log-fastpb.yml +++ b/.github/workflows/build-aliyun-log-fastpb.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build aliyun-log-fastpb ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -75,41 +73,25 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - ALIYUN_LOG_FASTPB_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout aliyun-log-fastpb v${{ env.ALIYUN_LOG_FASTPB_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: aliyun/aliyun-log-python-fastpb - ref: v${{ env.ALIYUN_LOG_FASTPB_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # aliyun-log-fastpb ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest protobuf - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import aliyun_log_fastpb.aliyun_log_fastpb as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: aliyun-log-fastpb-${{ env.ALIYUN_LOG_FASTPB_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "aliyun-log-fastpb" + version: "${{ matrix.version }}" + repository: "aliyun/aliyun-log-python-fastpb" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # aliyun-log-fastpb ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest protobuf" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import aliyun_log_fastpb.aliyun_log_fastpb as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish aliyun-log-fastpb ${{ matrix.version }} diff --git a/.github/workflows/build-anchorpy-core.yml b/.github/workflows/build-anchorpy-core.yml index 3b116360ac7a..b6cea98b7c9c 100644 --- a/.github/workflows/build-anchorpy-core.yml +++ b/.github/workflows/build-anchorpy-core.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build anchorpy-core ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -66,48 +64,32 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - ANCHORPY_CORE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout anchorpy-core ${{ env.ANCHORPY_CORE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: kevinheavey/anchorpy-core - ref: ${{ env.ANCHORPY_CORE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # anchorpy-core ships no [tool.cibuildwheel]; install the Rust - # toolchain its maturin backend needs. - 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 pins maturin<0.14 (2022), which has no riscv64 - # wheel on PyPI and fails to build from sdist (its own bootstrap - # needs setuptools, which Python 3.12+ no longer seeds into a - # fresh build-isolation venv). A current maturin builds this tree - # unmodified, so install one and skip isolation to bypass the pin. - CIBW_BEFORE_BUILD: pip install maturin - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import anchorpy_core.anchorpy_core as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: anchorpy-core-${{ env.ANCHORPY_CORE_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "anchorpy-core" + version: "${{ matrix.version }}" + repository: "kevinheavey/anchorpy-core" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # anchorpy-core ships no [tool.cibuildwheel]; install the Rust + # toolchain its maturin backend needs. + 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 pins maturin<0.14 (2022), which has no riscv64 + # wheel on PyPI and fails to build from sdist (its own bootstrap + # needs setuptools, which Python 3.12+ no longer seeds into a + # fresh build-isolation venv). A current maturin builds this tree + # unmodified, so install one and skip isolation to bypass the pin. + cibw-before-build: "pip install maturin" + cibw-build-frontend: "pip; args: --no-build-isolation" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import anchorpy_core.anchorpy_core as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish anchorpy-core ${{ matrix.version }} diff --git a/.github/workflows/build-apsw.yml b/.github/workflows/build-apsw.yml index c5ba85f90c06..a72a36973a0f 100644 --- a/.github/workflows/build-apsw.yml +++ b/.github/workflows/build-apsw.yml @@ -49,38 +49,22 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build apsw ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - APSW_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout apsw ${{ env.APSW_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rogerbinns/apsw - ref: ${{ env.APSW_VERSION }} - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_BUILD: python -c "import shutil ; shutil.copyfile('tools/setup-pypi.cfg','setup.apsw')" - CIBW_TEST_COMMAND: python -m apsw.tests -v - APSW_HEAVY_DURATION: 2 - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: apsw-${{ env.APSW_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "apsw" + version: "${{ matrix.version }}" + repository: "rogerbinns/apsw" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-environment-linux: "APSW_HEAVY_DURATION=2" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-before-build: "python -c \"import shutil ; shutil.copyfile('tools/setup-pypi.cfg','setup.apsw')\"" + cibw-test-command: "python -m apsw.tests -v" publish: name: Publish apsw ${{ matrix.version }} diff --git a/.github/workflows/build-argus-redact.yml b/.github/workflows/build-argus-redact.yml index 189a9c3c5e13..68f47fcf9bf6 100644 --- a/.github/workflows/build-argus-redact.yml +++ b/.github/workflows/build-argus-redact.yml @@ -46,94 +46,76 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build argus-redact ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - ARGUS_REDACT_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout argus-redact ${{ env.ARGUS_REDACT_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: wan9yu/argus-redact - ref: v${{ env.ARGUS_REDACT_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # argus-redact's pyproject.toml ships no [tool.cibuildwheel], so the - # Rust toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest pytest-asyncio hypothesis - # tests/test_readme_examples.py (and its _meta sibling) exec the - # code blocks in README.md/README.zh.md/docs/*.md to - # keep the docs honest; they resolve those paths relative to the - # test file via Path(__file__).parents[1], which is test_cwd once - # cibuildwheel stages CIBW_TEST_SOURCES there. Without the README - # and docs files alongside tests/, collection dies with - # FileNotFoundError on every interpreter (gotcha 129's maxminddb - # pattern, not riscv64- or free-threading-specific). - CIBW_TEST_SOURCES: tests README.md README.zh.md docs - # Deselected: source-lint tests that read src/, crates/, pyproject.toml or demo/ - # from the checkout (upstream runs them editable), and x86-tuned wall-clock ceilings. - CIBW_TEST_COMMAND: >- - python -c "from argus_redact import redact; redacted, key = redact('张三的电话是13812345678', names=['张三'], lang='zh', salt=42); assert '张三' not in redacted; assert '13812345678' not in redacted" && - python -m pytest -v -m "not ner and not semantic and not slow" - --deselect tests/architecture/test_carry_window_parity.py::test_carry_window_python_rust_parity - --deselect tests/architecture/test_confusables_parity.py::test_ron_entry_count_frozen - --deselect tests/architecture/test_confusables_parity.py::test_ron_sha256_frozen - --deselect tests/architecture/test_confusables_parity.py::test_ron_matches_live_generator - --deselect tests/architecture/test_core_loader.py::test_no_module_level_core_import_in_consumers - --deselect tests/architecture/test_declared_dependencies.py::test_every_runtime_import_is_declared_or_allowlisted - --deselect tests/architecture/test_default_max_buffer_parity.py::test_default_max_buffer_python_rust_parity - --deselect tests/architecture/test_lang_claims_parity.py::test_documented_pack_count_matches_registry - --deselect tests/architecture/test_layer_purity.py::test_pure_dir_actually_has_python_files - --deselect tests/architecture/test_layering.py::test_pure_hints_has_no_os_environ - --deselect tests/architecture/test_layers_ssot.py::test_glue_redact_uses_layer_constants_not_literals - --deselect tests/architecture/test_max_input_size_parity.py::test_max_input_size_python_rust_parity - --deselect tests/architecture/test_no_orphan_core_bindings.py::test_every_registered_core_binding_has_a_consumer - --deselect tests/architecture/test_pem_ceiling_parity.py::test_pem_opener_ceiling_extra_python_rust_parity - --deselect tests/architecture/test_post_merge_coverage_invariant.py::test_every_post_merge_pipeline_restores_lost_coverage - --deselect tests/architecture/test_post_merge_coverage_invariant.py::test_rust_faces_route_through_the_finalize_chokepoint - --deselect tests/architecture/test_post_merge_coverage_invariant.py::test_pseudonym_llm_delegates_instead_of_copying_the_pipeline - --deselect tests/architecture/test_risk_data_parity.py::test_ron_type_count_frozen - --deselect tests/architecture/test_risk_data_parity.py::test_ron_sha256_frozen - --deselect tests/architecture/test_risk_data_parity.py::test_ron_matches_live_registry - --deselect tests/architecture/test_shared_ron_registry_coverage.py::test_every_shared_ron_type_has_a_registry_row - --deselect tests/architecture/test_strategy_kind_leaf.py::test_leaf_module_exists - --deselect tests/architecture/test_strategy_kind_leaf.py::test_leaf_imports_neither_registry_nor_replacer - --deselect tests/architecture/test_strategy_kind_leaf.py::test_leaf_has_no_argus_imports - --deselect tests/architecture/test_strategy_kind_leaf.py::test_registry_has_no_lazy_strategy_reversible_import - --deselect tests/architecture/test_strategy_kind_leaf.py::test_replacer_classification_comes_from_leaf_top_level - --deselect tests/architecture/test_version_parity.py::test_pyproject_cargo_and_package_version_agree - --deselect tests/architecture/test_version_parity.py::test_py_crate_pins_the_current_core_version - --deselect tests/core/test_restore.py::TestRestoreKeyFileLoadIsGlueOnly::test_pure_restore_module_is_filesystem_free - --deselect tests/integration/test_session_isolation.py::test_langchain_no_dead_contextvar_code - --deselect tests/safety/test_hardening.py::test_server_bearer_uses_compare_digest - --deselect tests/benchmark/test_performance.py::TestRegexPerformance::test_should_redact_short_text_under_1ms - --deselect tests/benchmark/test_performance.py::TestRegexPerformance::test_should_redact_medium_text_under_5ms - --deselect tests/benchmark/test_performance.py::TestThroughput::test_should_process_1000_short_docs_under_1s - --deselect tests/core/test_reserved_range_scanner.py::TestScanPerformance::test_should_scan_1kb_under_5ms - tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: argus-redact-${{ env.ARGUS_REDACT_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "argus-redact" + version: "${{ matrix.version }}" + repository: "wan9yu/argus-redact" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # argus-redact's pyproject.toml ships no [tool.cibuildwheel], so the + # Rust toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest pytest-asyncio hypothesis" + # tests/test_readme_examples.py (and its _meta sibling) exec the + # code blocks in README.md/README.zh.md/docs/*.md to + # keep the docs honest; they resolve those paths relative to the + # test file via Path(__file__).parents[1], which is test_cwd once + # cibuildwheel stages CIBW_TEST_SOURCES there. Without the README + # and docs files alongside tests/, collection dies with + # FileNotFoundError on every interpreter (gotcha 129's maxminddb + # pattern, not riscv64- or free-threading-specific). + cibw-test-sources: "tests README.md README.zh.md docs" + # Deselected: source-lint tests that read src/, crates/, pyproject.toml or demo/ + # from the checkout (upstream runs them editable), and x86-tuned wall-clock ceilings. + cibw-test-command: > + python -c "from argus_redact import redact; redacted, key = redact('张三的电话是13812345678', names=['张三'], lang='zh', salt=42); assert '张三' not in redacted; assert '13812345678' not in redacted" && + python -m pytest -v -m "not ner and not semantic and not slow" + --deselect tests/architecture/test_carry_window_parity.py::test_carry_window_python_rust_parity + --deselect tests/architecture/test_confusables_parity.py::test_ron_entry_count_frozen + --deselect tests/architecture/test_confusables_parity.py::test_ron_sha256_frozen + --deselect tests/architecture/test_confusables_parity.py::test_ron_matches_live_generator + --deselect tests/architecture/test_core_loader.py::test_no_module_level_core_import_in_consumers + --deselect tests/architecture/test_declared_dependencies.py::test_every_runtime_import_is_declared_or_allowlisted + --deselect tests/architecture/test_default_max_buffer_parity.py::test_default_max_buffer_python_rust_parity + --deselect tests/architecture/test_lang_claims_parity.py::test_documented_pack_count_matches_registry + --deselect tests/architecture/test_layer_purity.py::test_pure_dir_actually_has_python_files + --deselect tests/architecture/test_layering.py::test_pure_hints_has_no_os_environ + --deselect tests/architecture/test_layers_ssot.py::test_glue_redact_uses_layer_constants_not_literals + --deselect tests/architecture/test_max_input_size_parity.py::test_max_input_size_python_rust_parity + --deselect tests/architecture/test_no_orphan_core_bindings.py::test_every_registered_core_binding_has_a_consumer + --deselect tests/architecture/test_pem_ceiling_parity.py::test_pem_opener_ceiling_extra_python_rust_parity + --deselect tests/architecture/test_post_merge_coverage_invariant.py::test_every_post_merge_pipeline_restores_lost_coverage + --deselect tests/architecture/test_post_merge_coverage_invariant.py::test_rust_faces_route_through_the_finalize_chokepoint + --deselect tests/architecture/test_post_merge_coverage_invariant.py::test_pseudonym_llm_delegates_instead_of_copying_the_pipeline + --deselect tests/architecture/test_risk_data_parity.py::test_ron_type_count_frozen + --deselect tests/architecture/test_risk_data_parity.py::test_ron_sha256_frozen + --deselect tests/architecture/test_risk_data_parity.py::test_ron_matches_live_registry + --deselect tests/architecture/test_shared_ron_registry_coverage.py::test_every_shared_ron_type_has_a_registry_row + --deselect tests/architecture/test_strategy_kind_leaf.py::test_leaf_module_exists + --deselect tests/architecture/test_strategy_kind_leaf.py::test_leaf_imports_neither_registry_nor_replacer + --deselect tests/architecture/test_strategy_kind_leaf.py::test_leaf_has_no_argus_imports + --deselect tests/architecture/test_strategy_kind_leaf.py::test_registry_has_no_lazy_strategy_reversible_import + --deselect tests/architecture/test_strategy_kind_leaf.py::test_replacer_classification_comes_from_leaf_top_level + --deselect tests/architecture/test_version_parity.py::test_pyproject_cargo_and_package_version_agree + --deselect tests/architecture/test_version_parity.py::test_py_crate_pins_the_current_core_version + --deselect tests/core/test_restore.py::TestRestoreKeyFileLoadIsGlueOnly::test_pure_restore_module_is_filesystem_free + --deselect tests/integration/test_session_isolation.py::test_langchain_no_dead_contextvar_code + --deselect tests/safety/test_hardening.py::test_server_bearer_uses_compare_digest + --deselect tests/benchmark/test_performance.py::TestRegexPerformance::test_should_redact_short_text_under_1ms + --deselect tests/benchmark/test_performance.py::TestRegexPerformance::test_should_redact_medium_text_under_5ms + --deselect tests/benchmark/test_performance.py::TestThroughput::test_should_process_1000_short_docs_under_1s + --deselect tests/core/test_reserved_range_scanner.py::TestScanPerformance::test_should_scan_1kb_under_5ms + tests publish: name: Publish argus-redact ${{ matrix.version }} diff --git a/.github/workflows/build-based58.yml b/.github/workflows/build-based58.yml index 5614a9c15eba..1d0105b9b00d 100644 --- a/.github/workflows/build-based58.yml +++ b/.github/workflows/build-based58.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build based58 ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -69,52 +67,36 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - BASED58_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout based58 ${{ env.BASED58_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: kevinheavey/based58 - ref: ${{ env.BASED58_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # based58 ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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 pins maturin<0.13 (2022), which has no riscv64 - # wheel on PyPI and fails to build from sdist (its own bootstrap - # needs setuptools, which Python 3.12+ no longer seeds into a - # fresh build-isolation venv). A current maturin builds this tree - # unmodified, so install one and skip isolation to bypass the pin. - CIBW_BEFORE_BUILD: pip install maturin - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - # No python-source in pyproject.toml, so maturin ships an - # auto-generated based58/__init__.py shim around the compiled - # based58/based58.abi3.so submodule -- probe that submodule before - # running upstream's own tests. - CIBW_TEST_COMMAND: >- - python -c "import based58.based58 as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: based58-${{ env.BASED58_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "based58" + version: "${{ matrix.version }}" + repository: "kevinheavey/based58" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # based58 ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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 pins maturin<0.13 (2022), which has no riscv64 + # wheel on PyPI and fails to build from sdist (its own bootstrap + # needs setuptools, which Python 3.12+ no longer seeds into a + # fresh build-isolation venv). A current maturin builds this tree + # unmodified, so install one and skip isolation to bypass the pin. + cibw-before-build: "pip install maturin" + cibw-build-frontend: "pip; args: --no-build-isolation" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + # No python-source in pyproject.toml, so maturin ships an + # auto-generated based58/__init__.py shim around the compiled + # based58/based58.abi3.so submodule -- probe that submodule before + # running upstream's own tests. + cibw-test-command: > + python -c "import based58.based58 as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish based58 ${{ matrix.version }} diff --git a/.github/workflows/build-cachebox.yml b/.github/workflows/build-cachebox.yml index cf9877d93d26..bf39e982ce93 100644 --- a/.github/workflows/build-cachebox.yml +++ b/.github/workflows/build-cachebox.yml @@ -49,50 +49,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build cachebox ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - CACHEBOX_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cachebox ${{ env.CACHEBOX_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: awolverp/cachebox - ref: v${{ env.CACHEBOX_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # cachebox ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Unpinned unlike upstream's `test` dependency-group: its - # hypothesis == 6.165.0 predates the riscv64 wheels we publish. - CIBW_TEST_REQUIRES: pytest hypothesis pytest-asyncio pytest-xdist - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -v -n auto tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cachebox-${{ env.CACHEBOX_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cachebox" + version: "${{ matrix.version }}" + repository: "awolverp/cachebox" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 180 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # cachebox ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + # Unpinned unlike upstream's `test` dependency-group: its + # hypothesis == 6.165.0 predates the riscv64 wheels we publish. + cibw-test-requires: "pytest hypothesis pytest-asyncio pytest-xdist" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -v -n auto tests" publish: name: Publish cachebox ${{ matrix.version }} diff --git a/.github/workflows/build-camb.yml b/.github/workflows/build-camb.yml index fc84b45d9d72..abcf533fe232 100644 --- a/.github/workflows/build-camb.yml +++ b/.github/workflows/build-camb.yml @@ -53,41 +53,21 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build camb ${{ matrix.version }} py3-none-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 240 - - env: - CAMB_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout camb ${{ env.CAMB_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: cmbant/camb - ref: ${{ env.CAMB_VERSION }} - submodules: recursive - persist-credentials: false - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # The wheel is py3-none (ctypes-loaded camblib.so), so one build serves every interpreter. - only: cp312-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,scipy - # Two camb_test cases read fortran/tests and inifiles relative to the test file. - CIBW_TEST_SOURCES: camb/tests fortran/tests inifiles - CIBW_TEST_COMMAND: cd camb/tests && python -m unittest camb_test mathutils_test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: camb-${{ env.CAMB_VERSION }}-py3-none-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "camb" + version: "${{ matrix.version }}" + repository: "cmbant/camb" + ref: "${{ matrix.version }}" + artifact-tag: "py3-none-manylinux_riscv64" + timeout-minutes: 240 + checkout-submodules: "recursive" + # The wheel is py3-none (ctypes-loaded camblib.so), so one build serves every interpreter. + cibw-build: "cp312-manylinux_riscv64" + cibw-environment-linux: "PIP_ONLY_BINARY=numpy,scipy" + # Two camb_test cases read fortran/tests and inifiles relative to the test file. + cibw-test-sources: "camb/tests fortran/tests inifiles" + cibw-test-command: "cd camb/tests && python -m unittest camb_test mathutils_test" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-chemfiles.yml b/.github/workflows/build-chemfiles.yml index f02be4e42258..54bf807df15d 100644 --- a/.github/workflows/build-chemfiles.yml +++ b/.github/workflows/build-chemfiles.yml @@ -52,46 +52,23 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build chemfiles ${{ matrix.version }} py2.py3-none-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 - - env: - CHEMFILES_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout chemfiles.py ${{ env.CHEMFILES_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: chemfiles/chemfiles.py - ref: ${{ env.CHEMFILES_VERSION }} - submodules: true - persist-credentials: false - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # setup.py's own bdist_wheel override forces the py2.py3-none tag, so one build serves every interpreter. - only: cp312-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Every build-system requirement (setuptools, wheel, cmake >= 4.1) has a riscv64-compatible - # wheel, so the default isolated build works. cmake 4 rejects chemfiles' - # cmake_minimum_required(VERSION 2.8.12) (gotcha 257), and setup.py's `cmake --build` has - # no -j of its own. - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CMAKE_POLICY_VERSION_MINIMUM=3.5 - CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" - CIBW_TEST_REQUIRES: numpy - CIBW_TEST_COMMAND: python -c "import chemfiles; chemfiles.Frame()" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: chemfiles-${{ env.CHEMFILES_VERSION }}-py2.py3-none-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "chemfiles" + version: "${{ matrix.version }}" + repository: "chemfiles/chemfiles.py" + ref: "${{ matrix.version }}" + artifact-tag: "py2.py3-none-manylinux_riscv64" + checkout-submodules: "true" + # setup.py's own bdist_wheel override forces the py2.py3-none tag, so one build serves every interpreter. + cibw-build: "cp312-manylinux_riscv64" + # Every build-system requirement (setuptools, wheel, cmake >= 4.1) has a riscv64-compatible + # wheel, so the default isolated build works. cmake 4 rejects chemfiles' + # cmake_minimum_required(VERSION 2.8.12) (gotcha 257), and setup.py's `cmake --build` has + # no -j of its own. + cibw-environment-linux: "PIP_ONLY_BINARY=numpy CMAKE_POLICY_VERSION_MINIMUM=3.5 CMAKE_BUILD_PARALLEL_LEVEL=\"$(nproc)\"" + cibw-test-requires: "numpy" + cibw-test-command: "python -c \"import chemfiles; chemfiles.Frame()\"" publish: name: Publish chemfiles ${{ matrix.version }} diff --git a/.github/workflows/build-chonkie-core.yml b/.github/workflows/build-chonkie-core.yml index b7ece666e331..2381cf067bd6 100644 --- a/.github/workflows/build-chonkie-core.yml +++ b/.github/workflows/build-chonkie-core.yml @@ -49,64 +49,45 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build chonkie-core ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - CHONKIE_CORE_VERSION: ${{ matrix.version }} - - steps: - # Checked out at the workspace root: packages/python is a member of the - # chunk Cargo workspace and builds against the root `chunk` crate. - - name: Checkout chunk v${{ env.CHONKIE_CORE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: chonkie-inc/chunk - ref: v${{ env.CHONKIE_CORE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: packages/python - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # chunk ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_TEST_REQUIRES: pytest numpy - # test-sources resolves against the checkout root, not package-dir. - CIBW_TEST_SOURCES: packages/python/tests - CIBW_TEST_ENVIRONMENT_LINUX: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - # Upstream's suite never calls the four numpy-gated functions, so the - # last check covers the half of the module its tests leave out. - CIBW_TEST_COMMAND: >- - cd packages/python && - python -c "import chonkie_core._chunk as m; - assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest tests -v && - python -c "import numpy as np, chonkie_core; - d = np.array([0., 1., 2., 3., 4., 3., 2., 1., 0.]); - assert chonkie_core.savgol_filter(d, window_length=5, poly_order=2).shape == (9,); - assert chonkie_core.windowed_cross_similarity(np.eye(8, 4), 3).shape == (7,)" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: chonkie_core-${{ env.CHONKIE_CORE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # Checked out at the workspace root: packages/python is a member of the + # chunk Cargo workspace and builds against the root `chunk` crate. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "chonkie_core" + version: "${{ matrix.version }}" + repository: "chonkie-inc/chunk" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 120 + cibw-package-dir: "packages/python" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # chunk ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-requires: "pytest numpy" + # test-sources resolves against the checkout root, not package-dir. + cibw-test-sources: "packages/python/tests" + cibw-test-environment-linux: "PIP_ONLY_BINARY=numpy" + # Upstream's suite never calls the four numpy-gated functions, so the + # last check covers the half of the module its tests leave out. + cibw-test-command: > + cd packages/python && + python -c "import chonkie_core._chunk as m; + assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest tests -v && + python -c "import numpy as np, chonkie_core; + d = np.array([0., 1., 2., 3., 4., 3., 2., 1., 0.]); + assert chonkie_core.savgol_filter(d, window_length=5, poly_order=2).shape == (9,); + assert chonkie_core.windowed_cross_similarity(np.eye(8, 4), 3).shape == (7,)" publish: name: Publish chonkie-core ${{ matrix.version }} diff --git a/.github/workflows/build-cityseer.yml b/.github/workflows/build-cityseer.yml index dc9241c4265d..a0955e5e1077 100644 --- a/.github/workflows/build-cityseer.yml +++ b/.github/workflows/build-cityseer.yml @@ -49,55 +49,35 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build cityseer ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - CITYSEER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cityseer v${{ env.CITYSEER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: benchmark-urbanism/cityseer-api - ref: v${{ env.CITYSEER_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # cityseer ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=:all: - # Upstream's own `check` job: run the pytest suite (minus the - # performance benchmarks pyproject.toml's addopts already ignores -- - # `cd` into {package} first so cwd matches rootdir and that addopts - # is actually read. The Overpass-API network test upstream's own - # suite carries self-skips under GITHUB_ACTIONS. - # pyarrow is an optional geopandas dependency upstream's own dev - # group pulls in transitively (via overturemaps); CityNetwork.save() - # needs it directly and we already ship a riscv64 wheel for it. - CIBW_TEST_REQUIRES: pytest pyarrow - CIBW_TEST_COMMAND: cd {package} && pytest tests -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cityseer-${{ env.CITYSEER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cityseer" + version: "${{ matrix.version }}" + repository: "benchmark-urbanism/cityseer-api" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 120 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # cityseer ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\" PIP_ONLY_BINARY=:all:" + # Upstream's own `check` job: run the pytest suite (minus the + # performance benchmarks pyproject.toml's addopts already ignores -- + # `cd` into {package} first so cwd matches rootdir and that addopts + # is actually read. The Overpass-API network test upstream's own + # suite carries self-skips under GITHUB_ACTIONS. + # pyarrow is an optional geopandas dependency upstream's own dev + # group pulls in transitively (via overturemaps); CityNetwork.save() + # needs it directly and we already ship a riscv64 wheel for it. + cibw-test-requires: "pytest pyarrow" + cibw-test-command: "cd {package} && pytest tests -v" publish: name: Publish cityseer ${{ matrix.version }} diff --git a/.github/workflows/build-clarabel.yml b/.github/workflows/build-clarabel.yml index a6d2b7556ac3..0ea72938c376 100644 --- a/.github/workflows/build-clarabel.yml +++ b/.github/workflows/build-clarabel.yml @@ -53,67 +53,46 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build clarabel ${{ matrix.version }} cp39-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - CLARABEL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout Clarabel.rs v${{ env.CLARABEL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: oxfordcontrol/Clarabel.rs - ref: v${{ env.CLARABEL_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # pyo3's abi3-py39 feature makes this one wheel; it is built on cp39, - # the oldest interpreter its tag claims, and re-tested on the newer - # ones via find_compatible_wheel. musllinux is dropped: rustup.rs - # ships no riscv64 musl toolchain. - CIBW_BUILD: >- - cp39-manylinux_riscv64 cp312-manylinux_riscv64 - cp313-manylinux_riscv64 cp314-manylinux_riscv64 - # numpy and scipy, which clarabel imports at load time, have no - # riscv64 wheel below cp312. - CIBW_TEST_SKIP: cp39-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Clarabel.rs ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # maturin 1.9.2 stopped merging Cargo.toml metadata into a PEP 621 - # `[project]` table, which drops clarabel's summary, licence and - # repository URL from the wheel. Upstream's own wheels predate it. - CIBW_BEFORE_BUILD: pip install "maturin>=1.0,<1.9.2" - CIBW_BUILD_FRONTEND: 'build; args: --no-isolation' - # pardiso-panua replaces upstream's x86_64 `pardiso`: the mkl half of - # that feature fails the build on any other architecture. It is the - # same feature set upstream builds its aarch64 wheels with. - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - MATURIN_PEP517_ARGS="--features python,pardiso-panua" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Without it pip prefers PyPI's releases, which have no riscv64 - # wheels, and source-builds them in the container. - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=numpy,scipy,cffi - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: python/clarabel/tests examples/python examples/data - CIBW_TEST_COMMAND: >- - python -m pytest -v python/clarabel/tests && - python examples/python/example_qp.py && - python examples/python/example_sdp.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: clarabel-${{ env.CLARABEL_VERSION }}-cp39-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "clarabel" + version: "${{ matrix.version }}" + repository: "oxfordcontrol/Clarabel.rs" + ref: "v${{ matrix.version }}" + artifact-tag: "cp39-abi3-manylinux_riscv64" + timeout-minutes: 360 + # pyo3's abi3-py39 feature makes this one wheel; it is built on cp39, + # the oldest interpreter its tag claims, and re-tested on the newer + # ones via find_compatible_wheel. musllinux is dropped: rustup.rs + # ships no riscv64 musl toolchain. + cibw-build: > + cp39-manylinux_riscv64 cp312-manylinux_riscv64 + cp313-manylinux_riscv64 cp314-manylinux_riscv64 + # numpy and scipy, which clarabel imports at load time, have no + # riscv64 wheel below cp312. + cibw-test-skip: "cp39-manylinux_riscv64" + # Clarabel.rs ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + # maturin 1.9.2 stopped merging Cargo.toml metadata into a PEP 621 + # `[project]` table, which drops clarabel's summary, licence and + # repository URL from the wheel. Upstream's own wheels predate it. + cibw-before-build: "pip install \"maturin>=1.0,<1.9.2\"" + cibw-build-frontend: "build; args: --no-isolation" + # pardiso-panua replaces upstream's x86_64 `pardiso`: the mkl half of + # that feature fails the build on any other architecture. It is the + # same feature set upstream builds its aarch64 wheels with. + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" MATURIN_PEP517_ARGS=\"--features python,pardiso-panua\"" + # Without it pip prefers PyPI's releases, which have no riscv64 + # wheels, and source-builds them in the container. + cibw-test-environment: "PIP_ONLY_BINARY=numpy,scipy,cffi" + cibw-test-requires: "pytest" + cibw-test-sources: "python/clarabel/tests examples/python examples/data" + cibw-test-command: > + python -m pytest -v python/clarabel/tests && + python examples/python/example_qp.py && + python examples/python/example_sdp.py publish: name: Publish clarabel ${{ matrix.version }} diff --git a/.github/workflows/build-cohere-melody.yml b/.github/workflows/build-cohere-melody.yml index 5e3a7f585b4f..34cb51572386 100644 --- a/.github/workflows/build-cohere-melody.yml +++ b/.github/workflows/build-cohere-melody.yml @@ -49,53 +49,35 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build cohere-melody ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - COHERE_MELODY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cohere-melody v${{ env.COHERE_MELODY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: cohere-ai/melody - ref: v${{ env.COHERE_MELODY_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is out of reach: rustup publishes rust-std but no - # rustc/cargo host toolchain for riscv64gc-unknown-linux-musl. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # cohere-melody ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests pyproject.toml - # Pure-Rust maturin project (no python-source in pyproject.toml): the - # top-level cohere_melody is a generated __init__.py, not the .so - # (gotcha 559) -- probe the real submodule via sys.modules instead. - CIBW_TEST_COMMAND: >- - python -c "import cohere_melody, sys; assert sys.modules['cohere_melody.cohere_melody'].__file__.endswith('.so'), sys.modules['cohere_melody.cohere_melody'].__file__" && - python -m pytest -v --ignore=tests/templating/jinja/python - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cohere-melody-${{ env.COHERE_MELODY_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cohere-melody" + version: "${{ matrix.version }}" + repository: "cohere-ai/melody" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is out of reach: rustup publishes rust-std but no + # rustc/cargo host toolchain for riscv64gc-unknown-linux-musl. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # cohere-melody ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests pyproject.toml" + # Pure-Rust maturin project (no python-source in pyproject.toml): the + # top-level cohere_melody is a generated __init__.py, not the .so + # (gotcha 559) -- probe the real submodule via sys.modules instead. + cibw-test-command: > + python -c "import cohere_melody, sys; assert sys.modules['cohere_melody.cohere_melody'].__file__.endswith('.so'), sys.modules['cohere_melody.cohere_melody'].__file__" && + python -m pytest -v --ignore=tests/templating/jinja/python publish: name: Publish cohere-melody ${{ matrix.version }} diff --git a/.github/workflows/build-complexipy.yml b/.github/workflows/build-complexipy.yml index eb0caf1bb755..e50707a582bf 100644 --- a/.github/workflows/build-complexipy.yml +++ b/.github/workflows/build-complexipy.yml @@ -49,58 +49,42 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build complexipy ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - COMPLEXIPY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout complexipy ${{ env.COMPLEXIPY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rohaquinlop/complexipy - ref: ${{ env.COMPLEXIPY_VERSION }} - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # Only manylinux: rustup.rs ships no riscv64 musl host toolchain, so - # musllinux can't build (same reason build-fastuuid.yml skips it). - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # complexipy ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here and put on - # PATH for the build. - 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"' - # Tests live at the repo root; stage them (and pyproject.toml, for - # [tool.pytest.ini_options]) into the test working directory so - # `import complexipy` resolves to the installed wheel, not the - # repo's own complexipy/ source directory (which is left unstaged). - CIBW_TEST_SOURCES: tests pyproject.toml - CIBW_TEST_REQUIRES: pytest - # Mirrors upstream's quick-tests job: pytest suite, then the CLI - # console script exercised with the same exclude/ignore flags - # upstream's own CI runs against tests/src. - CIBW_TEST_COMMAND: >- - python -c "import complexipy._complexipy as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests && - complexipy tests/src --exclude "exclude_dir/**" --ignore-complexity && - complexipy tests/src --exclude "**/test_exclude*.py" --ignore-complexity - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: complexipy-${{ env.COMPLEXIPY_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "complexipy" + version: "${{ matrix.version }}" + repository: "rohaquinlop/complexipy" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + # Only manylinux: rustup.rs ships no riscv64 musl host toolchain, so + # musllinux can't build (same reason build-fastuuid.yml skips it). + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # complexipy ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here and put on + # PATH for the build. + 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\"" + # Tests live at the repo root; stage them (and pyproject.toml, for + # [tool.pytest.ini_options]) into the test working directory so + # `import complexipy` resolves to the installed wheel, not the + # repo's own complexipy/ source directory (which is left unstaged). + cibw-test-sources: "tests pyproject.toml" + cibw-test-requires: "pytest" + # Mirrors upstream's quick-tests job: pytest suite, then the CLI + # console script exercised with the same exclude/ignore flags + # upstream's own CI runs against tests/src. + cibw-test-command: > + python -c "import complexipy._complexipy as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests && + complexipy tests/src --exclude "exclude_dir/**" --ignore-complexity && + complexipy tests/src --exclude "**/test_exclude*.py" --ignore-complexity publish: name: Publish complexipy ${{ matrix.version }} diff --git a/.github/workflows/build-componentize-py.yml b/.github/workflows/build-componentize-py.yml index 032fe41ea9a5..db863c0dac17 100644 --- a/.github/workflows/build-componentize-py.yml +++ b/.github/workflows/build-componentize-py.yml @@ -50,59 +50,40 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build componentize-py ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - COMPONENTIZE_PY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout componentize-py v${{ env.COMPONENTIZE_PY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: bytecodealliance/componentize-py - ref: v${{ env.COMPONENTIZE_PY_VERSION }} - persist-credentials: false - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # build.rs cross-compiles CPython and the runtime shims to - # wasm32-wasip2 using WASI-SDK's clang; WASI-SDK itself has to run - # natively on the build host. Upstream's own CI only ever downloads - # x86_64/arm64 WASI-SDK releases, but the WASI-SDK project also - # publishes a riscv64-linux host build from wasi-sdk-33 onward - # (its own CI cross-compiles that artifact), so fetching it - # ourselves closes a gap in upstream's download helper rather than - # needing a patch to build.rs (which honors WASI_SDK_PATH as-is). - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && - $HOME/.cargo/bin/rustup target add wasm32-wasip2 && - curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux.tar.gz && - tar xf wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux.tar.gz && - mv wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux /opt/wasi-sdk - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - MATURIN_PEP517_ARGS="--features pyo3" - # No wheel-level test suite ships in the source tree: upstream - # tests via `cargo test` against wasmtime-cli, never packaged. - CIBW_TEST_COMMAND: >- - python -c "from componentize_py import componentize_py as m; assert m.__file__.endswith('.so'), m.__file__" && - componentize-py --help - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: componentize-py-${{ env.COMPONENTIZE_PY_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "componentize-py" + version: "${{ matrix.version }}" + repository: "bytecodealliance/componentize-py" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 360 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # build.rs cross-compiles CPython and the runtime shims to + # wasm32-wasip2 using WASI-SDK's clang; WASI-SDK itself has to run + # natively on the build host. Upstream's own CI only ever downloads + # x86_64/arm64 WASI-SDK releases, but the WASI-SDK project also + # publishes a riscv64-linux host build from wasi-sdk-33 onward + # (its own CI cross-compiles that artifact), so fetching it + # ourselves closes a gap in upstream's download helper rather than + # needing a patch to build.rs (which honors WASI_SDK_PATH as-is). + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + $HOME/.cargo/bin/rustup target add wasm32-wasip2 && + curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux.tar.gz && + tar xf wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux.tar.gz && + mv wasi-sdk-${{ env.WASI_SDK_VERSION }}.0-riscv64-linux /opt/wasi-sdk + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" MATURIN_PEP517_ARGS=\"--features pyo3\"" + # No wheel-level test suite ships in the source tree: upstream + # tests via `cargo test` against wasmtime-cli, never packaged. + cibw-test-command: > + python -c "from componentize_py import componentize_py as m; assert m.__file__.endswith('.so'), m.__file__" && + componentize-py --help publish: name: Publish componentize-py ${{ matrix.version }} diff --git a/.github/workflows/build-comrak.yml b/.github/workflows/build-comrak.yml index e4b3d2a00182..8e40afff090e 100644 --- a/.github/workflows/build-comrak.yml +++ b/.github/workflows/build-comrak.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build comrak ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 300 strategy: fail-fast: false matrix: @@ -67,43 +65,28 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - COMRAK_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout comrak py-${{ env.COMRAK_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: lmmx/comrak - ref: py-${{ env.COMRAK_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # comrak ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests pyproject.toml - # __init__.py re-exports from the compiled comrak.comrak submodule - # (gotcha 56); comrak.__file__ alone would point at the pure-Python shim. - CIBW_TEST_COMMAND: >- - python -c "import comrak.comrak as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: comrak-${{ env.COMRAK_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "comrak" + version: "${{ matrix.version }}" + repository: "lmmx/comrak" + ref: "py-${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 300 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # comrak ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests pyproject.toml" + # __init__.py re-exports from the compiled comrak.comrak submodule + # (gotcha 56); comrak.__file__ alone would point at the pure-Python shim. + cibw-test-command: > + python -c "import comrak.comrak as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish comrak ${{ matrix.version }} diff --git a/.github/workflows/build-cosmos-xenna.yml b/.github/workflows/build-cosmos-xenna.yml index 41f3a88e97eb..1f6618812bbe 100644 --- a/.github/workflows/build-cosmos-xenna.yml +++ b/.github/workflows/build-cosmos-xenna.yml @@ -49,130 +49,110 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build cosmos-xenna ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 480 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - COSMOS_XENNA_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cosmos-xenna v${{ env.COSMOS_XENNA_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: nvidia-cosmos/cosmos-xenna - ref: v${{ env.COSMOS_XENNA_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - # abi3-py312 (Cargo.toml's pyo3 feature set) covers every GIL-ful - # interpreter with one wheel; requires-python is >=3.12, so there is - # no cp310/cp311 leg to drop here. musllinux is dropped: rustup.rs - # ships no riscv64 musl toolchain. One identifier only, matching - # upstream's own release-from-tag.yml (python-version: ['3.12'], - # no cp313/cp314 leg at all): cibuildwheel gives each CIBW_BUILD - # identifier its own fresh test venv, and grpcio (a CIBW_TEST_REQUIRES - # dep of ray[default], no riscv64 wheel anywhere) is not abi3 - it - # source-builds again, from scratch, per interpreter. Real log (run - # 43753003895, job 132930934627) shows this costing ~2.5h *twice* - # (grpcio installed again at 01:22:00Z, a second time, for the - # cp313 test venv, after the cp312 one already finished at - # 22:45:23Z) on top of the ~6h8m one build+test cycle already - # needs, which is what actually ran the 480-minute timeout out - - # the raise to 480m (previous commit) did take effect (cancelled - # at duration_ms=28768746, ~479.5m, not the old 360), it just was - # never going to be enough for 3 full cycles. Testing the abi3 - # wheel under cp313/cp314 too, beyond what upstream's own CI does, - # was this port's own addition, not upstream's. - CIBW_BUILD: cp312-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # cosmos_xenna ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - # aws-lc-sys (pulled in by rustls' default crypto provider) ships - # prebuilt riscv64gc bindings, and cmake is already in the image. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Test-install only: ray[default] pulls py-spy directly and - # cryptography transitively (opencensus -> google-api-core -> - # google-auth, unbounded). Both specs are satisfied by our - # registry's riscv64 wheels, but an unbounded pip install picks - # PyPI's newer release instead and source-builds it, which fails - # (py-spy 0.4.3: rustc error in its own source; cryptography - # 50.0.2: openssl-sys can't find openssl.pc). - # Upstream's own ci.yml sets this so test code scales resource requirements - # down to fit small CI runners (cosmos_xenna/utils/ci.py); cibuildwheel's - # podman container doesn't forward host env vars, so without it these tests - # ask for more CPUs than this runner has and fail with "Not enough CPU - # resources". - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=cryptography,py-spy IS_RUNNING_IN_CICD=1 - # tqdm: cosmos_xenna/file_distribution/_file_distribution.py does a - # top-level `import tqdm`, but tqdm is not in pyproject.toml's - # `dependencies` (or any `[project.optional-dependencies]` group) - - # upstream's own uv.lock only carries it in because tqdm is a - # transitive dep of huggingface-hub/transformers (the `examples` - # extra), and `uv sync`'s default groups pull `examples` in locally. - # A plain `pip install cosmos-xenna` does not get tqdm at all, so - # this is really an upstream packaging gap, not a cibuildwheel-only - # issue, but we can't edit upstream's install_requires from here. - # It only bites at test time: --pyargs imports file_distribution - # (via pipelines.v1 / pipelines.private.pipelines) during - # collection, so it has to be listed here explicitly. tqdm is pure - # Python (py3-none-any), so it installs the same from either index - # with no riscv64 build step - no py-spy/cryptography-style - # resolver risk. - CIBW_TEST_REQUIRES: pytest tqdm - # The test files already ship inside the wheel itself (same as - # upstream's own published wheels), so --pyargs runs them straight - # against the installed, compiled package with no staging needed. - # "not slow" matches pyproject.toml's own default addopts, which a - # plain `pytest` invocation picks up from the checkout but --pyargs - # does not; upstream's separate `pytest -m 'slow'` CI step is - # dropped as disproportionate for a shared riscv64 runner. - # - # Deselect pipelines/v1/test_serving.py::test_serving: it builds a - # pipeline that deliberately includes a stage named - # _SegfaultingStage (cosmos_xenna/pipelines/private/specs.py:616's - # process_data calls ctypes.string_at on a bad pointer to simulate - # a crashed worker, testing serving mode's resilience to it). The - # real cp312 job log (run 43082742242, job 130739334072) shows this - # stage's worker genuinely segfaulting as designed ("Fatal Python - # error: Segmentation fault", stack through ctypes.string_at -> - # specs.py:616 -> stage_worker.py), the test itself then failing - # with _queue.Empty (the serving queue never got a result from the - # dead worker) - and after pytest prints its own full summary ("1 - # failed, 548 passed, ... in 1069.33s"), the *whole* test process - # (not a Ray worker - the top-level `env ... pytest` command, - # confirmed by bash's own job-control line naming its PID) crashes - # with another, separate SIGSEGV. Ray's cleanup of a worker that - # died this way (closing the Plasma/object-store shared memory, - # tearing down raylet sockets) is evidently not safe on this - # architecture once that worker's crash leaves shared state - # corrupted - a genuine riscv64-specific Ray/ctypes-crash-handling - # gap, not a bug in cosmos_xenna's own code, and well beyond what a - # patch at this port's level can fix. Deselecting the one test that - # exercises this intentionally-crashing scenario avoids it; nothing - # else in the suite does this on purpose. - CIBW_TEST_COMMAND: >- - python -c "import cosmos_xenna._cosmos_xenna as m; assert m.__file__.endswith('.so'), m.__file__" - && python -m pytest --pyargs cosmos_xenna -q -m "not slow" - --deselect pipelines/v1/test_serving.py::test_serving - with: - output-dir: wheelhouse/ - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cosmos-xenna-${{ env.COSMOS_XENNA_VERSION }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error - + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cosmos-xenna" + version: "${{ matrix.version }}" + repository: "nvidia-cosmos/cosmos-xenna" + ref: "v${{ matrix.version }}" + artifact-tag: "manylinux_riscv64" + timeout-minutes: 480 + # abi3-py312 (Cargo.toml's pyo3 feature set) covers every GIL-ful + # interpreter with one wheel; requires-python is >=3.12, so there is + # no cp310/cp311 leg to drop here. musllinux is dropped: rustup.rs + # ships no riscv64 musl toolchain. One identifier only, matching + # upstream's own release-from-tag.yml (python-version: ['3.12'], + # no cp313/cp314 leg at all): cibuildwheel gives each CIBW_BUILD + # identifier its own fresh test venv, and grpcio (a CIBW_TEST_REQUIRES + # dep of ray[default], no riscv64 wheel anywhere) is not abi3 - it + # source-builds again, from scratch, per interpreter. Real log (run + # 43753003895, job 132930934627) shows this costing ~2.5h *twice* + # (grpcio installed again at 01:22:00Z, a second time, for the + # cp313 test venv, after the cp312 one already finished at + # 22:45:23Z) on top of the ~6h8m one build+test cycle already + # needs, which is what actually ran the 480-minute timeout out - + # the raise to 480m (previous commit) did take effect (cancelled + # at duration_ms=28768746, ~479.5m, not the old 360), it just was + # never going to be enough for 3 full cycles. Testing the abi3 + # wheel under cp313/cp314 too, beyond what upstream's own CI does, + # was this port's own addition, not upstream's. + cibw-build: "cp312-manylinux_riscv64" + # cosmos_xenna ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + # aws-lc-sys (pulled in by rustls' default crypto provider) ships + # prebuilt riscv64gc bindings, and cmake is already in the image. + 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\"" + # Test-install only: ray[default] pulls py-spy directly and + # cryptography transitively (opencensus -> google-api-core -> + # google-auth, unbounded). Both specs are satisfied by our + # registry's riscv64 wheels, but an unbounded pip install picks + # PyPI's newer release instead and source-builds it, which fails + # (py-spy 0.4.3: rustc error in its own source; cryptography + # 50.0.2: openssl-sys can't find openssl.pc). + # Upstream's own ci.yml sets this so test code scales resource requirements + # down to fit small CI runners (cosmos_xenna/utils/ci.py); cibuildwheel's + # podman container doesn't forward host env vars, so without it these tests + # ask for more CPUs than this runner has and fail with "Not enough CPU + # resources". + cibw-test-environment: "PIP_ONLY_BINARY=cryptography,py-spy IS_RUNNING_IN_CICD=1" + # tqdm: cosmos_xenna/file_distribution/_file_distribution.py does a + # top-level `import tqdm`, but tqdm is not in pyproject.toml's + # `dependencies` (or any `[project.optional-dependencies]` group) - + # upstream's own uv.lock only carries it in because tqdm is a + # transitive dep of huggingface-hub/transformers (the `examples` + # extra), and `uv sync`'s default groups pull `examples` in locally. + # A plain `pip install cosmos-xenna` does not get tqdm at all, so + # this is really an upstream packaging gap, not a cibuildwheel-only + # issue, but we can't edit upstream's install_requires from here. + # It only bites at test time: --pyargs imports file_distribution + # (via pipelines.v1 / pipelines.private.pipelines) during + # collection, so it has to be listed here explicitly. tqdm is pure + # Python (py3-none-any), so it installs the same from either index + # with no riscv64 build step - no py-spy/cryptography-style + # resolver risk. + cibw-test-requires: "pytest tqdm" + # The test files already ship inside the wheel itself (same as + # upstream's own published wheels), so --pyargs runs them straight + # against the installed, compiled package with no staging needed. + # "not slow" matches pyproject.toml's own default addopts, which a + # plain `pytest` invocation picks up from the checkout but --pyargs + # does not; upstream's separate `pytest -m 'slow'` CI step is + # dropped as disproportionate for a shared riscv64 runner. + # + # Deselect pipelines/v1/test_serving.py::test_serving: it builds a + # pipeline that deliberately includes a stage named + # _SegfaultingStage (cosmos_xenna/pipelines/private/specs.py:616's + # process_data calls ctypes.string_at on a bad pointer to simulate + # a crashed worker, testing serving mode's resilience to it). The + # real cp312 job log (run 43082742242, job 130739334072) shows this + # stage's worker genuinely segfaulting as designed ("Fatal Python + # error: Segmentation fault", stack through ctypes.string_at -> + # specs.py:616 -> stage_worker.py), the test itself then failing + # with _queue.Empty (the serving queue never got a result from the + # dead worker) - and after pytest prints its own full summary ("1 + # failed, 548 passed, ... in 1069.33s"), the *whole* test process + # (not a Ray worker - the top-level `env ... pytest` command, + # confirmed by bash's own job-control line naming its PID) crashes + # with another, separate SIGSEGV. Ray's cleanup of a worker that + # died this way (closing the Plasma/object-store shared memory, + # tearing down raylet sockets) is evidently not safe on this + # architecture once that worker's crash leaves shared state + # corrupted - a genuine riscv64-specific Ray/ctypes-crash-handling + # gap, not a bug in cosmos_xenna's own code, and well beyond what a + # patch at this port's level can fix. Deselecting the one test that + # exercises this intentionally-crashing scenario avoids it; nothing + # else in the suite does this on purpose. + cibw-test-command: > + python -c "import cosmos_xenna._cosmos_xenna as m; assert m.__file__.endswith('.so'), m.__file__" + && python -m pytest --pyargs cosmos_xenna -q -m "not slow" + --deselect pipelines/v1/test_serving.py::test_serving publish: name: Publish cosmos-xenna ${{ matrix.version }} needs: [setup, build_wheels] diff --git a/.github/workflows/build-cql2.yml b/.github/workflows/build-cql2.yml index 6536a47a5238..d76263dc9d61 100644 --- a/.github/workflows/build-cql2.yml +++ b/.github/workflows/build-cql2.yml @@ -50,64 +50,46 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build cql2 ${{ matrix.version }} cp312-abi3-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} platform: ["manylinux", "musllinux"] - env: - CQL2_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cql2-rs cql2-v${{ env.CQL2_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: developmentseed/cql2-rs - ref: cql2-v${{ env.CQL2_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # pyo3's abi3-py310 feature is on unconditionally (python/Cargo.toml), - # so one abi3 wheel serves every interpreter in our matrix; upstream - # ships only a cp310-abi3 wheel, no free-threaded (cp314t) variant, - # so there is no separate free-threaded job either. Built on cp312 - # (our floor) and re-tested on cp313/cp314 via cibuildwheel's - # find_compatible_wheel logic. - CIBW_BUILD: >- - cp312-${{ matrix.platform }}_riscv64 cp313-${{ matrix.platform }}_riscv64 - cp314-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - # cql2's pyproject.toml ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest - # python/tests' conftest.py resolves fixtures via - # Path(__file__).parents[2] / "examples", i.e. two levels above - # python/tests -- staging examples/ alongside it keeps that path valid. - CIBW_TEST_SOURCES: python/tests examples - # No python-source in pyproject.toml, so maturin ships an - # auto-generated cql2/__init__.py shim around the compiled - # cql2/cql2 submodule -- probe that submodule before running - # upstream's own tests. - CIBW_TEST_COMMAND: >- - python -c "import cql2.cql2 as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v python/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cql2-${{ env.CQL2_VERSION }}-cp312-abi3-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cql2" + version: "${{ matrix.version }}" + repository: "developmentseed/cql2-rs" + ref: "cql2-v${{ matrix.version }}" + artifact-tag: "cp312-abi3-${{ matrix.platform }}_riscv64" + # pyo3's abi3-py310 feature is on unconditionally (python/Cargo.toml), + # so one abi3 wheel serves every interpreter in our matrix; upstream + # ships only a cp310-abi3 wheel, no free-threaded (cp314t) variant, + # so there is no separate free-threaded job either. Built on cp312 + # (our floor) and re-tested on cp313/cp314 via cibuildwheel's + # find_compatible_wheel logic. + cibw-build: > + cp312-${{ matrix.platform }}_riscv64 cp313-${{ matrix.platform }}_riscv64 + cp314-${{ matrix.platform }}_riscv64 + cibw-musllinux-riscv64-image: "quay.io/pypa/musllinux_1_2_riscv64" + # cql2's pyproject.toml ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest" + # python/tests' conftest.py resolves fixtures via + # Path(__file__).parents[2] / "examples", i.e. two levels above + # python/tests -- staging examples/ alongside it keeps that path valid. + cibw-test-sources: "python/tests examples" + # No python-source in pyproject.toml, so maturin ships an + # auto-generated cql2/__init__.py shim around the compiled + # cql2/cql2 submodule -- probe that submodule before running + # upstream's own tests. + cibw-test-command: > + python -c "import cql2.cql2 as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v python/tests publish: name: Publish cql2 ${{ matrix.version }} diff --git a/.github/workflows/build-css-inline.yml b/.github/workflows/build-css-inline.yml index ee3e288283a3..f68237ca6856 100644 --- a/.github/workflows/build-css-inline.yml +++ b/.github/workflows/build-css-inline.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build css-inline ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 300 strategy: fail-fast: false matrix: @@ -67,59 +65,44 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - CSS_INLINE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout css-inline python-v${{ env.CSS_INLINE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Stranger6667/css-inline - ref: python-v${{ env.CSS_INLINE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: crates/css-inline-python - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # crates/css-inline-python ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest hypothesis - # crates/css-inline/tests carries the background test server and the - # fixture that crates/css-inline-python/tests-py reaches through a relative - # "../css-inline/tests/..." href, so both trees are staged - # together, preserving their layout from the checkout. - CIBW_TEST_SOURCES: >- - crates/css-inline-python/tests-py crates/css-inline-python/pyproject.toml - crates/css-inline/tests - # Upstream's own CI backgrounds this same server ahead of every - # Python/Rust/Ruby test job (crates/css-inline/tests/server.py) to serve - # tests-py's remote-stylesheet cases from 127.0.0.1:1234. - # css_inline/__init__.py is a pure-Python re-export shim; the compiled - # extension is the css_inline.css_inline submodule (gotcha 56). - CIBW_TEST_COMMAND: >- - python crates/css-inline/tests/server.py >/dev/null 2>&1 & - for _ in $(seq 1 20); do - python -c "import socket; socket.create_connection(('127.0.0.1', 1234), timeout=0.2).close()" 2>/dev/null && break; - sleep 0.1; - done && - python -c "import css_inline.css_inline as m; assert m.__file__.endswith('.so'), m.__file__" && - cd crates/css-inline-python && - python -m pytest -v tests-py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: css-inline-${{ env.CSS_INLINE_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "css-inline" + version: "${{ matrix.version }}" + repository: "Stranger6667/css-inline" + ref: "python-v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 300 + cibw-package-dir: "crates/css-inline-python" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # crates/css-inline-python ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest hypothesis" + # crates/css-inline/tests carries the background test server and the + # fixture that crates/css-inline-python/tests-py reaches through a relative + # "../css-inline/tests/..." href, so both trees are staged + # together, preserving their layout from the checkout. + cibw-test-sources: > + crates/css-inline-python/tests-py crates/css-inline-python/pyproject.toml + crates/css-inline/tests + # Upstream's own CI backgrounds this same server ahead of every + # Python/Rust/Ruby test job (crates/css-inline/tests/server.py) to serve + # tests-py's remote-stylesheet cases from 127.0.0.1:1234. + # css_inline/__init__.py is a pure-Python re-export shim; the compiled + # extension is the css_inline.css_inline submodule (gotcha 56). + cibw-test-command: > + python crates/css-inline/tests/server.py >/dev/null 2>&1 & + for _ in $(seq 1 20); do + python -c "import socket; socket.create_connection(('127.0.0.1', 1234), timeout=0.2).close()" 2>/dev/null && break; + sleep 0.1; + done && + python -c "import css_inline.css_inline as m; assert m.__file__.endswith('.so'), m.__file__" && + cd crates/css-inline-python && + python -m pytest -v tests-py publish: name: Publish css-inline ${{ matrix.version }} diff --git a/.github/workflows/build-cwcwidth.yml b/.github/workflows/build-cwcwidth.yml index 8137a8b7c398..69489fef01a5 100644 --- a/.github/workflows/build-cwcwidth.yml +++ b/.github/workflows/build-cwcwidth.yml @@ -57,44 +57,26 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build cwcwidth ${{ matrix.version }} cp311-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - CWCWIDTH_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cwcwidth v${{ env.CWCWIDTH_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: sebastinas/cwcwidth - ref: v${{ env.CWCWIDTH_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: 'cp311-* cp312-* cp313-* cp314-*' - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: USE_LIMITED_API=1 - # tests/ is a package (has __init__.py): pytest's prepend import mode - # would otherwise put the checkout root on sys.path[0] and shadow the - # installed wheel with the uncompiled cwcwidth/ source tree. - CIBW_TEST_SOURCES: tests - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest tests -v - CIBW_TEST_ENVIRONMENT: LC_ALL=C.UTF-8 LANG=C.UTF-8 - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cwcwidth-${{ env.CWCWIDTH_VERSION }}-cp311-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # Free-threaded wheel: setup.py's py_limited_api flag has no free-threaded ABI + # to target, so this is an ordinary per-interpreter build. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cwcwidth" + version: "${{ matrix.version }}" + repository: "sebastinas/cwcwidth" + ref: "v${{ matrix.version }}" + artifact-tag: "cp311-abi3-manylinux_riscv64" + timeout-minutes: 90 + cibw-build: "cp311-* cp312-* cp313-* cp314-*" + cibw-environment-linux: "USE_LIMITED_API=1" + # tests/ is a package (has __init__.py): pytest's prepend import mode + # would otherwise put the checkout root on sys.path[0] and shadow the + # installed wheel with the uncompiled cwcwidth/ source tree. + cibw-test-sources: "tests" + cibw-test-requires: "pytest" + cibw-test-command: "pytest tests -v" + cibw-test-environment: "LC_ALL=C.UTF-8 LANG=C.UTF-8" - # Free-threaded wheel: setup.py's py_limited_api flag has no free-threaded ABI - # to target, so this is an ordinary per-interpreter build. build_freethreaded: needs: [setup] if: needs.setup.outputs.versions != '[]' @@ -103,37 +85,19 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build cwcwidth ${{ matrix.version }} cp314t-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - CWCWIDTH_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout cwcwidth v${{ env.CWCWIDTH_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: sebastinas/cwcwidth - ref: v${{ env.CWCWIDTH_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: 'cp314t-*' - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_TEST_SOURCES: tests - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest tests -v - CIBW_TEST_ENVIRONMENT: LC_ALL=C.UTF-8 LANG=C.UTF-8 - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cwcwidth-${{ env.CWCWIDTH_VERSION }}-cp314t-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "cwcwidth" + version: "${{ matrix.version }}" + repository: "sebastinas/cwcwidth" + ref: "v${{ matrix.version }}" + artifact-tag: "cp314t-manylinux_riscv64" + timeout-minutes: 90 + cibw-build: "cp314t-*" + cibw-test-sources: "tests" + cibw-test-requires: "pytest" + cibw-test-command: "pytest tests -v" + cibw-test-environment: "LC_ALL=C.UTF-8 LANG=C.UTF-8" publish: name: Publish cwcwidth ${{ matrix.version }} diff --git a/.github/workflows/build-datefinder.yml b/.github/workflows/build-datefinder.yml index e466ae008012..a4526dc3bfb2 100644 --- a/.github/workflows/build-datefinder.yml +++ b/.github/workflows/build-datefinder.yml @@ -53,50 +53,30 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build datefinder ${{ matrix.version }} cp39-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - DATEFINDER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout datefinder v${{ env.DATEFINDER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: akoumjian/datefinder - ref: v${{ env.DATEFINDER_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # The kernel crate enables pyo3's `abi3-py39`, so one wheel covers - # every interpreter; it is built on cp312 and re-tested on the newer - # ones via find_compatible_wheel. cp314t is dropped: pyo3 0.22 predates - # free-threading support and upstream publishes no cp3XXt wheel. - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: >- - cp312-manylinux_riscv64 cp313-manylinux_riscv64 - cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # datefinder ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: datefinder-${{ env.DATEFINDER_VERSION }}-cp39-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "datefinder" + version: "${{ matrix.version }}" + repository: "akoumjian/datefinder" + ref: "v${{ matrix.version }}" + artifact-tag: "cp39-abi3-manylinux_riscv64" + timeout-minutes: 360 + # The kernel crate enables pyo3's `abi3-py39`, so one wheel covers + # every interpreter; it is built on cp312 and re-tested on the newer + # ones via find_compatible_wheel. cp314t is dropped: pyo3 0.22 predates + # free-threading support and upstream publishes no cp3XXt wheel. + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: > + cp312-manylinux_riscv64 cp313-manylinux_riscv64 + cp314-manylinux_riscv64 + # datefinder ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -v tests" publish: name: Publish datefinder ${{ matrix.version }} diff --git a/.github/workflows/build-deepfilterlib.yml b/.github/workflows/build-deepfilterlib.yml index e0160542aa99..ae765f11d3ad 100644 --- a/.github/workflows/build-deepfilterlib.yml +++ b/.github/workflows/build-deepfilterlib.yml @@ -50,61 +50,43 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build DeepFilterLib ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - DEEPFILTERLIB_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout DeepFilterNet v${{ env.DEEPFILTERLIB_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Rikorose/DeepFilterNet - ref: v${{ env.DEEPFILTERLIB_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: pyDF - output-dir: wheelhouse/ - only: ${{ matrix.python }}-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pyDF ships no [tool.cibuildwheel]; install the Rust toolchain its - # maturin backend needs. - 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 pins maturin>=0.11,<0.12 (2021), which has no riscv64 - # wheel on PyPI and predates riscv64 cross-compile/target support - # entirely. A current maturin builds this tree unmodified, so install - # one and skip isolation to bypass the pin (same as build-anchorpy-core.yml). - CIBW_BEFORE_BUILD: pip install maturin - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_TEST_REQUIRES: numpy - CIBW_TEST_COMMAND: >- - python -c "import libdf, numpy as np, sys; - assert sys.modules['libdf.libdf'].__file__.endswith('.so'), sys.modules['libdf.libdf'].__file__; - state = libdf.DF(sr=48000, fft_size=960, hop_size=480, nb_bands=32); - assert state.sr() == 48000 and state.fft_size() == 960 and state.hop_size() == 480; - x = np.random.default_rng(0).standard_normal((1, 48000)).astype(np.float32); - spec = state.analysis(x); - assert spec.ndim == 3 and spec.shape == (1, 100, 481), spec.shape; - out = state.synthesis(spec); - assert out.ndim == 2 and out.shape[0] == 1 and out.shape[1] == x.shape[1], out.shape; - print('DeepFilterLib analysis/synthesis round-trip OK') - " - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: deepfilterlib-${{ env.DEEPFILTERLIB_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "deepfilterlib" + version: "${{ matrix.version }}" + repository: "Rikorose/DeepFilterNet" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + cibw-package-dir: "pyDF" + cibw-build: "${{ matrix.python }}-manylinux_riscv64" + # pyDF ships no [tool.cibuildwheel]; install the Rust toolchain its + # maturin backend needs. + 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 pins maturin>=0.11,<0.12 (2021), which has no riscv64 + # wheel on PyPI and predates riscv64 cross-compile/target support + # entirely. A current maturin builds this tree unmodified, so install + # one and skip isolation to bypass the pin (same as build-anchorpy-core.yml). + cibw-before-build: "pip install maturin" + cibw-build-frontend: "pip; args: --no-build-isolation" + cibw-test-requires: "numpy" + cibw-test-command: > + python -c "import libdf, numpy as np, sys; + assert sys.modules['libdf.libdf'].__file__.endswith('.so'), sys.modules['libdf.libdf'].__file__; + state = libdf.DF(sr=48000, fft_size=960, hop_size=480, nb_bands=32); + assert state.sr() == 48000 and state.fft_size() == 960 and state.hop_size() == 480; + x = np.random.default_rng(0).standard_normal((1, 48000)).astype(np.float32); + spec = state.analysis(x); + assert spec.ndim == 3 and spec.shape == (1, 100, 481), spec.shape; + out = state.synthesis(spec); + assert out.ndim == 2 and out.shape[0] == 1 and out.shape[1] == x.shape[1], out.shape; + print('DeepFilterLib analysis/synthesis round-trip OK') + " publish: name: Publish DeepFilterLib ${{ matrix.version }} diff --git a/.github/workflows/build-demoparser2.yml b/.github/workflows/build-demoparser2.yml index 80b45f6efc6c..fa186efd95ce 100644 --- a/.github/workflows/build-demoparser2.yml +++ b/.github/workflows/build-demoparser2.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build demoparser2 ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 300 strategy: fail-fast: false matrix: @@ -60,77 +58,57 @@ jobs: # so the wheel builds fine but the test phase must be skipped here. include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - DEMOPARSER2_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout demoparser2 v${{ env.DEMOPARSER2_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: LaihoE/demoparser - ref: v${{ env.DEMOPARSER2_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: src/python - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # demoparser2 ships no [tool.cibuildwheel], so the Rust toolchain its maturin - # backend needs is installed in-container here. Upstream's own before-script-linux - # downloads a pinned protoc release, but its arch case statement covers only - # x86_64/aarch64; Rocky 10's CRB repo (enabled in the image) has protoc instead - # (gotcha 100). csgoproto's build.rs shells out to `git clone` at build time, so - # git also needs to be present, and the copied-in checkout's ownership triggers - # git's "dubious ownership" guard for that clone. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && - yum install -y protobuf-compiler protobuf-devel git && - git config --global --add safe.directory '*' - # PROTOC_INCLUDE is needed because CRB's protoc 3.19 resolves - # google/protobuf/*.proto from disk rather than from the binary (gotcha 100). - # CARGO_BUILD_JOBS halves concurrent rustc processes: the cp314t leg died - # compiling demoparser2's own crate with `free(): corrupted unsorted chunks` - # (SIGABRT) linking against polars on the 4-core riscv64 runners (gotcha 228). - # demoparser2's own Requires-Dist pulls in polars (and pandas via - # CIBW_TEST_REQUIRES below); PyPI's newest releases of both ship no - # riscv64 wheel yet, so without PIP_ONLY_BINARY pip resolves them - # over our registry's slightly older (but wheel-having) versions - # and falls back to a from-source build that never finishes in - # CI's time budget (polars-runtime-32 in particular is a Rust - # binary crate). - CIBW_ENVIRONMENT: >- - PATH="$PATH:$HOME/.cargo/bin" - PROTOC_INCLUDE=/usr/include - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=pandas,polars,polars-runtime-32 - CARGO_BUILD_JOBS=2 - # Upstream's committed Cargo.lock pins ethnum 1.5.2 (pulled in transitively via - # polars-arrow/polars-parquet), whose `tfie()` helper transmutes `()` into - # `TryFromIntError`; a std layout change (any arch, any stable toolchain built - # from nightly-2026-04-18 onward) grew that type from 0 to 1 byte, so the - # transmute is now a compile error everywhere, not just riscv64. 1.5.3 replaces - # it with a safe construction (nlordell/ethnum-rs#58) and satisfies polars' - # `^1.3.2` requirement. - CIBW_BEFORE_BUILD_LINUX: cd src/python && cargo update -p ethnum --precise 1.5.3 - CIBW_TEST_REQUIRES: pandas - # Staged at their checkout-relative paths (gotcha 104) so signature_tests.py's own - # `../parser/test_demo.dem` (relative to a src/python cwd, matching upstream's own - # `working-directory: ./src/python` test job) resolves inside test_cwd too. - CIBW_TEST_SOURCES: src/python/tests src/parser/test_demo.dem - CIBW_TEST_COMMAND: >- - python -c "import demoparser2.demoparser2 as m; assert m.__file__.endswith('.so'), m.__file__" && - cd src/python && python tests/signature_tests.py - CIBW_TEST_SKIP: ${{ case(endsWith(matrix.python, 't'), '*', '') }} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: demoparser2-${{ env.DEMOPARSER2_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "demoparser2" + version: "${{ matrix.version }}" + repository: "LaihoE/demoparser" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 300 + cibw-package-dir: "src/python" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # demoparser2 ships no [tool.cibuildwheel], so the Rust toolchain its maturin + # backend needs is installed in-container here. Upstream's own before-script-linux + # downloads a pinned protoc release, but its arch case statement covers only + # x86_64/aarch64; Rocky 10's CRB repo (enabled in the image) has protoc instead + # (gotcha 100). csgoproto's build.rs shells out to `git clone` at build time, so + # git also needs to be present, and the copied-in checkout's ownership triggers + # git's "dubious ownership" guard for that clone. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + yum install -y protobuf-compiler protobuf-devel git && + git config --global --add safe.directory '*' + # PROTOC_INCLUDE is needed because CRB's protoc 3.19 resolves + # google/protobuf/*.proto from disk rather than from the binary (gotcha 100). + # CARGO_BUILD_JOBS halves concurrent rustc processes: the cp314t leg died + # compiling demoparser2's own crate with `free(): corrupted unsorted chunks` + # (SIGABRT) linking against polars on the 4-core riscv64 runners (gotcha 228). + # demoparser2's own Requires-Dist pulls in polars (and pandas via + # CIBW_TEST_REQUIRES below); PyPI's newest releases of both ship no + # riscv64 wheel yet, so without PIP_ONLY_BINARY pip resolves them + # over our registry's slightly older (but wheel-having) versions + # and falls back to a from-source build that never finishes in + # CI's time budget (polars-runtime-32 in particular is a Rust + # binary crate). + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" PROTOC_INCLUDE=/usr/include PIP_ONLY_BINARY=pandas,polars,polars-runtime-32 CARGO_BUILD_JOBS=2" + # Upstream's committed Cargo.lock pins ethnum 1.5.2 (pulled in transitively via + # polars-arrow/polars-parquet), whose `tfie()` helper transmutes `()` into + # `TryFromIntError`; a std layout change (any arch, any stable toolchain built + # from nightly-2026-04-18 onward) grew that type from 0 to 1 byte, so the + # transmute is now a compile error everywhere, not just riscv64. 1.5.3 replaces + # it with a safe construction (nlordell/ethnum-rs#58) and satisfies polars' + # `^1.3.2` requirement. + cibw-before-build-linux: "cd src/python && cargo update -p ethnum --precise 1.5.3" + cibw-test-requires: "pandas" + # Staged at their checkout-relative paths (gotcha 104) so signature_tests.py's own + # `../parser/test_demo.dem` (relative to a src/python cwd, matching upstream's own + # `working-directory: ./src/python` test job) resolves inside test_cwd too. + cibw-test-sources: "src/python/tests src/parser/test_demo.dem" + cibw-test-command: > + python -c "import demoparser2.demoparser2 as m; assert m.__file__.endswith('.so'), m.__file__" && + cd src/python && python tests/signature_tests.py + cibw-test-skip: "${{ case(endsWith(matrix.python, 't'), '*', '') }}" publish: name: Publish demoparser2 ${{ matrix.version }} diff --git a/.github/workflows/build-docvortex.yml b/.github/workflows/build-docvortex.yml index 22f3a9ca793e..b4cd1506709e 100644 --- a/.github/workflows/build-docvortex.yml +++ b/.github/workflows/build-docvortex.yml @@ -58,105 +58,85 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build docvortex ${{ matrix.version }} cp311-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - DOCVORTEX_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout docvortex ${{ env.DOCVORTEX_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: myhloli/DocVortex - ref: v${{ env.DOCVORTEX_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - # The wheel is cp311-abi3, so it is compiled on cp311 (gotcha 96). - # Its runtime dependency onnxruntime has no cp311 riscv64 wheel on - # PyPI or pypi.riseproject.dev (cp312+ only), so the cp311 install - # before the tests cannot resolve. cibuildwheel reuses the same abi3 - # wheel for cp312 and tests it there; skip only the cp311 test - # (gotcha 216). - CIBW_BUILD: 'cp311-* cp312-*' - CIBW_SKIP: '*-musllinux_*' - CIBW_TEST_SKIP: 'cp311-*' - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_ALL_LINUX: >- - export CARGO_HOME=/opt/docvortex-cargo RUSTUP_HOME=/opt/docvortex-rustup; - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs - | sh -s -- -y --profile minimal --default-toolchain 1.98.1 - CIBW_ENVIRONMENT_LINUX: >- - PATH="/opt/docvortex-cargo/bin:$PATH" - CARGO_HOME=/opt/docvortex-cargo - RUSTUP_HOME=/opt/docvortex-rustup - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # PyPI's newest pillow/numpy can be sdist-only on riscv64 while our - # registry still hosts the previous release's wheel (gotcha 354). - CIBW_TEST_ENVIRONMENT: PIP_PREFER_BINARY=1 - # Upstream pins pypdfium2==5.13.0 because its golden fixtures - # (tests/fixtures/native_pdf_06_golden.json.gz) were generated with - # it, i.e. with PDFium 153.0.7999 from pdfium-binaries. The riscv64 - # 5.13.0 wheel on PyPI is instead a source build of the older PDFium - # 151.0.7913, whose FPDFText_GetFontWeight derives the weight from - # the font descriptor's StemV (250/440 instead of the golden's 400), - # failing test_real_font_and_geometry_bridge_parity[caibao1,demo2]. - # The riscv64 5.14.0 wheel bundles PDFium 156.0.8076, which matches - # the golden data (the whole suite also passes on x86_64 with - # 5.14.0), and is what `pypdfium2>=5.13.0,<6` resolves to anyway. - CIBW_TEST_REQUIRES: pytest psutil pypdfium2==5.14.0 - CIBW_TEST_COMMAND: >- - python {project}/tools/verify_native_wheel.py {project}/demo/pdfs/demo1.pdf && - python -m pytest - {project}/tests/test_native_parity.py - {project}/tests/test_rule_graphics_acceleration.py - {project}/tests/test_rule_text_acceleration.py - {project}/tests/test_rule_pixel_form_acceleration.py - {project}/tests/test_rule_layout_batch_acceleration.py - {project}/tests/test_rule_numeric_graphics_acceleration.py - {project}/tests/test_rule_fill_bands_acceleration.py - {project}/tests/test_native_statistics.py - {project}/tests/test_native_round3.py - {project}/tests/test_native_round4.py - {project}/tests/test_native_round5.py - {project}/tests/test_native_round6.py - {project}/tests/test_native_round7.py - {project}/tests/test_pdfium_bridge.py - {project}/tests/test_pdf_object_bridge.py - {project}/tests/test_pdf_classify_page_loading.py - {project}/tests/test_pdf_classify_resource_graph.py - {project}/tests/test_pdf_drawing_lines_extraction.py - {project}/tests/test_pdf_native_graphics_components.py - {project}/tests/unittest/test_flash_pdf_auxiliary_text.py - {project}/tests/test_pdf_snapshot.py - {project}/tests/test_native_inline_styles.py - {project}/tests/test_native_bitmap_crops.py - {project}/tests/test_pdf_render_session.py - {project}/tests/test_native_font_runtime.py - {project}/tests/test_native_text_pipeline.py - {project}/tests/test_native_text_snapshot.py - {project}/tests/test_native_classification.py - {project}/tests/test_native_image_text_classification.py - {project}/tests/unittest/test_pdf_classify_image_text.py - {project}/tests/unittest/test_flash_pdf_char_geometry.py - {project}/tests/test_native_table_candidates.py - {project}/tests/test_native_candidate_boundaries.py - {project}/tests/test_native_annotation_geometry.py - {project}/tests/unittest/test_native_pdf_table_demo_manifest.py - {project}/tests/test_pdf_analysis_api.py - {project}/tests/test_pdf_cpu_evidence.py - -q && - python {project}/tools/verify_native_wheel.py {project}/demo/pdfs/demo2.pdf && - python {project}/tools/verify_nonpdf_wheel.py --output {project}/build/nonpdf-cp311 --run-tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: docvortex-${{ env.DOCVORTEX_VERSION }}-cp311-abi3-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "docvortex" + version: "${{ matrix.version }}" + repository: "myhloli/DocVortex" + ref: "v${{ matrix.version }}" + artifact-tag: "cp311-abi3-manylinux_riscv64" + timeout-minutes: 90 + # The wheel is cp311-abi3, so it is compiled on cp311 (gotcha 96). + # Its runtime dependency onnxruntime has no cp311 riscv64 wheel on + # PyPI or pypi.riseproject.dev (cp312+ only), so the cp311 install + # before the tests cannot resolve. cibuildwheel reuses the same abi3 + # wheel for cp312 and tests it there; skip only the cp311 test + # (gotcha 216). + cibw-build: "cp311-* cp312-*" + cibw-skip: "*-musllinux_*" + cibw-test-skip: "cp311-*" + cibw-before-all-linux: > + export CARGO_HOME=/opt/docvortex-cargo RUSTUP_HOME=/opt/docvortex-rustup; + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs + | sh -s -- -y --profile minimal --default-toolchain 1.98.1 + cibw-environment-linux: "PATH=\"/opt/docvortex-cargo/bin:$PATH\" CARGO_HOME=/opt/docvortex-cargo RUSTUP_HOME=/opt/docvortex-rustup" + # PyPI's newest pillow/numpy can be sdist-only on riscv64 while our + # registry still hosts the previous release's wheel (gotcha 354). + cibw-test-environment: "PIP_PREFER_BINARY=1" + # Upstream pins pypdfium2==5.13.0 because its golden fixtures + # (tests/fixtures/native_pdf_06_golden.json.gz) were generated with + # it, i.e. with PDFium 153.0.7999 from pdfium-binaries. The riscv64 + # 5.13.0 wheel on PyPI is instead a source build of the older PDFium + # 151.0.7913, whose FPDFText_GetFontWeight derives the weight from + # the font descriptor's StemV (250/440 instead of the golden's 400), + # failing test_real_font_and_geometry_bridge_parity[caibao1,demo2]. + # The riscv64 5.14.0 wheel bundles PDFium 156.0.8076, which matches + # the golden data (the whole suite also passes on x86_64 with + # 5.14.0), and is what `pypdfium2>=5.13.0,<6` resolves to anyway. + cibw-test-requires: "pytest psutil pypdfium2==5.14.0" + cibw-test-command: > + python {project}/tools/verify_native_wheel.py {project}/demo/pdfs/demo1.pdf && + python -m pytest + {project}/tests/test_native_parity.py + {project}/tests/test_rule_graphics_acceleration.py + {project}/tests/test_rule_text_acceleration.py + {project}/tests/test_rule_pixel_form_acceleration.py + {project}/tests/test_rule_layout_batch_acceleration.py + {project}/tests/test_rule_numeric_graphics_acceleration.py + {project}/tests/test_rule_fill_bands_acceleration.py + {project}/tests/test_native_statistics.py + {project}/tests/test_native_round3.py + {project}/tests/test_native_round4.py + {project}/tests/test_native_round5.py + {project}/tests/test_native_round6.py + {project}/tests/test_native_round7.py + {project}/tests/test_pdfium_bridge.py + {project}/tests/test_pdf_object_bridge.py + {project}/tests/test_pdf_classify_page_loading.py + {project}/tests/test_pdf_classify_resource_graph.py + {project}/tests/test_pdf_drawing_lines_extraction.py + {project}/tests/test_pdf_native_graphics_components.py + {project}/tests/unittest/test_flash_pdf_auxiliary_text.py + {project}/tests/test_pdf_snapshot.py + {project}/tests/test_native_inline_styles.py + {project}/tests/test_native_bitmap_crops.py + {project}/tests/test_pdf_render_session.py + {project}/tests/test_native_font_runtime.py + {project}/tests/test_native_text_pipeline.py + {project}/tests/test_native_text_snapshot.py + {project}/tests/test_native_classification.py + {project}/tests/test_native_image_text_classification.py + {project}/tests/unittest/test_pdf_classify_image_text.py + {project}/tests/unittest/test_flash_pdf_char_geometry.py + {project}/tests/test_native_table_candidates.py + {project}/tests/test_native_candidate_boundaries.py + {project}/tests/test_native_annotation_geometry.py + {project}/tests/unittest/test_native_pdf_table_demo_manifest.py + {project}/tests/test_pdf_analysis_api.py + {project}/tests/test_pdf_cpu_evidence.py + -q && + python {project}/tools/verify_native_wheel.py {project}/demo/pdfs/demo2.pdf && + python {project}/tools/verify_nonpdf_wheel.py --output {project}/build/nonpdf-cp311 --run-tests publish: name: Publish docvortex ${{ matrix.version }} diff --git a/.github/workflows/build-dust-riven.yml b/.github/workflows/build-dust-riven.yml index b74de7c95c0a..ebab7804019b 100644 --- a/.github/workflows/build-dust-riven.yml +++ b/.github/workflows/build-dust-riven.yml @@ -48,46 +48,28 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build dust-riven ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - DUST_RIVEN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout dust-riven ${{ env.DUST_RIVEN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Minh1billion/dust-riven - ref: v${{ env.DUST_RIVEN_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # dust-riven's pyproject.toml ships no [tool.cibuildwheel], so the - # Rust toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest pytest-asyncio - CIBW_TEST_COMMAND: >- - pytest {package}/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: dust-riven-${{ env.DUST_RIVEN_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "dust-riven" + version: "${{ matrix.version }}" + repository: "Minh1billion/dust-riven" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # dust-riven's pyproject.toml ships no [tool.cibuildwheel], so the + # Rust toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest pytest-asyncio" + cibw-test-command: > + pytest {package}/tests publish: name: Publish dust-riven ${{ matrix.version }} diff --git a/.github/workflows/build-eclipse-zenoh.yml b/.github/workflows/build-eclipse-zenoh.yml index 2c280bf88f11..a527aba783e6 100644 --- a/.github/workflows/build-eclipse-zenoh.yml +++ b/.github/workflows/build-eclipse-zenoh.yml @@ -53,64 +53,44 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build eclipse-zenoh ${{ matrix.version }} cp39-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 720 - - env: - ECLIPSE_ZENOH_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout zenoh-python ${{ env.ECLIPSE_ZENOH_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: eclipse-zenoh/zenoh-python - ref: ${{ env.ECLIPSE_ZENOH_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # pyo3's abi3-py39 feature makes this one wheel; it is built on cp39, - # the oldest interpreter its tag claims, and re-tested on the newer - # ones via find_compatible_wheel. cp314t is dropped: pyo3 0.25.1 - # predates CPython 3.14. musllinux is dropped: rustup.rs ships no - # riscv64 musl toolchain. - CIBW_BUILD: >- - cp39-manylinux_riscv64 cp312-manylinux_riscv64 - cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # zenoh-python ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here; the version is - # the one rust-toolchain.toml pins. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest fixtures - # The stubs are what tests/stubs_check.py reads; staged without the - # package's .py files so the installed wheel still wins the import. - CIBW_TEST_SOURCES: >- - tests zenoh/__init__.pyi zenoh/ext.pyi zenoh/handlers.pyi - zenoh/shm.pyi - # tests/examples_check.py is left out: it drives ~30 concurrent example - # processes over multicast scouting, which cross-talks between jobs on - # a shared runner. - CIBW_TEST_COMMAND: >- - python tests/stubs_check.py && - python -m pytest -v - tests/test_serializer.py - tests/test_cancellation_token.py - tests/test_session.py - tests/test_timestamp_stack.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: eclipse-zenoh-${{ env.ECLIPSE_ZENOH_VERSION }}-cp39-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "eclipse-zenoh" + version: "${{ matrix.version }}" + repository: "eclipse-zenoh/zenoh-python" + ref: "${{ matrix.version }}" + artifact-tag: "cp39-abi3-manylinux_riscv64" + timeout-minutes: 720 + # pyo3's abi3-py39 feature makes this one wheel; it is built on cp39, + # the oldest interpreter its tag claims, and re-tested on the newer + # ones via find_compatible_wheel. cp314t is dropped: pyo3 0.25.1 + # predates CPython 3.14. musllinux is dropped: rustup.rs ships no + # riscv64 musl toolchain. + cibw-build: > + cp39-manylinux_riscv64 cp312-manylinux_riscv64 + cp313-manylinux_riscv64 cp314-manylinux_riscv64 + # zenoh-python ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here; the version is + # the one rust-toolchain.toml pins. + 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\"" + cibw-test-requires: "pytest fixtures" + # The stubs are what tests/stubs_check.py reads; staged without the + # package's .py files so the installed wheel still wins the import. + cibw-test-sources: > + tests zenoh/__init__.pyi zenoh/ext.pyi zenoh/handlers.pyi + zenoh/shm.pyi + # tests/examples_check.py is left out: it drives ~30 concurrent example + # processes over multicast scouting, which cross-talks between jobs on + # a shared runner. + cibw-test-command: > + python tests/stubs_check.py && + python -m pytest -v + tests/test_serializer.py + tests/test_cancellation_token.py + tests/test_session.py + tests/test_timestamp_stack.py publish: name: Publish eclipse-zenoh ${{ matrix.version }} diff --git a/.github/workflows/build-editdistpy.yml b/.github/workflows/build-editdistpy.yml index de5a9ececfbd..e29d285d071d 100644 --- a/.github/workflows/build-editdistpy.yml +++ b/.github/workflows/build-editdistpy.yml @@ -49,45 +49,29 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build editdistpy ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - EDITDISTPY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout editdistpy v${{ env.EDITDISTPY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: mammothb/editdistpy - ref: v${{ env.EDITDISTPY_VERSION }} - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # editdistpy ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import editdistpy._editdistpy as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: editdistpy-${{ env.EDITDISTPY_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "editdistpy" + version: "${{ matrix.version }}" + repository: "mammothb/editdistpy" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # editdistpy ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import editdistpy._editdistpy as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest tests publish: name: Publish editdistpy ${{ matrix.version }} diff --git a/.github/workflows/build-fast-query-parsers.yml b/.github/workflows/build-fast-query-parsers.yml index 615dee04a8c8..da45dd02ee09 100644 --- a/.github/workflows/build-fast-query-parsers.yml +++ b/.github/workflows/build-fast-query-parsers.yml @@ -55,50 +55,32 @@ jobs: version: ${{ fromJSON(needs.setup.outputs.versions) }} platform: [manylinux, musllinux] name: Build fast-query-parsers ${{ matrix.version }} cp38-abi3-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 - - env: - FAST_QUERY_PARSERS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fast-query-parsers v${{ env.FAST_QUERY_PARSERS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: starlite-api/fast-query-parsers - ref: v${{ env.FAST_QUERY_PARSERS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # pyo3's abi3-py38 feature is on unconditionally; the image has no - # cp38, so the wheel is built on cp39 and re-tested on the rest. - CIBW_BUILD: >- - cp39-${{ matrix.platform }}_riscv64 cp310-${{ matrix.platform }}_riscv64 - cp311-${{ matrix.platform }}_riscv64 cp312-${{ matrix.platform }}_riscv64 - cp313-${{ matrix.platform }}_riscv64 cp314-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - 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 pins maturin<0.15 (2023), which has no riscv64 wheel - # and no riscv64 auditwheel policy; a current maturin builds this tree - # unmodified, so install one and skip isolation to bypass the pin. - CIBW_BEFORE_BUILD: pip install maturin - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fast-query-parsers-${{ env.FAST_QUERY_PARSERS_VERSION }}-cp38-abi3-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fast-query-parsers" + version: "${{ matrix.version }}" + repository: "starlite-api/fast-query-parsers" + ref: "v${{ matrix.version }}" + artifact-tag: "cp38-abi3-${{ matrix.platform }}_riscv64" + timeout-minutes: 120 + # pyo3's abi3-py38 feature is on unconditionally; the image has no + # cp38, so the wheel is built on cp39 and re-tested on the rest. + cibw-build: > + cp39-${{ matrix.platform }}_riscv64 cp310-${{ matrix.platform }}_riscv64 + cp311-${{ matrix.platform }}_riscv64 cp312-${{ matrix.platform }}_riscv64 + cp313-${{ matrix.platform }}_riscv64 cp314-${{ matrix.platform }}_riscv64 + cibw-musllinux-riscv64-image: "quay.io/pypa/musllinux_1_2_riscv64" + 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 pins maturin<0.15 (2023), which has no riscv64 wheel + # and no riscv64 auditwheel policy; a current maturin builds this tree + # unmodified, so install one and skip isolation to bypass the pin. + cibw-before-build: "pip install maturin" + cibw-build-frontend: "pip; args: --no-build-isolation" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -v tests" publish: name: Publish fast-query-parsers ${{ matrix.version }} diff --git a/.github/workflows/build-fast-walk.yml b/.github/workflows/build-fast-walk.yml index 07a50d606890..ac64dfb5847f 100644 --- a/.github/workflows/build-fast-walk.yml +++ b/.github/workflows/build-fast-walk.yml @@ -49,52 +49,34 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build fast-walk ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - FAST_WALK_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fast-walk v${{ env.FAST_WALK_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: reflex-dev/fast-walk - ref: v${{ env.FAST_WALK_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # fast-walk ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - # CPython 3.13 caps AST construction at a fixed C recursion limit of - # 10000 (on every arch), so ast.parse() of these 20000-deep chains - # raises RecursionError before fast-walk runs; 3.14+ checks real stack. - CIBW_TEST_COMMAND: >- - python -c "import fast_walk.fast_walk as ext; assert ext.__file__.endswith('.so'), ext.__file__" && - python -m pytest -v tests - ${{ matrix.python == 'cp313' && '--deselect tests/test_fields.py::test_fix_missing_locations_on_a_deep_chain --deselect tests/test_frontier.py::test_a_deep_chain_does_not_recurse' || '' }} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fast-walk-${{ env.FAST_WALK_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fast-walk" + version: "${{ matrix.version }}" + repository: "reflex-dev/fast-walk" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # fast-walk ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + # CPython 3.13 caps AST construction at a fixed C recursion limit of + # 10000 (on every arch), so ast.parse() of these 20000-deep chains + # raises RecursionError before fast-walk runs; 3.14+ checks real stack. + cibw-test-command: > + python -c "import fast_walk.fast_walk as ext; assert ext.__file__.endswith('.so'), ext.__file__" && + python -m pytest -v tests + ${{ matrix.python == 'cp313' && '--deselect tests/test_fields.py::test_fix_missing_locations_on_a_deep_chain --deselect tests/test_frontier.py::test_a_deep_chain_does_not_recurse' || '' }} publish: name: Publish fast-walk ${{ matrix.version }} diff --git a/.github/workflows/build-fastbloom-rs.yml b/.github/workflows/build-fastbloom-rs.yml index 6379cc8de7f7..3f2784e36d16 100644 --- a/.github/workflows/build-fastbloom-rs.yml +++ b/.github/workflows/build-fastbloom-rs.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build fastbloom-rs ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -72,54 +70,38 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - FASTBLOOM_RS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fastbloom py-v${{ env.FASTBLOOM_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: yankun1992/fastbloom - ref: py-v${{ env.FASTBLOOM_RS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # fastbloom-rs ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - # The repo root holds a conda-based dev helper named build.py, which - # shadows the `build` module under cibuildwheel's default - # `python -m build` frontend (cwd=/project; gotcha 102): it runs - # `conda activate ...` via os.system, exits 0, and no wheel is - # produced. pip is unaffected. pyproject.toml also pins - # maturin==1.8.7, which has no riscv64 wheel on PyPI or our index, - # so install a current maturin (riscv64 wheel available) and skip - # build isolation to bypass the pin (build-base2048.yml precedent). - CIBW_BEFORE_BUILD: pip install maturin - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: py_tests - # test_bench.py is excluded: it imports the optional pybloom_live - # comparison dependency (pyproject.toml's `test` extra), not - # installed here. The other three files cover the real API. - CIBW_TEST_COMMAND: >- - python -c "import fastbloom_rs.fastbloom_rs as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest {project}/py_tests/test_bloom.py {project}/py_tests/test_counting_bloom_filter.py {project}/py_tests/test_save_file.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fastbloom-rs-${{ env.FASTBLOOM_RS_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fastbloom-rs" + version: "${{ matrix.version }}" + repository: "yankun1992/fastbloom" + ref: "py-v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # fastbloom-rs ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + # The repo root holds a conda-based dev helper named build.py, which + # shadows the `build` module under cibuildwheel's default + # `python -m build` frontend (cwd=/project; gotcha 102): it runs + # `conda activate ...` via os.system, exits 0, and no wheel is + # produced. pip is unaffected. pyproject.toml also pins + # maturin==1.8.7, which has no riscv64 wheel on PyPI or our index, + # so install a current maturin (riscv64 wheel available) and skip + # build isolation to bypass the pin (build-base2048.yml precedent). + cibw-before-build: "pip install maturin" + cibw-build-frontend: "pip; args: --no-build-isolation" + cibw-test-requires: "pytest" + cibw-test-sources: "py_tests" + # test_bench.py is excluded: it imports the optional pybloom_live + # comparison dependency (pyproject.toml's `test` extra), not + # installed here. The other three files cover the real API. + cibw-test-command: > + python -c "import fastbloom_rs.fastbloom_rs as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest {project}/py_tests/test_bloom.py {project}/py_tests/test_counting_bloom_filter.py {project}/py_tests/test_save_file.py publish: name: Publish fastbloom-rs ${{ matrix.version }} diff --git a/.github/workflows/build-fastdigest.yml b/.github/workflows/build-fastdigest.yml index 405049d111a9..5f4dfa497d0f 100644 --- a/.github/workflows/build-fastdigest.yml +++ b/.github/workflows/build-fastdigest.yml @@ -49,52 +49,34 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build fastdigest ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - FASTDIGEST_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fastdigest v${{ env.FASTDIGEST_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: moritzmucha/fastdigest - ref: v${{ env.FASTDIGEST_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # fastdigest ships no [tool.cibuildwheel]; the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - # fastdigest's pyproject.toml has no python-source; maturin auto-generates - # a fastdigest/__init__.py shim ("from .fastdigest import *") around the - # compiled fastdigest.fastdigest submodule, so that's the .so to check. - # No CIBW_TEST_SOURCES needed: the checkout has no fastdigest/ directory - # at its root to shadow the installed wheel. - CIBW_TEST_COMMAND: >- - python -c "import fastdigest.fastdigest as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest {project}/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fastdigest-${{ env.FASTDIGEST_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fastdigest" + version: "${{ matrix.version }}" + repository: "moritzmucha/fastdigest" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # fastdigest ships no [tool.cibuildwheel]; the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + # fastdigest's pyproject.toml has no python-source; maturin auto-generates + # a fastdigest/__init__.py shim ("from .fastdigest import *") around the + # compiled fastdigest.fastdigest submodule, so that's the .so to check. + # No CIBW_TEST_SOURCES needed: the checkout has no fastdigest/ directory + # at its root to shadow the installed wheel. + cibw-test-command: > + python -c "import fastdigest.fastdigest as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest {project}/tests publish: name: Publish fastdigest ${{ matrix.version }} diff --git a/.github/workflows/build-faster-eth-utils.yml b/.github/workflows/build-faster-eth-utils.yml index b1485e789b93..3e644e5691dd 100644 --- a/.github/workflows/build-faster-eth-utils.yml +++ b/.github/workflows/build-faster-eth-utils.yml @@ -48,48 +48,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build faster-eth-utils ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - FASTER_ETH_UTILS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout faster-eth-utils ${{ env.FASTER_ETH_UTILS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: BobTheBuidler/faster-eth-utils - ref: v${{ env.FASTER_ETH_UTILS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # test's hypothesis>=4.43.0 otherwise resolves to the newest PyPI release, not - # the newest one with a wheel; that release builds from sdist via maturin and - # fails (gotcha 210 -- riscv64 isn't a target rustup's own triple-probe knows). - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=hypothesis - CIBW_TEST_EXTRAS: test - CIBW_TEST_REQUIRES: eth-hash[pycryptodome] - CIBW_TEST_SOURCES: tests fixtures build pyproject.toml - # Upstream tests via tox (tox.ini core env), not in cibuildwheel; the import assert catches a pure-Python wheel. - CIBW_TEST_COMMAND: >- - python -c "import faster_eth_utils.abi as m; assert m.__file__.endswith('.so'), m.__file__" - && python -m pytest tests/core - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: faster-eth-utils-${{ env.FASTER_ETH_UTILS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "faster-eth-utils" + version: "${{ matrix.version }}" + repository: "BobTheBuidler/faster-eth-utils" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # test's hypothesis>=4.43.0 otherwise resolves to the newest PyPI release, not + # the newest one with a wheel; that release builds from sdist via maturin and + # fails (gotcha 210 -- riscv64 isn't a target rustup's own triple-probe knows). + cibw-test-environment: "PIP_ONLY_BINARY=hypothesis" + cibw-test-extras: "test" + cibw-test-requires: "eth-hash[pycryptodome]" + cibw-test-sources: "tests fixtures build pyproject.toml" + # Upstream tests via tox (tox.ini core env), not in cibuildwheel; the import assert catches a pure-Python wheel. + cibw-test-command: > + python -c "import faster_eth_utils.abi as m; assert m.__file__.endswith('.so'), m.__file__" + && python -m pytest tests/core publish: name: Publish faster-eth-utils ${{ matrix.version }} diff --git a/.github/workflows/build-fastexcel.yml b/.github/workflows/build-fastexcel.yml index 27dd709686a5..f055ad997e82 100644 --- a/.github/workflows/build-fastexcel.yml +++ b/.github/workflows/build-fastexcel.yml @@ -53,58 +53,39 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build fastexcel ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - env: - FASTEXCEL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fastexcel v${{ env.FASTEXCEL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ToucanToco/fastexcel - ref: v${{ env.FASTEXCEL_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # abi3-py310 (Cargo.toml) collapses cp310-cp313 into one build+reuse - # (gotcha 11/96); cp314t is a genuine separate build since pyo3 disables - # abi3 under Py_GIL_DISABLED. musllinux is dropped: rustup.rs ships no - # riscv64 musl toolchain. - CIBW_BUILD: >- - cp310-manylinux_riscv64 cp311-manylinux_riscv64 cp312-manylinux_riscv64 - cp313-manylinux_riscv64 cp314t-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # fastexcel ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=pandas,pyarrow,numpy,polars-runtime-32 - # pyarrow has no riscv64 wheel below cp312 and pandas has none for - # cp314t on our registry yet, and both are needed transitively by - # every test module's shared tests/utils.py; skip those identifiers. - CIBW_TEST_SKIP: cp310-* cp311-* cp314t-* - CIBW_TEST_REQUIRES: >- - pytest>=7.1.3 pandas>=1.4.4 pyarrow>=8.0.0 polars>=1 - openpyxl>=3.1.2,<4 xlrd>=2.0.1,<3 - CIBW_TEST_SOURCES: python/tests tests/fixtures pyproject.toml - CIBW_TEST_COMMAND: >- - python -c "import fastexcel._fastexcel as m; - assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v python/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fastexcel-${{ env.FASTEXCEL_VERSION }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fastexcel" + version: "${{ matrix.version }}" + repository: "ToucanToco/fastexcel" + ref: "v${{ matrix.version }}" + artifact-tag: "manylinux_riscv64" + timeout-minutes: 360 + # abi3-py310 (Cargo.toml) collapses cp310-cp313 into one build+reuse + # (gotcha 11/96); cp314t is a genuine separate build since pyo3 disables + # abi3 under Py_GIL_DISABLED. musllinux is dropped: rustup.rs ships no + # riscv64 musl toolchain. + cibw-build: > + cp310-manylinux_riscv64 cp311-manylinux_riscv64 cp312-manylinux_riscv64 + cp313-manylinux_riscv64 cp314t-manylinux_riscv64 + # fastexcel ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-environment: "PIP_ONLY_BINARY=pandas,pyarrow,numpy,polars-runtime-32" + # pyarrow has no riscv64 wheel below cp312 and pandas has none for + # cp314t on our registry yet, and both are needed transitively by + # every test module's shared tests/utils.py; skip those identifiers. + cibw-test-skip: "cp310-* cp311-* cp314t-*" + cibw-test-requires: > + pytest>=7.1.3 pandas>=1.4.4 pyarrow>=8.0.0 polars>=1 + openpyxl>=3.1.2,<4 xlrd>=2.0.1,<3 + cibw-test-sources: "python/tests tests/fixtures pyproject.toml" + cibw-test-command: > + python -c "import fastexcel._fastexcel as m; + assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v python/tests publish: name: Publish fastexcel ${{ matrix.version }} diff --git a/.github/workflows/build-fastnanoid.yml b/.github/workflows/build-fastnanoid.yml index 8a3ca243c22b..063189ea57e6 100644 --- a/.github/workflows/build-fastnanoid.yml +++ b/.github/workflows/build-fastnanoid.yml @@ -49,48 +49,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build fastnanoid ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - FASTNANOID_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fastnanoid v${{ env.FASTNANOID_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: oliverlambson/fastnanoid - ref: v${{ env.FASTNANOID_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # fastnanoid ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import fastnanoid.fastnanoid as ext; assert ext.__file__.endswith('.so'), ext.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fastnanoid-${{ env.FASTNANOID_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fastnanoid" + version: "${{ matrix.version }}" + repository: "oliverlambson/fastnanoid" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # fastnanoid ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import fastnanoid.fastnanoid as ext; assert ext.__file__.endswith('.so'), ext.__file__" && + python -m pytest -v tests publish: name: Publish fastnanoid ${{ matrix.version }} diff --git a/.github/workflows/build-flashtext2.yml b/.github/workflows/build-flashtext2.yml index 8e77ee0afa47..4623af731b54 100644 --- a/.github/workflows/build-flashtext2.yml +++ b/.github/workflows/build-flashtext2.yml @@ -49,53 +49,37 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build flashtext2 ${{ matrix.version }} cp38-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 - strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - FLASHTEXT2_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout flashtext2 v${{ env.FLASHTEXT2_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: shner-elmo/flashtext2 - ref: v${{ env.FLASHTEXT2_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - # pyo3's abi3-py38 feature is on unconditionally, so one abi3 wheel - # serves every GIL-ful interpreter; built once on the oldest listed - # identifier and re-tested on the newer ones via find_compatible_wheel. - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: >- - cp312-manylinux_riscv64 cp313-manylinux_riscv64 - cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # flashtext2 ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import flashtext2, importlib.metadata as md; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('flashtext2'))" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: flashtext2-${{ env.FLASHTEXT2_VERSION }}-cp38-abi3-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "flashtext2" + version: "${{ matrix.version }}" + repository: "shner-elmo/flashtext2" + ref: "v${{ matrix.version }}" + artifact-tag: "cp38-abi3-manylinux_riscv64" + timeout-minutes: 120 + # pyo3's abi3-py38 feature is on unconditionally, so one abi3 wheel + # serves every GIL-ful interpreter; built once on the oldest listed + # identifier and re-tested on the newer ones via find_compatible_wheel. + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: > + cp312-manylinux_riscv64 cp313-manylinux_riscv64 + cp314-manylinux_riscv64 + # flashtext2 ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import flashtext2, importlib.metadata as md; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('flashtext2'))" && + python -m pytest -v tests publish: name: Publish flashtext2 ${{ matrix.version }} diff --git a/.github/workflows/build-fonttools.yml b/.github/workflows/build-fonttools.yml index 66adf284331e..f545a0cd2a30 100644 --- a/.github/workflows/build-fonttools.yml +++ b/.github/workflows/build-fonttools.yml @@ -51,48 +51,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build fonttools ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - FONTTOOLS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout fonttools ${{ env.FONTTOOLS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: fonttools/fonttools - ref: ${{ env.FONTTOOLS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Force the Cython extensions to compile (else setup.py ships a pure wheel). - CIBW_ENVIRONMENT: FONTTOOLS_WITH_CYTHON=1 - # setup.py's setup_requires fetches Cython via easy_install (ignores pip - # pins), so preinstall the pinned one and disable isolation to use it. - CIBW_BEFORE_BUILD: pip install "${CYTHON_SPEC}" setuptools wheel - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_ENVIRONMENT_PASS_LINUX: CYTHON_SPEC - # Upstream's wheels.yml test command: asserts extensions compiled, then - # runs the full suite with no optional extras (several lack riscv64 wheels). - CIBW_TEST_REQUIRES: tox - CIBW_TEST_COMMAND: "tox -c {package}/tox.ini -e py-cy-noextra --installpkg {wheel}" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: fonttools-${{ env.FONTTOOLS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "fonttools" + version: "${{ matrix.version }}" + repository: "fonttools/fonttools" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Force the Cython extensions to compile (else setup.py ships a pure wheel). + cibw-environment-linux: "CYTHON_SPEC=cython<3.3.0 FONTTOOLS_WITH_CYTHON=1" + # setup.py's setup_requires fetches Cython via easy_install (ignores pip + # pins), so preinstall the pinned one and disable isolation to use it. + cibw-before-build: "pip install \"${CYTHON_SPEC}\" setuptools wheel" + cibw-build-frontend: "pip; args: --no-build-isolation" + # Upstream's wheels.yml test command: asserts extensions compiled, then + # runs the full suite with no optional extras (several lack riscv64 wheels). + cibw-test-requires: "tox" + cibw-test-command: "tox -c {package}/tox.ini -e py-cy-noextra --installpkg {wheel}" publish: name: Publish fonttools ${{ matrix.version }} diff --git a/.github/workflows/build-gigatoken.yml b/.github/workflows/build-gigatoken.yml index 2408aad6555e..e38983bb720a 100644 --- a/.github/workflows/build-gigatoken.yml +++ b/.github/workflows/build-gigatoken.yml @@ -54,75 +54,54 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build gigatoken ${{ matrix.version }} cp310-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 1440 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - GIGATOKEN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout gigatoken v${{ env.GIGATOKEN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: marcelroed/gigatoken - ref: ${{ env.GIGATOKEN_REF }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # pyo3 carries an explicit `abi3-py310` feature (Cargo.toml), so - # maturin always tags the wheel cp310-abi3 regardless of which - # interpreter compiles it - matching the one Linux wheel upstream - # publishes per arch (verified locally: a maturin build under - # CPython 3.11 still emits cp310-abi3). numpy and awkward-cpp have - # no riscv64 wheel below cp312 (PyPI or this registry), so cp312 is - # built and cp313/cp314 reuse+retest that wheel (find_compatible_wheel). - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # gigatoken's `#![feature(portable_simd)]` (src/lib.rs) needs nightly. - # Pinned to the exact date validated locally (cargo build+link for - # riscv64gc-unknown-linux-gnu succeeded end to end under it) rather - # than floating the bare "nightly" channel rust-toolchain.toml - # requests, which is unbounded build-tool drift (gotcha 59). - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal --default-toolchain nightly-2026-10-14 - CIBW_ENVIRONMENT: >- - PATH="$PATH:$HOME/.cargo/bin" - RUSTUP_TOOLCHAIN=nightly-2026-10-14 - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Force wheels-only in the test phase (gotcha 12) so the runtime - # closure (numpy, awkward, awkward-cpp, typer) must resolve as - # riscv64 wheels. awkward's latest release (2.14.0) pins - # awkward-cpp==57, not yet published for riscv64 on this registry; - # 2.13.0 is the newest release pinning the already-published - # awkward-cpp==56, so pre-install it before cibuildwheel's own wheel - # install resolves gigatoken's ">=2.6.3" constraint against it. - CIBW_TEST_ENVIRONMENT: >- - PIP_ONLY_BINARY=:all: - CIBW_BEFORE_TEST: >- - pip install --only-binary=:all: - --extra-index-url https://pypi.riseproject.dev/simple/ 'awkward==2.13.0' - # Mirrors upstream's own test-wheels smoke test (wheels.yml). - CIBW_TEST_COMMAND: >- - python -c "import gigatoken; - tokens = list(gigatoken.pretokenizer(b'Hello, world!')); - assert b''.join(tokens) == b'Hello, world!', tokens; - print('gigatoken OK:', tokens)" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: gigatoken-${{ env.GIGATOKEN_VERSION }}-cp310-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "gigatoken" + version: "${{ matrix.version }}" + repository: "marcelroed/gigatoken" + ref: "34a1599f0c0ae7d7cd0d1c530e6522320158b360" + artifact-tag: "cp310-abi3-manylinux_riscv64" + timeout-minutes: 1440 + # pyo3 carries an explicit `abi3-py310` feature (Cargo.toml), so + # maturin always tags the wheel cp310-abi3 regardless of which + # interpreter compiles it - matching the one Linux wheel upstream + # publishes per arch (verified locally: a maturin build under + # CPython 3.11 still emits cp310-abi3). numpy and awkward-cpp have + # no riscv64 wheel below cp312 (PyPI or this registry), so cp312 is + # built and cp313/cp314 reuse+retest that wheel (find_compatible_wheel). + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64" + # gigatoken's `#![feature(portable_simd)]` (src/lib.rs) needs nightly. + # Pinned to the exact date validated locally (cargo build+link for + # riscv64gc-unknown-linux-gnu succeeded end to end under it) rather + # than floating the bare "nightly" channel rust-toolchain.toml + # requests, which is unbounded build-tool drift (gotcha 59). + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal --default-toolchain nightly-2026-10-14 + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" RUSTUP_TOOLCHAIN=nightly-2026-10-14" + # Force wheels-only in the test phase (gotcha 12) so the runtime + # closure (numpy, awkward, awkward-cpp, typer) must resolve as + # riscv64 wheels. awkward's latest release (2.14.0) pins + # awkward-cpp==57, not yet published for riscv64 on this registry; + # 2.13.0 is the newest release pinning the already-published + # awkward-cpp==56, so pre-install it before cibuildwheel's own wheel + # install resolves gigatoken's ">=2.6.3" constraint against it. + cibw-test-environment: "PIP_ONLY_BINARY=:all:" + cibw-before-test: > + pip install --only-binary=:all: + --extra-index-url https://pypi.riseproject.dev/simple/ 'awkward==2.13.0' + # Mirrors upstream's own test-wheels smoke test (wheels.yml). + cibw-test-command: > + python -c "import gigatoken; + tokens = list(gigatoken.pretokenizer(b'Hello, world!')); + assert b''.join(tokens) == b'Hello, world!', tokens; + print('gigatoken OK:', tokens)" publish: name: Publish gigatoken ${{ matrix.version }} diff --git a/.github/workflows/build-gnureadline.yml b/.github/workflows/build-gnureadline.yml index 42c84e0ee85b..e0575029ad81 100644 --- a/.github/workflows/build-gnureadline.yml +++ b/.github/workflows/build-gnureadline.yml @@ -49,41 +49,23 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build gnureadline ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - GNUREADLINE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout gnureadline v${{ env.GNUREADLINE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ludwigschwardt/python-gnureadline - ref: v${{ env.GNUREADLINE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Matches upstream's own wheels.yaml test override (its pyproject.toml - # default of a full pytest run is for local/tox use). - CIBW_TEST_REQUIRES: "" - CIBW_TEST_COMMAND: python -c "import gnureadline" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: gnureadline-${{ env.GNUREADLINE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "gnureadline" + version: "${{ matrix.version }}" + repository: "ludwigschwardt/python-gnureadline" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Matches upstream's own wheels.yaml test override (its pyproject.toml + # default of a full pytest run is for local/tox use). + cibw-test-requires: '' + cibw-test-command: "python -c \"import gnureadline\"" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-google-crc32c.yml b/.github/workflows/build-google-crc32c.yml index 4b4ce4e236f0..cf519736b8a8 100644 --- a/.github/workflows/build-google-crc32c.yml +++ b/.github/workflows/build-google-crc32c.yml @@ -48,61 +48,44 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build google-crc32c ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - GOOGLE_CRC32C_VERSION: ${{ matrix.version }} - - steps: - # googleapis/python-crc32c was archived after 1.8.0; the package now - # lives in the google-cloud-python monorepo under per-package tags. - - name: Checkout google-cloud-python google-crc32c-v${{ env.GOOGLE_CRC32C_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: googleapis/google-cloud-python - ref: google-crc32c-v${{ env.GOOGLE_CRC32C_VERSION }} - sparse-checkout: packages/google-crc32c - submodules: recursive - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: packages/google-crc32c - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Build libcrc32c into the default prefix so setup.py's -lcrc32c resolves. - # POLICY_VERSION_MINIMUM: the pinned crc32c still declares cmake_minimum 3.1. - CIBW_BEFORE_ALL_LINUX: >- - cmake -S {project}/packages/google-crc32c/google_crc32c -B /tmp/crc32c-build - -DCMAKE_BUILD_TYPE=Release - -DCRC32C_BUILD_TESTS=no - -DCRC32C_BUILD_BENCHMARKS=no - -DBUILD_SHARED_LIBS=yes - -DCMAKE_POLICY_VERSION_MINIMUM=3.12 - && - cmake --build /tmp/crc32c-build --target install -j4 - && - ldconfig - # Force the C extension; without this setup.py silently ships a pure-Python - # wheel on any compile/link failure (gotcha 20). - CIBW_ENVIRONMENT: CRC32C_PURE_PYTHON=0 - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: >- - python -c "import google_crc32c; assert google_crc32c.implementation == 'c', google_crc32c.implementation" && - pytest -v {package}/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: google-crc32c-${{ env.GOOGLE_CRC32C_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # googleapis/python-crc32c was archived after 1.8.0; the package now + # lives in the google-cloud-python monorepo under per-package tags. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "google-crc32c" + version: "${{ matrix.version }}" + repository: "googleapis/google-cloud-python" + ref: "google-crc32c-v${{ matrix.version }}" + checkout-sparse-checkout: "packages/google-crc32c" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + checkout-submodules: "recursive" + cibw-package-dir: "packages/google-crc32c" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Build libcrc32c into the default prefix so setup.py's -lcrc32c resolves. + # POLICY_VERSION_MINIMUM: the pinned crc32c still declares cmake_minimum 3.1. + cibw-before-all-linux: > + cmake -S {project}/packages/google-crc32c/google_crc32c -B /tmp/crc32c-build + -DCMAKE_BUILD_TYPE=Release + -DCRC32C_BUILD_TESTS=no + -DCRC32C_BUILD_BENCHMARKS=no + -DBUILD_SHARED_LIBS=yes + -DCMAKE_POLICY_VERSION_MINIMUM=3.12 + && + cmake --build /tmp/crc32c-build --target install -j4 + && + ldconfig + # Force the C extension; without this setup.py silently ships a pure-Python + # wheel on any compile/link failure (gotcha 20). + cibw-environment-linux: "CRC32C_PURE_PYTHON=0" + cibw-test-requires: "pytest" + cibw-test-command: > + python -c "import google_crc32c; assert google_crc32c.implementation == 'c', google_crc32c.implementation" && + pytest -v {package}/tests publish: name: Publish google-crc32c ${{ matrix.version }} diff --git a/.github/workflows/build-grimp.yml b/.github/workflows/build-grimp.yml index ad06cac46e0c..3c17ae590fa5 100644 --- a/.github/workflows/build-grimp.yml +++ b/.github/workflows/build-grimp.yml @@ -48,60 +48,41 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build grimp ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - GRIMP_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout grimp ${{ env.GRIMP_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: python-grimp/grimp - # Upstream tags a release some time after publishing it to PyPI: 3.18 is on PyPI - # (its sdist is identical to the head of upstream's release-v3.18 branch, this - # commit) but there is no v3.18 tag yet. Pin that commit for it; drop the entry - # once the tag exists. - ref: ${{ matrix.version == '3.18' && 'c019ec78ecad8990989464cf7eab8ec23d4775ab' || format('v{0}', matrix.version) }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # grimp ships no [tool.cibuildwheel], so the Rust toolchain its maturin - # backend needs is installed in-container here. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # PIP_EXTRA_INDEX_URL resolves the riscv64 PyYAML wheel from our registry - # (PyYAML ships no py3-none-any wheel). - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Upstream's `just test-python` is `pytest --benchmark-skip` against the - # dev dependency group; the pinned third-party packages are the ones its - # snapshot tests build graphs from, so their versions are load-bearing. - CIBW_TEST_REQUIRES: >- - pytest pytest-benchmark syrupy pyyaml - Django==4.2.17 flask==3.0.3 requests==2.32.3 sqlalchemy==2.0.35 - google-cloud-audit-log==0.3.0 - CIBW_TEST_SOURCES: tests pyproject.toml - CIBW_TEST_COMMAND: python -m pytest --benchmark-skip - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: grimp-${{ env.GRIMP_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # Upstream tags a release some time after publishing it to PyPI: 3.18 is on PyPI + # (its sdist is identical to the head of upstream's release-v3.18 branch, this + # commit) but there is no v3.18 tag yet. Pin that commit for it; drop the entry + # once the tag exists. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "grimp" + version: "${{ matrix.version }}" + repository: "python-grimp/grimp" + ref: "${{ matrix.version == '3.18' && 'c019ec78ecad8990989464cf7eab8ec23d4775ab' || format('v{0}', matrix.version) }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # grimp ships no [tool.cibuildwheel], so the Rust toolchain its maturin + # backend needs is installed in-container here. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + # PIP_EXTRA_INDEX_URL resolves the riscv64 PyYAML wheel from our registry + # (PyYAML ships no py3-none-any wheel). + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + # Upstream's `just test-python` is `pytest --benchmark-skip` against the + # dev dependency group; the pinned third-party packages are the ones its + # snapshot tests build graphs from, so their versions are load-bearing. + cibw-test-requires: > + pytest pytest-benchmark syrupy pyyaml + Django==4.2.17 flask==3.0.3 requests==2.32.3 sqlalchemy==2.0.35 + google-cloud-audit-log==0.3.0 + cibw-test-sources: "tests pyproject.toml" + cibw-test-command: "python -m pytest --benchmark-skip" publish: name: Publish grimp ${{ matrix.version }} diff --git a/.github/workflows/build-headroom-ai.yml b/.github/workflows/build-headroom-ai.yml index 9b20fc002db8..b7cad1001a3a 100644 --- a/.github/workflows/build-headroom-ai.yml +++ b/.github/workflows/build-headroom-ai.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build headroom-ai ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 1440 strategy: fail-fast: false matrix: @@ -69,45 +67,29 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - HEADROOM_AI_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout headroom v${{ env.HEADROOM_AI_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: chopratejas/headroom - ref: v${{ env.HEADROOM_AI_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # headroom ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Mirrors upstream's own per-wheel smoke-import gate - # (release.yml's smoke-import-wheels job): import the package and - # its compiled extension, nothing from the 175k-line source-tree - # pytest suite (which needs the proxy/ml/evals extras and a live - # checkout, and belongs to upstream's ci.yml, not the wheel matrix). - CIBW_TEST_COMMAND: >- - python -c "import headroom._core as m; assert m.__file__.endswith('.so'), m.__file__" - && python -c "from headroom._core import hello; assert hello() == 'headroom-core', hello()" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: headroom-ai-${{ env.HEADROOM_AI_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "headroom-ai" + version: "${{ matrix.version }}" + repository: "chopratejas/headroom" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 1440 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # headroom ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + # Mirrors upstream's own per-wheel smoke-import gate + # (release.yml's smoke-import-wheels job): import the package and + # its compiled extension, nothing from the 175k-line source-tree + # pytest suite (which needs the proxy/ml/evals extras and a live + # checkout, and belongs to upstream's ci.yml, not the wheel matrix). + cibw-test-command: > + python -c "import headroom._core as m; assert m.__file__.endswith('.so'), m.__file__" + && python -c "from headroom._core import hello; assert hello() == 'headroom-core', hello()" publish: name: Publish headroom-ai ${{ matrix.version }} diff --git a/.github/workflows/build-hogql-parser-rs.yml b/.github/workflows/build-hogql-parser-rs.yml index 1e03eb15478e..4d364c4f2410 100644 --- a/.github/workflows/build-hogql-parser-rs.yml +++ b/.github/workflows/build-hogql-parser-rs.yml @@ -56,50 +56,31 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build hogql-parser-rs ${{ matrix.version }} cp312-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 - - env: - HOGQL_PARSER_RS_VERSION: ${{ matrix.version }} - - steps: - # The crate lives at rust/hogql/parser inside an ~80-member Cargo - # workspace (rust/Cargo.toml); sparse-checkout skips the rest of the - # multi-GB posthog monorepo (Django app, frontend, ...). - - name: Checkout posthog rust/ workspace - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: PostHog/posthog - ref: ${{ env.HOGQL_PARSER_RS_REF }} - sparse-checkout: rust - persist-credentials: false - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: rust/hogql/parser - output-dir: wheelhouse/ - # pyo3 carries abi3-py312 unconditionally, so one cp312-abi3 wheel - # covers every interpreter, matching upstream's own PyPI wheels. - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: cp312-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - 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" - CIBW_TEST_COMMAND: >- - python -c "import hogql_parser_rs as m; - assert m.hogql_parser_rs.__file__.endswith('.so'), m.hogql_parser_rs.__file__; - import json; - r = json.loads(m.parse_expr_json('1 + 2')); - assert r.get('error') is not True, r" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: hogql-parser-rs-${{ env.HOGQL_PARSER_RS_VERSION }}-cp312-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # The crate lives at rust/hogql/parser inside an ~80-member Cargo + # workspace (rust/Cargo.toml); sparse-checkout skips the rest of the + # multi-GB posthog monorepo (Django app, frontend, ...). + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "hogql-parser-rs" + version: "${{ matrix.version }}" + repository: "PostHog/posthog" + ref: "c30d2736928729ea424b08003c9cea2006b7606b" + checkout-sparse-checkout: "rust" + artifact-tag: "cp312-abi3-manylinux_riscv64" + cibw-package-dir: "rust/hogql/parser" + # pyo3 carries abi3-py312 unconditionally, so one cp312-abi3 wheel + # covers every interpreter, matching upstream's own PyPI wheels. + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "cp312-manylinux_riscv64" + 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\"" + cibw-test-command: > + python -c "import hogql_parser_rs as m; + assert m.hogql_parser_rs.__file__.endswith('.so'), m.hogql_parser_rs.__file__; + import json; + r = json.loads(m.parse_expr_json('1 + 2')); + assert r.get('error') is not True, r" publish: name: Publish hogql-parser-rs ${{ matrix.version }} diff --git a/.github/workflows/build-html-to-markdown.yml b/.github/workflows/build-html-to-markdown.yml index ba0c1f0fb78a..4b661260e507 100644 --- a/.github/workflows/build-html-to-markdown.yml +++ b/.github/workflows/build-html-to-markdown.yml @@ -53,68 +53,50 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build html-to-markdown ${{ matrix.version }} cp310-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 - env: - HTML_TO_MARKDOWN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout html-to-markdown v${{ env.HTML_TO_MARKDOWN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: xberg-io/html-to-markdown - ref: v${{ env.HTML_TO_MARKDOWN_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: packages/python - output-dir: wheelhouse/ - env: - # abi3-py310 is baked unconditionally into packages/python/pyproject.toml's - # [tool.maturin] features, so one wheel serves every interpreter below; - # there is no free-threaded build (pyo3 abi3 can't target Py_GIL_DISABLED, - # and upstream itself ships no cp314t wheel). - CIBW_BUILD: >- - cp310-manylinux_riscv64 cp311-manylinux_riscv64 - cp312-manylinux_riscv64 cp313-manylinux_riscv64 - cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # html-to-markdown ships no [tool.cibuildwheel]; the Rust toolchain its - # maturin backend needs is installed in-container here, same as upstream's - # own cibw-before-build-linux (publish.yaml's python-wheels job). - 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" - # Mirrors scripts/prepare_wheel.py, which upstream's own before-build also - # runs: it cargo-builds the standalone CLI binary and bundles it into - # html_to_markdown/bin and the wheel's .data/scripts before maturin builds - # the extension module. - CIBW_BEFORE_BUILD_LINUX: >- - pip install maturin uv && - python scripts/prepare_wheel.py - CIBW_TEST_REQUIRES: pytest pytest-asyncio pytest-timeout - CIBW_TEST_SOURCES: >- - e2e/python/conftest.py e2e/python/pyproject.toml e2e/python/tests - # test_options_preprocessing_{aggressive,minimal} raise - # NameError: name 'PreprocessingPreset' is not defined at v3.12.0: the - # test module's import line omits PreprocessingPreset even though it's - # used later in the file and is exported by html_to_markdown.__init__; - # upstream's main branch already carries the fixed import, just not yet - # in a tagged release. Fails identically on every architecture. - CIBW_TEST_COMMAND: >- - python -c "import html_to_markdown._html_to_markdown as m; - assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v e2e/python/tests - -k "not test_options_preprocessing_aggressive and not test_options_preprocessing_minimal" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: html-to-markdown-${{ env.HTML_TO_MARKDOWN_VERSION }}-cp310-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "html-to-markdown" + version: "${{ matrix.version }}" + repository: "xberg-io/html-to-markdown" + ref: "v${{ matrix.version }}" + artifact-tag: "cp310-abi3-manylinux_riscv64" + timeout-minutes: 180 + cibw-package-dir: "packages/python" + # abi3-py310 is baked unconditionally into packages/python/pyproject.toml's + # [tool.maturin] features, so one wheel serves every interpreter below; + # there is no free-threaded build (pyo3 abi3 can't target Py_GIL_DISABLED, + # and upstream itself ships no cp314t wheel). + cibw-build: > + cp310-manylinux_riscv64 cp311-manylinux_riscv64 + cp312-manylinux_riscv64 cp313-manylinux_riscv64 + cp314-manylinux_riscv64 + # html-to-markdown ships no [tool.cibuildwheel]; the Rust toolchain its + # maturin backend needs is installed in-container here, same as upstream's + # own cibw-before-build-linux (publish.yaml's python-wheels job). + 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\"" + # Mirrors scripts/prepare_wheel.py, which upstream's own before-build also + # runs: it cargo-builds the standalone CLI binary and bundles it into + # html_to_markdown/bin and the wheel's .data/scripts before maturin builds + # the extension module. + cibw-before-build-linux: > + pip install maturin uv && + python scripts/prepare_wheel.py + cibw-test-requires: "pytest pytest-asyncio pytest-timeout" + cibw-test-sources: > + e2e/python/conftest.py e2e/python/pyproject.toml e2e/python/tests + # test_options_preprocessing_{aggressive,minimal} raise + # NameError: name 'PreprocessingPreset' is not defined at v3.12.0: the + # test module's import line omits PreprocessingPreset even though it's + # used later in the file and is exported by html_to_markdown.__init__; + # upstream's main branch already carries the fixed import, just not yet + # in a tagged release. Fails identically on every architecture. + cibw-test-command: > + python -c "import html_to_markdown._html_to_markdown as m; + assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v e2e/python/tests + -k "not test_options_preprocessing_aggressive and not test_options_preprocessing_minimal" publish: name: Publish html-to-markdown ${{ matrix.version }} diff --git a/.github/workflows/build-iceoryx2.yml b/.github/workflows/build-iceoryx2.yml index 756907a315ae..7ed0f8c0ab20 100644 --- a/.github/workflows/build-iceoryx2.yml +++ b/.github/workflows/build-iceoryx2.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build iceoryx2 ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: @@ -75,58 +73,41 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - ICEORYX2_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout iceoryx2 v${{ env.ICEORYX2_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: eclipse-iceoryx/iceoryx2 - ref: v${{ env.ICEORYX2_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: iceoryx2-ffi/python - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # iceoryx2-ffi/python ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest - # cibuildwheel's copy_test_sources() resolves CIBW_TEST_SOURCES - # relative to the host checkout root (where actions/checkout put - # the whole iceoryx2 repo), not package-dir -- so this must be the - # full path down to the python bindings' tests/ (gotcha 23). It - # then stages the dir at that same relative path under the empty - # test_cwd, so CIBW_TEST_COMMAND must use the same path too. - CIBW_TEST_SOURCES: iceoryx2-ffi/python/tests - # iox2.testing.generate_isolated_config() (used throughout tests/) - # gives each test its own shared-memory/config namespace, so this - # is safe to run concurrently with other jobs on a shared runner. - # Upstream's own files are *_tests.py, which pytest's default - # python_files (test_*.py/*_test.py) never matches when pointed at - # the directory, so recursive collection finds nothing. Mirror - # upstream's own `poe test` (pyproject.toml: `pytest tests/*`) and - # pass the expanded file list instead of the directory. - CIBW_TEST_COMMAND: >- - python -c "import iceoryx2._iceoryx2 as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v iceoryx2-ffi/python/tests/* - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: iceoryx2-${{ env.ICEORYX2_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "iceoryx2" + version: "${{ matrix.version }}" + repository: "eclipse-iceoryx/iceoryx2" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 180 + cibw-package-dir: "iceoryx2-ffi/python" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # iceoryx2-ffi/python ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + # cibuildwheel's copy_test_sources() resolves CIBW_TEST_SOURCES + # relative to the host checkout root (where actions/checkout put + # the whole iceoryx2 repo), not package-dir -- so this must be the + # full path down to the python bindings' tests/ (gotcha 23). It + # then stages the dir at that same relative path under the empty + # test_cwd, so CIBW_TEST_COMMAND must use the same path too. + cibw-test-sources: "iceoryx2-ffi/python/tests" + # iox2.testing.generate_isolated_config() (used throughout tests/) + # gives each test its own shared-memory/config namespace, so this + # is safe to run concurrently with other jobs on a shared runner. + # Upstream's own files are *_tests.py, which pytest's default + # python_files (test_*.py/*_test.py) never matches when pointed at + # the directory, so recursive collection finds nothing. Mirror + # upstream's own `poe test` (pyproject.toml: `pytest tests/*`) and + # pass the expanded file list instead of the directory. + cibw-test-command: > + python -c "import iceoryx2._iceoryx2 as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v iceoryx2-ffi/python/tests/* publish: name: Publish iceoryx2 ${{ matrix.version }} diff --git a/.github/workflows/build-ignore-python.yml b/.github/workflows/build-ignore-python.yml index ebeba9066380..dfdfb4c5eaea 100644 --- a/.github/workflows/build-ignore-python.yml +++ b/.github/workflows/build-ignore-python.yml @@ -48,49 +48,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build ignore-python ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - IGNORE_PYTHON_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout ignore-python v${{ env.IGNORE_PYTHON_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: borsattoz/ignore-python - ref: v${{ env.IGNORE_PYTHON_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # ignore-python ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - # __init__.py re-exports from the compiled ignore.ignore submodule - # (gotcha 56); ignore.__file__ alone would point at the pure-Python shim. - CIBW_TEST_COMMAND: >- - python -c "import ignore.ignore as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ignore-python-${{ env.IGNORE_PYTHON_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "ignore-python" + version: "${{ matrix.version }}" + repository: "borsattoz/ignore-python" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # ignore-python ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + # __init__.py re-exports from the compiled ignore.ignore submodule + # (gotcha 56); ignore.__file__ alone would point at the pure-Python shim. + cibw-test-command: > + python -c "import ignore.ignore as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish ignore-python ${{ matrix.version }} diff --git a/.github/workflows/build-indexed-gzip.yml b/.github/workflows/build-indexed-gzip.yml index 4ebd5216817b..0145f9376094 100644 --- a/.github/workflows/build-indexed-gzip.yml +++ b/.github/workflows/build-indexed-gzip.yml @@ -60,47 +60,27 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build indexed-gzip ${{ matrix.version }} cp311-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - INDEXED_GZIP_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout indexed_gzip v${{ env.INDEXED_GZIP_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: pauldmccarthy/indexed_gzip - ref: v${{ env.INDEXED_GZIP_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: >- - cp311-manylinux_riscv64 cp312-manylinux_riscv64 - cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_ALL_LINUX: dnf -y install zlib-devel - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CIBW_TEST_REQUIRES: cython pytest numpy nibabel coverage pytest-cov - CIBW_TEST_COMMAND: >- - python -m indexed_gzip.tests -c {project}/pyproject.toml --no-cov - -m "not slow_test" -k "not test_zran" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: indexed-gzip-${{ env.INDEXED_GZIP_VERSION }}-cp311-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # Free-threaded: setup.py forces stable_abi off under Py_GIL_DISABLED, so this + # is a plain per-interpreter build. cp313t is dropped - cibuildwheel 4.2.0 + # offers no cp313t build identifier on any platform (gotcha 204). + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "indexed-gzip" + version: "${{ matrix.version }}" + repository: "pauldmccarthy/indexed_gzip" + ref: "v${{ matrix.version }}" + artifact-tag: "cp311-abi3-manylinux_riscv64" + timeout-minutes: 90 + cibw-build: > + cp311-manylinux_riscv64 cp312-manylinux_riscv64 + cp313-manylinux_riscv64 cp314-manylinux_riscv64 + cibw-before-all-linux: "dnf -y install zlib-devel" + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" + cibw-test-requires: "cython pytest numpy nibabel coverage pytest-cov" + cibw-test-command: > + python -m indexed_gzip.tests -c {project}/pyproject.toml --no-cov + -m "not slow_test" -k "not test_zran" - # Free-threaded: setup.py forces stable_abi off under Py_GIL_DISABLED, so this - # is a plain per-interpreter build. cp313t is dropped - cibuildwheel 4.2.0 - # offers no cp313t build identifier on any platform (gotcha 204). build_freethreaded: needs: [setup] if: needs.setup.outputs.versions != '[]' @@ -109,41 +89,21 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build indexed-gzip ${{ matrix.version }} cp314t-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - INDEXED_GZIP_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout indexed_gzip v${{ env.INDEXED_GZIP_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: pauldmccarthy/indexed_gzip - ref: v${{ env.INDEXED_GZIP_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp314t-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_ALL_LINUX: dnf -y install zlib-devel - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CIBW_TEST_REQUIRES: cython pytest numpy nibabel coverage pytest-cov - CIBW_TEST_COMMAND: >- - python -m indexed_gzip.tests -c {project}/pyproject.toml --no-cov - -m "not slow_test" -k "not test_zran" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: indexed-gzip-${{ env.INDEXED_GZIP_VERSION }}-cp314t-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "indexed-gzip" + version: "${{ matrix.version }}" + repository: "pauldmccarthy/indexed_gzip" + ref: "v${{ matrix.version }}" + artifact-tag: "cp314t-manylinux_riscv64" + timeout-minutes: 90 + cibw-build: "cp314t-manylinux_riscv64" + cibw-before-all-linux: "dnf -y install zlib-devel" + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" + cibw-test-requires: "cython pytest numpy nibabel coverage pytest-cov" + cibw-test-command: > + python -m indexed_gzip.tests -c {project}/pyproject.toml --no-cov + -m "not slow_test" -k "not test_zran" publish: name: Publish indexed-gzip ${{ matrix.version }} diff --git a/.github/workflows/build-json-tools-rs.yml b/.github/workflows/build-json-tools-rs.yml index 14f5c11c0b9e..6b37b1f7ec75 100644 --- a/.github/workflows/build-json-tools-rs.yml +++ b/.github/workflows/build-json-tools-rs.yml @@ -49,55 +49,36 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build json-tools-rs ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - JSON_TOOLS_RS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout json-tools-rs v${{ env.JSON_TOOLS_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: amaye15/JSON-Tools-rs - ref: v${{ env.JSON_TOOLS_RS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # json-tools-rs ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Without it pip prefers PyPI's orjson, which has no riscv64 wheel, - # and source-builds it in the container. - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=orjson - CIBW_TEST_REQUIRES: pytest orjson - # pyproject.toml carries the [tool.pytest.ini_options] that adds - # tests.py to python_files; without it pytest collects nothing. - CIBW_TEST_SOURCES: pyproject.toml python/tests - CIBW_TEST_COMMAND: >- - python -c "import json_tools_rs; assert json_tools_rs.json_tools_rs.__file__.endswith('.so'), json_tools_rs.json_tools_rs.__file__" && - python -m pytest -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: json-tools-rs-${{ env.JSON_TOOLS_RS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "json-tools-rs" + version: "${{ matrix.version }}" + repository: "amaye15/JSON-Tools-rs" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # json-tools-rs ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container. + 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\"" + # Without it pip prefers PyPI's orjson, which has no riscv64 wheel, + # and source-builds it in the container. + cibw-test-environment: "PIP_ONLY_BINARY=orjson" + cibw-test-requires: "pytest orjson" + # pyproject.toml carries the [tool.pytest.ini_options] that adds + # tests.py to python_files; without it pytest collects nothing. + cibw-test-sources: "pyproject.toml python/tests" + cibw-test-command: > + python -c "import json_tools_rs; assert json_tools_rs.json_tools_rs.__file__.endswith('.so'), json_tools_rs.json_tools_rs.__file__" && + python -m pytest -v publish: name: Publish json-tools-rs ${{ matrix.version }} diff --git a/.github/workflows/build-jsonpath-rust-bindings.yml b/.github/workflows/build-jsonpath-rust-bindings.yml index 6bf85ba750b8..181ba2590c8e 100644 --- a/.github/workflows/build-jsonpath-rust-bindings.yml +++ b/.github/workflows/build-jsonpath-rust-bindings.yml @@ -48,48 +48,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build jsonpath-rust-bindings ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - JSONPATH_RUST_BINDINGS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout jsonpath-rust-bindings ${{ env.JSONPATH_RUST_BINDINGS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: night-crawler/jsonpath-rust-bindings - ref: ${{ env.JSONPATH_RUST_BINDINGS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # jsonpath-rust-bindings ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import jsonpath_rust_bindings; assert jsonpath_rust_bindings.jsonpath_rust_bindings.__file__.endswith('.so'), jsonpath_rust_bindings.jsonpath_rust_bindings.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: jsonpath-rust-bindings-${{ env.JSONPATH_RUST_BINDINGS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "jsonpath-rust-bindings" + version: "${{ matrix.version }}" + repository: "night-crawler/jsonpath-rust-bindings" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # jsonpath-rust-bindings ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import jsonpath_rust_bindings; assert jsonpath_rust_bindings.jsonpath_rust_bindings.__file__.endswith('.so'), jsonpath_rust_bindings.jsonpath_rust_bindings.__file__" && + python -m pytest -v tests publish: name: Publish jsonpath-rust-bindings ${{ matrix.version }} diff --git a/.github/workflows/build-libipld.yml b/.github/workflows/build-libipld.yml index e1622d8884b5..e8716144a896 100644 --- a/.github/workflows/build-libipld.yml +++ b/.github/workflows/build-libipld.yml @@ -48,45 +48,27 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build libipld ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - LIBIPLD_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout libipld v${{ env.LIBIPLD_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: MarshalX/python-libipld - ref: v${{ env.LIBIPLD_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # libipld's own [tool.cibuildwheel] is unset, so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest pytest-benchmark - CIBW_TEST_SOURCES: pytests data pyproject.toml - CIBW_TEST_COMMAND: python -m pytest pytests -q - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: libipld-${{ env.LIBIPLD_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "libipld" + version: "${{ matrix.version }}" + repository: "MarshalX/python-libipld" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # libipld's own [tool.cibuildwheel] is unset, so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest pytest-benchmark" + cibw-test-sources: "pytests data pyproject.toml" + cibw-test-command: "python -m pytest pytests -q" publish: name: Publish libipld ${{ matrix.version }} diff --git a/.github/workflows/build-lingua-language-detector.yml b/.github/workflows/build-lingua-language-detector.yml index 4b06c0d210b3..8fbe3164cedc 100644 --- a/.github/workflows/build-lingua-language-detector.yml +++ b/.github/workflows/build-lingua-language-detector.yml @@ -49,58 +49,40 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build lingua-language-detector ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - LINGUA_RS_VERSION: ${{ matrix.version }} - - steps: - # The lingua-language-detector PyPI project ships no sdist. Its PyPI - # metadata and README point at pemistahl/lingua-py, but that repo holds - # only docs/scripts/test data -- the actual PyO3/maturin source and its - # own release workflow live in the pemistahl/lingua-rs Cargo workspace, - # whose git tags track the Rust crate version, not the PyPI version - # (v1.8.0 built lingua-language-detector 2.2.0). - - name: Checkout lingua-rs v${{ env.LINGUA_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: pemistahl/lingua-rs - ref: v${{ env.LINGUA_RS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # lingua-rs ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest==9.0.2 - CIBW_TEST_SOURCES: tests/python - # module-name "lingua" with no python-source still gets maturin's - # usual wrapper package: `lingua/__init__.py` does `from .lingua - # import *`, so the compiled extension is the lingua.lingua submodule. - CIBW_TEST_COMMAND: >- - python -c "import lingua; assert lingua.lingua.__file__.endswith('.so'), lingua.lingua.__file__" && - python -m pytest -v tests/python - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: lingua_language_detector-${{ env.LINGUA_RS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # The lingua-language-detector PyPI project ships no sdist. Its PyPI + # metadata and README point at pemistahl/lingua-py, but that repo holds + # only docs/scripts/test data -- the actual PyO3/maturin source and its + # own release workflow live in the pemistahl/lingua-rs Cargo workspace, + # whose git tags track the Rust crate version, not the PyPI version + # (v1.8.0 built lingua-language-detector 2.2.0). + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "lingua_language_detector" + version: "${{ matrix.version }}" + repository: "pemistahl/lingua-rs" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 180 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # lingua-rs ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest==9.0.2" + cibw-test-sources: "tests/python" + # module-name "lingua" with no python-source still gets maturin's + # usual wrapper package: `lingua/__init__.py` does `from .lingua + # import *`, so the compiled extension is the lingua.lingua submodule. + cibw-test-command: > + python -c "import lingua; assert lingua.lingua.__file__.endswith('.so'), lingua.lingua.__file__" && + python -m pytest -v tests/python publish: name: Publish lingua-language-detector ${{ matrix.version }} diff --git a/.github/workflows/build-loro.yml b/.github/workflows/build-loro.yml index e13f48fb7765..d764d2fc8d08 100644 --- a/.github/workflows/build-loro.yml +++ b/.github/workflows/build-loro.yml @@ -49,47 +49,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build loro ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - LORO_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout loro-py ${{ env.LORO_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: loro-dev/loro-py - ref: v${{ env.LORO_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - output-dir: wheelhouse/ - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # loro-py ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import loro; assert loro.loro.__file__.endswith('.so'), loro.loro.__file__" - && python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: loro-${{ env.LORO_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "loro" + version: "${{ matrix.version }}" + repository: "loro-dev/loro-py" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # loro-py ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import loro; assert loro.loro.__file__.endswith('.so'), loro.loro.__file__" + && python -m pytest -v tests publish: name: Publish loro ${{ matrix.version }} diff --git a/.github/workflows/build-mapfile-parser.yml b/.github/workflows/build-mapfile-parser.yml index da9f2c4d87c6..96c4beb5ff84 100644 --- a/.github/workflows/build-mapfile-parser.yml +++ b/.github/workflows/build-mapfile-parser.yml @@ -60,56 +60,38 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build mapfile-parser ${{ matrix.version }} cp312-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - MAPFILE_PARSER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout mapfile_parser ${{ env.MAPFILE_PARSER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Decompollaborate/mapfile_parser - ref: ${{ env.MAPFILE_PARSER_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - # musllinux dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: >- - cp312-manylinux_riscv64 cp313-manylinux_riscv64 - cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # mapfile_parser ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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"' - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - mapfile_parser bss_check tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser first_diff tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser jsonify tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser objdiff_report tests/maps/gnuld/n64/drmario64.us.map objdiff_report.json && - mapfile_parser pj64_syms tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser progress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings && - mapfile_parser sym_info tests/maps/gnuld/n64/drmario64.us.map entrypoint && - mapfile_parser symbol_sizes_csv tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser upload_frogress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings drmario64 us code --verbose --dry-run - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: mapfile-parser-${{ env.MAPFILE_PARSER_VERSION }}-cp312-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # Free-threaded wheel: pyo3's abi3 feature can't target Py_GIL_DISABLED + # builds, so lib.rs's #[pymodule(gil_used = false)] gets its own + # per-interpreter build here, matching upstream's own cp314t wheel. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "mapfile-parser" + version: "${{ matrix.version }}" + repository: "Decompollaborate/mapfile_parser" + ref: "${{ matrix.version }}" + artifact-tag: "cp312-abi3-manylinux_riscv64" + timeout-minutes: 90 + # musllinux dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: > + cp312-manylinux_riscv64 cp313-manylinux_riscv64 + cp314-manylinux_riscv64 + # mapfile_parser ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-sources: "tests" + cibw-test-command: > + mapfile_parser bss_check tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser first_diff tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser jsonify tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser objdiff_report tests/maps/gnuld/n64/drmario64.us.map objdiff_report.json && + mapfile_parser pj64_syms tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser progress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings && + mapfile_parser sym_info tests/maps/gnuld/n64/drmario64.us.map entrypoint && + mapfile_parser symbol_sizes_csv tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser upload_frogress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings drmario64 us code --verbose --dry-run - # Free-threaded wheel: pyo3's abi3 feature can't target Py_GIL_DISABLED - # builds, so lib.rs's #[pymodule(gil_used = false)] gets its own - # per-interpreter build here, matching upstream's own cp314t wheel. build_freethreaded: needs: [setup] if: needs.setup.outputs.versions != '[]' @@ -118,47 +100,29 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build mapfile-parser ${{ matrix.version }} cp314t-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 - env: - MAPFILE_PARSER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout mapfile_parser ${{ env.MAPFILE_PARSER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Decompollaborate/mapfile_parser - ref: ${{ env.MAPFILE_PARSER_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: 'cp314t-manylinux_riscv64' - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - 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"' - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - mapfile_parser bss_check tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser first_diff tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser jsonify tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser objdiff_report tests/maps/gnuld/n64/drmario64.us.map objdiff_report.json && - mapfile_parser pj64_syms tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser progress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings && - mapfile_parser sym_info tests/maps/gnuld/n64/drmario64.us.map entrypoint && - mapfile_parser symbol_sizes_csv tests/maps/gnuld/n64/drmario64.us.map && - mapfile_parser upload_frogress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings drmario64 us code --verbose --dry-run - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: mapfile-parser-${{ env.MAPFILE_PARSER_VERSION }}-cp314t-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "mapfile-parser" + version: "${{ matrix.version }}" + repository: "Decompollaborate/mapfile_parser" + ref: "${{ matrix.version }}" + artifact-tag: "cp314t-manylinux_riscv64" + timeout-minutes: 90 + cibw-build: "cp314t-manylinux_riscv64" + 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\"" + cibw-test-sources: "tests" + cibw-test-command: > + mapfile_parser bss_check tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser first_diff tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser jsonify tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser objdiff_report tests/maps/gnuld/n64/drmario64.us.map objdiff_report.json && + mapfile_parser pj64_syms tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser progress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings && + mapfile_parser sym_info tests/maps/gnuld/n64/drmario64.us.map entrypoint && + mapfile_parser symbol_sizes_csv tests/maps/gnuld/n64/drmario64.us.map && + mapfile_parser upload_frogress tests/maps/gnuld/n64/drmario64.us.map asm asm/nonmatchings drmario64 us code --verbose --dry-run publish: name: Publish mapfile-parser ${{ matrix.version }} diff --git a/.github/workflows/build-markdown-it-pyrs.yml b/.github/workflows/build-markdown-it-pyrs.yml index 13bf8fcf2ebe..da307b8ce4ed 100644 --- a/.github/workflows/build-markdown-it-pyrs.yml +++ b/.github/workflows/build-markdown-it-pyrs.yml @@ -49,49 +49,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build markdown-it-pyrs ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - MARKDOWN_IT_PYRS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout markdown-it-pyrs v${{ env.MARKDOWN_IT_PYRS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: chrisjsewell/markdown-it-pyrs - ref: v${{ env.MARKDOWN_IT_PYRS_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # markdown-it-pyrs ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest pytest-param-files - CIBW_TEST_SOURCES: tests - # bench_html.py/bench_tree.py need the benchmarking extra - # (pytest-benchmark, markdown-it-py), not relevant to a wheel test. - CIBW_TEST_COMMAND: >- - python -c "import markdown_it_pyrs.markdown_it_pyrs as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests/test_api.py tests/test_cli.py tests/test_fixtures.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: markdown-it-pyrs-${{ env.MARKDOWN_IT_PYRS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "markdown-it-pyrs" + version: "${{ matrix.version }}" + repository: "chrisjsewell/markdown-it-pyrs" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # markdown-it-pyrs ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest pytest-param-files" + cibw-test-sources: "tests" + # bench_html.py/bench_tree.py need the benchmarking extra + # (pytest-benchmark, markdown-it-py), not relevant to a wheel test. + cibw-test-command: > + python -c "import markdown_it_pyrs.markdown_it_pyrs as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests/test_api.py tests/test_cli.py tests/test_fixtures.py publish: name: Publish markdown-it-pyrs ${{ matrix.version }} diff --git a/.github/workflows/build-mft.yml b/.github/workflows/build-mft.yml index 0a3c2795275b..0eb5ce624b89 100644 --- a/.github/workflows/build-mft.yml +++ b/.github/workflows/build-mft.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build mft ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -76,46 +74,31 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - MFT_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout mft v${{ env.MFT_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: omerbenamram/pymft-rs - ref: v${{ env.MFT_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # mft ships no [tool.cibuildwheel], so the Rust toolchain its maturin - # backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests samples - # mft is a pure-Rust maturin crate (no mft/ dir, no [tool.maturin] - # python-source in the checkout), so maturin ships it behind a generated - # mft/__init__.py re-export shim around a compiled mft.mft submodule - - # mft.__file__ is that shim's .py, not the extension, on every leg - # (CLAUDE.md gotcha 559/308). Probe the submodule via sys.modules instead. - CIBW_TEST_COMMAND: >- - python -c "import mft, sys; assert sys.modules['mft.mft'].__file__.endswith('.so'), sys.modules['mft.mft'].__file__" && - python -m pytest tests -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: mft-${{ env.MFT_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "mft" + version: "${{ matrix.version }}" + repository: "omerbenamram/pymft-rs" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # mft ships no [tool.cibuildwheel], so the Rust toolchain its maturin + # backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests samples" + # mft is a pure-Rust maturin crate (no mft/ dir, no [tool.maturin] + # python-source in the checkout), so maturin ships it behind a generated + # mft/__init__.py re-export shim around a compiled mft.mft submodule - + # mft.__file__ is that shim's .py, not the extension, on every leg + # (CLAUDE.md gotcha 559/308). Probe the submodule via sys.modules instead. + cibw-test-command: > + python -c "import mft, sys; assert sys.modules['mft.mft'].__file__.endswith('.so'), sys.modules['mft.mft'].__file__" && + python -m pytest tests -v publish: name: Publish mft ${{ matrix.version }} diff --git a/.github/workflows/build-minijinja.yml b/.github/workflows/build-minijinja.yml index 7a905cc3682e..530cc9cbaaf1 100644 --- a/.github/workflows/build-minijinja.yml +++ b/.github/workflows/build-minijinja.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build minijinja ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: @@ -75,47 +73,32 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - MINIJINJA_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout minijinja ${{ env.MINIJINJA_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: mitsuhiko/minijinja - ref: ${{ env.MINIJINJA_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: minijinja-py - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # minijinja-py ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: minijinja-py/tests minijinja-py/pyproject.toml - # test_load_from_path resolves "tests/templates" relative to cwd, so pytest - # must run from minijinja-py/ (matching upstream's own Makefile) rather than - # the staged test_cwd root. - CIBW_TEST_COMMAND: >- - python -c "import minijinja._lowlevel as m, importlib.metadata as md; - assert m.__file__.endswith('.so'), m.__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('minijinja'))" && - cd minijinja-py && python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: minijinja-${{ env.MINIJINJA_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "minijinja" + version: "${{ matrix.version }}" + repository: "mitsuhiko/minijinja" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 90 + cibw-package-dir: "minijinja-py" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # minijinja-py ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "minijinja-py/tests minijinja-py/pyproject.toml" + # test_load_from_path resolves "tests/templates" relative to cwd, so pytest + # must run from minijinja-py/ (matching upstream's own Makefile) rather than + # the staged test_cwd root. + cibw-test-command: > + python -c "import minijinja._lowlevel as m, importlib.metadata as md; + assert m.__file__.endswith('.so'), m.__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('minijinja'))" && + cd minijinja-py && python -m pytest -v tests publish: name: Publish minijinja ${{ matrix.version }} diff --git a/.github/workflows/build-ml-dtypes.yml b/.github/workflows/build-ml-dtypes.yml index fc4f9e9c0a8d..fc9c4681a4b3 100644 --- a/.github/workflows/build-ml-dtypes.yml +++ b/.github/workflows/build-ml-dtypes.yml @@ -48,46 +48,29 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build ml-dtypes ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - ML_DTYPES_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout ml_dtypes ${{ env.ML_DTYPES_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: jax-ml/ml_dtypes - ref: v${{ env.ML_DTYPES_VERSION }} - # third_party/eigen is a submodule and the extension compiles against it. - submodules: recursive - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_ONLY_BINARY=numpy - CIBW_TEST_REQUIRES: absl-py pytest pytest-xdist - # riscv64's FP-invalid status flag diverges on casts between ml_dtypes' - # non-IEEE custom float types (same class of divergence the project's own - # CMakeLists.txt documents for Mac ARM); ml_dtypes' filterwarnings=error - # promotes it to a hard failure even though the underlying assertions pass. - CIBW_TEST_COMMAND: pytest -n auto -W "ignore:invalid value encountered in cast:RuntimeWarning" {project} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ml-dtypes-${{ env.ML_DTYPES_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # third_party/eigen is a submodule and the extension compiles against it. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "ml-dtypes" + version: "${{ matrix.version }}" + repository: "jax-ml/ml_dtypes" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 120 + checkout-submodules: "recursive" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" + cibw-test-requires: "absl-py pytest pytest-xdist" + # riscv64's FP-invalid status flag diverges on casts between ml_dtypes' + # non-IEEE custom float types (same class of divergence the project's own + # CMakeLists.txt documents for Mac ARM); ml_dtypes' filterwarnings=error + # promotes it to a hard failure even though the underlying assertions pass. + cibw-test-command: "pytest -n auto -W \"ignore:invalid value encountered in cast:RuntimeWarning\" {project}" eigen_sources: needs: [setup] diff --git a/.github/workflows/build-moviepilot-rust.yml b/.github/workflows/build-moviepilot-rust.yml index f3081e959f9a..fa1583c99c3a 100644 --- a/.github/workflows/build-moviepilot-rust.yml +++ b/.github/workflows/build-moviepilot-rust.yml @@ -52,43 +52,26 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build moviepilot-rust ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - MOVIEPILOT_RUST_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout MoviePilot-Rust v${{ env.MOVIEPILOT_RUST_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: jxxghp/MoviePilot-Rust - ref: v${{ env.MOVIEPILOT_RUST_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - 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" ${{ case(matrix.python == 'cp314', 'PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1', endsWith(matrix.python, 't'), 'MATURIN_PEP517_ARGS="--locked --no-default-features --features zhconv"', '') }} - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -q - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: moviepilot-rust-${{ env.MOVIEPILOT_RUST_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "moviepilot-rust" + version: "${{ matrix.version }}" + repository: "jxxghp/MoviePilot-Rust" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-musllinux-riscv64-image: "quay.io/pypa/musllinux_1_2_riscv64" + 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\" ${{ case(matrix.python == 'cp314', 'PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1', endsWith(matrix.python, 't'), 'MATURIN_PEP517_ARGS=\"--locked --no-default-features --features zhconv\"', '') }}" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -q" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-murmurhash2.yml b/.github/workflows/build-murmurhash2.yml index 12f7a17ff1af..d3785bf76d0d 100644 --- a/.github/workflows/build-murmurhash2.yml +++ b/.github/workflows/build-murmurhash2.yml @@ -48,8 +48,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build murmurhash2 ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -66,46 +64,30 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - MURMURHASH2_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout murmurhash2-py v${{ env.MURMURHASH2_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: messense/murmurhash2-py - ref: v${{ env.MURMURHASH2_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # murmurhash2-py ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - # murmurhash2/__init__.py is maturin's own pyi-stub shim - # ('from .murmurhash2 import *', matching the official PyPI wheel), and - # that star-import rebinds the package's own `murmurhash2` attribute to - # the compiled murmurhash2() function, shadowing the submodule -- so the - # compiled-extension proof has to go through sys.modules instead. - CIBW_TEST_COMMAND: >- - python -c "import murmurhash2, sys; assert sys.modules['murmurhash2.murmurhash2'].__file__.endswith('.so'), sys.modules['murmurhash2.murmurhash2'].__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: murmurhash2-${{ env.MURMURHASH2_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "murmurhash2" + version: "${{ matrix.version }}" + repository: "messense/murmurhash2-py" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # murmurhash2-py ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + # murmurhash2/__init__.py is maturin's own pyi-stub shim + # ('from .murmurhash2 import *', matching the official PyPI wheel), and + # that star-import rebinds the package's own `murmurhash2` attribute to + # the compiled murmurhash2() function, shadowing the submodule -- so the + # compiled-extension proof has to go through sys.modules instead. + cibw-test-command: > + python -c "import murmurhash2, sys; assert sys.modules['murmurhash2.murmurhash2'].__file__.endswith('.so'), sys.modules['murmurhash2.murmurhash2'].__file__" && + python -m pytest -v tests publish: name: Publish murmurhash2 ${{ matrix.version }} diff --git a/.github/workflows/build-netifaces2.yml b/.github/workflows/build-netifaces2.yml index 8b89774cddb8..ab256d9b6b94 100644 --- a/.github/workflows/build-netifaces2.yml +++ b/.github/workflows/build-netifaces2.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build netifaces2 ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -67,45 +65,29 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - NETIFACES2_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout netifaces-2 V${{ env.NETIFACES2_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: SamuelYvon/netifaces-2 - ref: V${{ env.NETIFACES2_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # netifaces-2 ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - # netifaces/__init__.py imports its compiled extension from the - # `netifaces.netifaces` submodule (module-name = "netifaces" in - # [tool.maturin]), so the compiled-extension proof has to probe that - # submodule rather than the top-level package. - CIBW_TEST_COMMAND: >- - python -c "import netifaces.netifaces as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: netifaces2-${{ env.NETIFACES2_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "netifaces2" + version: "${{ matrix.version }}" + repository: "SamuelYvon/netifaces-2" + ref: "V${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # netifaces-2 ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + # netifaces/__init__.py imports its compiled extension from the + # `netifaces.netifaces` submodule (module-name = "netifaces" in + # [tool.maturin]), so the compiled-extension proof has to probe that + # submodule rather than the top-level package. + cibw-test-command: > + python -c "import netifaces.netifaces as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish netifaces2 ${{ matrix.version }} diff --git a/.github/workflows/build-ngrok.yml b/.github/workflows/build-ngrok.yml index f4b674cabf51..db70b1d1d22d 100644 --- a/.github/workflows/build-ngrok.yml +++ b/.github/workflows/build-ngrok.yml @@ -55,55 +55,35 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build ngrok ${{ matrix.version }} cp310-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - NGROK_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout ngrok-python v${{ env.NGROK_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ngrok/ngrok-python - ref: v${{ env.NGROK_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # pyo3 carries abi3-py310 unconditionally, so cp313/cp314 re-test the - # cp312 build. pyo3 0.22 cannot build for free-threaded CPython. - CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # aws-lc-sys is built with its `bindgen` feature, which needs libclang. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && - dnf -y install clang-devel - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_SOURCES: test examples pytest.ini - CIBW_TEST_REQUIRES: pytest pytest-timeout aiohttp requests mypy - # Upstream's suite needs an NGROK_AUTHTOKEN secret; these tests need - # none, and test_ca_cert/test_invalid_authtoken still complete a TLS - # handshake with the ngrok service. - CIBW_TEST_COMMAND: >- - python -c "import ngrok.ngrok as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m mypy - examples/ngrok-forward-minimal.py examples/ngrok-forward-full.py - examples/ngrok-http-minimal.py examples/ngrok-http-full.py - examples/ngrok-labeled.py examples/ngrok-tcp.py examples/ngrok-tls.py && - python -m pytest -v test/test_main.py test/test.py - -k "TestNgrokMain or test_import or test_pipe_name or test_ca_cert or test_invalid_authtoken" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ngrok-${{ env.NGROK_VERSION }}-cp310-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "ngrok" + version: "${{ matrix.version }}" + repository: "ngrok/ngrok-python" + ref: "v${{ matrix.version }}" + artifact-tag: "cp310-abi3-manylinux_riscv64" + timeout-minutes: 360 + # pyo3 carries abi3-py310 unconditionally, so cp313/cp314 re-test the + # cp312 build. pyo3 0.22 cannot build for free-threaded CPython. + cibw-build: "cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64" + # aws-lc-sys is built with its `bindgen` feature, which needs libclang. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && + dnf -y install clang-devel + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-sources: "test examples pytest.ini" + cibw-test-requires: "pytest pytest-timeout aiohttp requests mypy" + # Upstream's suite needs an NGROK_AUTHTOKEN secret; these tests need + # none, and test_ca_cert/test_invalid_authtoken still complete a TLS + # handshake with the ngrok service. + cibw-test-command: > + python -c "import ngrok.ngrok as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m mypy + examples/ngrok-forward-minimal.py examples/ngrok-forward-full.py + examples/ngrok-http-minimal.py examples/ngrok-http-full.py + examples/ngrok-labeled.py examples/ngrok-tcp.py examples/ngrok-tls.py && + python -m pytest -v test/test_main.py test/test.py + -k "TestNgrokMain or test_import or test_pipe_name or test_ca_cert or test_invalid_authtoken" publish: name: Publish ngrok ${{ matrix.version }} diff --git a/.github/workflows/build-opendal.yml b/.github/workflows/build-opendal.yml index 913ac57763da..0aa78e7df84f 100644 --- a/.github/workflows/build-opendal.yml +++ b/.github/workflows/build-opendal.yml @@ -56,8 +56,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build opendal ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 480 strategy: fail-fast: false matrix: @@ -81,59 +79,41 @@ jobs: build: cp314t-manylinux_riscv64 features: --features services-all - env: - OPENDAL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout opendal ${{ env.OPENDAL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: apache/opendal - ref: ${{ env.OPENDAL_REF }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: bindings/python - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # opendal-python ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here; the - # crate's own rust-version floor (1.91) is well under any current - # stable toolchain. - 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" - MATURIN_PEP517_ARGS="${{ matrix.features }}" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest pytest-asyncio python-dotenv - # cibuildwheel resolves CIBW_TEST_SOURCES relative to the host cwd - # (the repository root cibuildwheel itself runs from), not - # package-dir - opendal-python's tests live at bindings/python/tests, - # not /tests. - CIBW_TEST_SOURCES: bindings/python/tests - # OPENDAL_TEST=memory exercises the real compiled extension end to - # end (read/write/list/stat/delete/rename/copy, sync and async) - # against the in-process memory service, with no credentials or - # network needed; tests whose capability the memory service lacks - # self-skip via conftest.py's `need_capability` marker. - # test_file_http_requests.py is dropped: it spawns a ThreadingHTTPServer - # via multiprocessing, which cross-talks between jobs on a shared runner. - CIBW_TEST_ENVIRONMENT: OPENDAL_TEST=memory - CIBW_TEST_COMMAND: >- - python -c "import opendal._opendal as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v bindings/python/tests --ignore=bindings/python/tests/test_file_http_requests.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: opendal-${{ env.OPENDAL_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "opendal" + version: "${{ matrix.version }}" + repository: "apache/opendal" + ref: "ef036cded461c2765dea1a85770e2134df94e9cf" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 480 + cibw-package-dir: "bindings/python" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # opendal-python ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here; the + # crate's own rust-version floor (1.91) is well under any current + # stable toolchain. + 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\" MATURIN_PEP517_ARGS=\"${{ matrix.features }}\"" + cibw-test-requires: "pytest pytest-asyncio python-dotenv" + # cibuildwheel resolves CIBW_TEST_SOURCES relative to the host cwd + # (the repository root cibuildwheel itself runs from), not + # package-dir - opendal-python's tests live at bindings/python/tests, + # not /tests. + cibw-test-sources: "bindings/python/tests" + # OPENDAL_TEST=memory exercises the real compiled extension end to + # end (read/write/list/stat/delete/rename/copy, sync and async) + # against the in-process memory service, with no credentials or + # network needed; tests whose capability the memory service lacks + # self-skip via conftest.py's `need_capability` marker. + # test_file_http_requests.py is dropped: it spawns a ThreadingHTTPServer + # via multiprocessing, which cross-talks between jobs on a shared runner. + cibw-test-environment: "OPENDAL_TEST=memory" + cibw-test-command: > + python -c "import opendal._opendal as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v bindings/python/tests --ignore=bindings/python/tests/test_file_http_requests.py publish: name: Publish opendal ${{ matrix.version }} diff --git a/.github/workflows/build-openjd-model.yml b/.github/workflows/build-openjd-model.yml index bd0a0f8a26f7..0be85f8ebc8f 100644 --- a/.github/workflows/build-openjd-model.yml +++ b/.github/workflows/build-openjd-model.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build openjd-model ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: @@ -68,52 +66,35 @@ jobs: cp311-manylinux_riscv64 cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - OPENJD_MODEL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout openjd-model-for-python ${{ env.OPENJD_MODEL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: OpenJobDescription/openjd-model-for-python - ref: ${{ env.OPENJD_MODEL_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # pydantic-core (pulled in transitively by the pydantic runtime - # dependency) has no riscv64 wheel for cp39 on our registry yet; the - # wheel itself is unaffected, only cp39's test install is. - CIBW_TEST_SKIP: cp39-* - CIBW_TEST_REQUIRES: pytest pytest-xdist pytest-timeout hypothesis - CIBW_TEST_SOURCES: test - # Upstream's --timeout=30 is tuned for x86 CI; the 0.11.x fuzz tests exceed - # it on the slower riscv64 runner. - CIBW_TEST_COMMAND: >- - python -c "import openjd._openjd_rs as m, importlib.metadata as md; - assert m.__file__.endswith('.so'), m.__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('openjd-model'))" && - python -m pytest -rfEx --numprocesses=auto --timeout=300 - --import-mode=importlib - --ignore=test/openjd/model_v0/benchmark --ignore=test/openjd/model_v1/benchmark - test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: openjd-model-${{ env.OPENJD_MODEL_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "openjd-model" + version: "${{ matrix.version }}" + repository: "OpenJobDescription/openjd-model-for-python" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 120 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + 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\"" + # pydantic-core (pulled in transitively by the pydantic runtime + # dependency) has no riscv64 wheel for cp39 on our registry yet; the + # wheel itself is unaffected, only cp39's test install is. + cibw-test-skip: "cp39-*" + cibw-test-requires: "pytest pytest-xdist pytest-timeout hypothesis" + cibw-test-sources: "test" + # Upstream's --timeout=30 is tuned for x86 CI; the 0.11.x fuzz tests exceed + # it on the slower riscv64 runner. + cibw-test-command: > + python -c "import openjd._openjd_rs as m, importlib.metadata as md; + assert m.__file__.endswith('.so'), m.__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('openjd-model'))" && + python -m pytest -rfEx --numprocesses=auto --timeout=300 + --import-mode=importlib + --ignore=test/openjd/model_v0/benchmark --ignore=test/openjd/model_v1/benchmark + test publish: name: Publish openjd-model ${{ matrix.version }} diff --git a/.github/workflows/build-openslide-python.yml b/.github/workflows/build-openslide-python.yml index 6844c66221d8..39d30f9f849f 100644 --- a/.github/workflows/build-openslide-python.yml +++ b/.github/workflows/build-openslide-python.yml @@ -50,38 +50,22 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build openslide-python ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - OPENSLIDE_PYTHON_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout openslide-python v${{ env.OPENSLIDE_PYTHON_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: openslide/openslide-python - ref: v${{ env.OPENSLIDE_PYTHON_VERSION }} - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: openslide-python-${{ env.OPENSLIDE_PYTHON_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # The suite needs libopenslide, which the manylinux image cannot install + # (it is EPEL-only), so test on the runner against Ubuntu's, as upstream does. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "openslide-python" + version: "${{ matrix.version }}" + repository: "openslide/openslide-python" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" - # The suite needs libopenslide, which the manylinux image cannot install - # (it is EPEL-only), so test on the runner against Ubuntu's, as upstream does. test_wheels: needs: [setup, build_wheels] if: needs.setup.outputs.versions != '[]' diff --git a/.github/workflows/build-oss-harmony.yml b/.github/workflows/build-oss-harmony.yml index af2074dd27e6..6b90057d27b1 100644 --- a/.github/workflows/build-oss-harmony.yml +++ b/.github/workflows/build-oss-harmony.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build oss-harmony ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: @@ -73,47 +71,30 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - OSS_HARMONY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout oss-harmony v${{ env.OSS_HARMONY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: oss-harmony/harmony - ref: v${{ env.OSS_HARMONY_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # oss-harmony ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # pydantic (a runtime dep) pulls in pydantic-core, which we also - # publish for riscv64; the extra index lets pip find it when PyPI's - # own riscv64 pydantic-core wheel is missing for an interpreter. - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests test-data pyproject.toml - CIBW_TEST_COMMAND: >- - python -c "import openai_harmony.openai_harmony as m, importlib.metadata as md; - assert m.__file__.endswith('.so'), m.__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('oss-harmony'))" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: oss-harmony-${{ env.OSS_HARMONY_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "oss-harmony" + version: "${{ matrix.version }}" + repository: "oss-harmony/harmony" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 120 + cibw-build: "${{ matrix.build }}" + # oss-harmony ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + # pydantic (a runtime dep) pulls in pydantic-core, which we also + # publish for riscv64; the extra index lets pip find it when PyPI's + # own riscv64 pydantic-core wheel is missing for an interpreter. + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests test-data pyproject.toml" + cibw-test-command: > + python -c "import openai_harmony.openai_harmony as m, importlib.metadata as md; + assert m.__file__.endswith('.so'), m.__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('oss-harmony'))" && + python -m pytest -v tests publish: name: Publish oss-harmony ${{ matrix.version }} diff --git a/.github/workflows/build-packmol.yml b/.github/workflows/build-packmol.yml index 9a2594c89829..9c5e0d01e57c 100644 --- a/.github/workflows/build-packmol.yml +++ b/.github/workflows/build-packmol.yml @@ -49,42 +49,24 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build packmol ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PACKMOL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout packmol v${{ env.PACKMOL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: m3g/packmol - ref: v${{ env.PACKMOL_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Upstream FLAGS minus -march=native, which GCC rejects on riscv64. FLAGS is also - # the link line: link packmol PIE so auditwheel's patchelf --set-rpath appends its - # segment instead of prepending one below vm.mmap_min_addr (gotcha 595). Not - # -Wl,-Ttext-segment: musllinux's default-PIE gcc then emits an ET_EXEC that - # still carries PIE relocations, and patchelf's rewrite of it segfaults at start. - CIBW_ENVIRONMENT: >- - MAKEFLAGS='FLAGS=-O3\ -funroll-loops\ -fPIE\ -pie' - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: packmol-${{ env.PACKMOL_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "packmol" + version: "${{ matrix.version }}" + repository: "m3g/packmol" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Upstream FLAGS minus -march=native, which GCC rejects on riscv64. FLAGS is also + # the link line: link packmol PIE so auditwheel's patchelf --set-rpath appends its + # segment instead of prepending one below vm.mmap_min_addr (gotcha 595). Not + # -Wl,-Ttext-segment: musllinux's default-PIE gcc then emits an ET_EXEC that + # still carries PIE relocations, and patchelf's rewrite of it segfaults at start. + cibw-environment-linux: "MAKEFLAGS='FLAGS=-O3\\ -funroll-loops\\ -fPIE\\ -pie'" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-patiencediff.yml b/.github/workflows/build-patiencediff.yml index 13ead745a199..c0b7664fc062 100644 --- a/.github/workflows/build-patiencediff.yml +++ b/.github/workflows/build-patiencediff.yml @@ -51,50 +51,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build patiencediff ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PATIENCEDIFF_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout patiencediff ${{ env.PATIENCEDIFF_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: breezy-team/patiencediff - ref: v${{ env.PATIENCEDIFF_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBUILDWHEEL: "1" - # No Rust in the manylinux image; install it and put cargo on PATH, same - # as upstream's own CIBW_BEFORE_BUILD (gotcha: manylinux_2_39_riscv64 has - # no yum libatomic package needed here, unlike cryptg's grammers-crypto). - CIBW_BEFORE_BUILD_LINUX: >- - pip install -U setuptools-rust && - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile=minimal -y && - . "$HOME/.cargo/env" && rustup show - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin"' - # Mirrors upstream's own test suite (patiencediff.test_patiencediff), run - # against the installed wheel rather than the checkout (gotcha 25). - CIBW_TEST_COMMAND: >- - python -m unittest patiencediff.test_patiencediff - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: patiencediff-${{ env.PATIENCEDIFF_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "patiencediff" + version: "${{ matrix.version }}" + repository: "breezy-team/patiencediff" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # No Rust in the manylinux image; install it and put cargo on PATH, same + # as upstream's own CIBW_BEFORE_BUILD (gotcha: manylinux_2_39_riscv64 has + # no yum libatomic package needed here, unlike cryptg's grammers-crypto). + cibw-before-build-linux: > + pip install -U setuptools-rust && + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile=minimal -y && + . "$HOME/.cargo/env" && rustup show + cibw-environment-linux: "CIBUILDWHEEL=1 PATH=\"$PATH:$HOME/.cargo/bin\"" + # Mirrors upstream's own test suite (patiencediff.test_patiencediff), run + # against the installed wheel rather than the checkout (gotcha 25). + cibw-test-command: > + python -m unittest patiencediff.test_patiencediff publish: name: Publish patiencediff ${{ matrix.version }} diff --git a/.github/workflows/build-phonors.yml b/.github/workflows/build-phonors.yml index d00043bba6c7..95accbbaca1b 100644 --- a/.github/workflows/build-phonors.yml +++ b/.github/workflows/build-phonors.yml @@ -89,8 +89,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build phonors ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: @@ -104,47 +102,30 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - PHONORS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout phonors v${{ env.PHONORS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: phonopy/phonors - ref: v${{ env.PHONORS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: numpy - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=numpy - # Upstream ships no Python test suite; check the extension against numpy directly. - CIBW_TEST_COMMAND: >- - python -c "import numpy as np, phonors, phonors.phonors as m; - assert m.__file__.endswith('.so'), m.__file__; - rng = np.random.default_rng(0); - a = rng.standard_normal((3, 6, 6)) + 1j * rng.standard_normal((3, 6, 6)); - h = np.ascontiguousarray(a + a.conj().transpose(0, 2, 1)); - w = np.zeros((3, 6)); - phonors.eigvalsh_values_batch(h, w); - np.testing.assert_allclose(w, np.linalg.eigvalsh(h), atol=1e-10)" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: phonors-${{ env.PHONORS_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "phonors" + version: "${{ matrix.version }}" + repository: "phonopy/phonors" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.build }}" + 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\"" + cibw-test-requires: "numpy" + cibw-test-environment: "PIP_ONLY_BINARY=numpy" + # Upstream ships no Python test suite; check the extension against numpy directly. + cibw-test-command: > + python -c "import numpy as np, phonors, phonors.phonors as m; + assert m.__file__.endswith('.so'), m.__file__; + rng = np.random.default_rng(0); + a = rng.standard_normal((3, 6, 6)) + 1j * rng.standard_normal((3, 6, 6)); + h = np.ascontiguousarray(a + a.conj().transpose(0, 2, 1)); + w = np.zeros((3, 6)); + phonors.eigvalsh_values_batch(h, w); + np.testing.assert_allclose(w, np.linalg.eigvalsh(h), atol=1e-10)" publish: name: Publish phonors ${{ matrix.version }} diff --git a/.github/workflows/build-piper-phonemize.yml b/.github/workflows/build-piper-phonemize.yml index 90f4883204b6..a56e4d6e94cb 100644 --- a/.github/workflows/build-piper-phonemize.yml +++ b/.github/workflows/build-piper-phonemize.yml @@ -60,98 +60,78 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build piper-phonemize ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PIPER_PHONEMIZE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout piper-phonemize v${{ env.PIPER_PHONEMIZE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rhasspy/piper-phonemize - ref: v${{ env.PIPER_PHONEMIZE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - ESPEAK_NG_REF: ${{ env.ESPEAK_NG_REF }} - ONNXRUNTIME_VERSION: ${{ env.ONNXRUNTIME_VERSION }} - # CIBW_BEFORE_ALL_LINUX runs inside the manylinux container, a separate - # process environment that only sees what cibuildwheel explicitly - # forwards (gotcha 707) - without this, both vars above are unset inside - # it and every reference below silently expands to the empty string. - CIBW_ENVIRONMENT_PASS_LINUX: ESPEAK_NG_REF ONNXRUNTIME_VERSION - # auditwheel's repair step (a separate invocation from before-all, - # in the same container) resolves NEEDED libraries like the system - # loader would; this fork's espeak-ng CMakeLists sets no RPATH, so - # without this libespeak-ng.so can't be found even though it was - # findable at link time via -L. - CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/project/espeak-ng/build/lib:/project/lib/Linux-riscv64/onnxruntime/lib - # Stages the same on-disk layout (lib/Linux-/onnxruntime, - # espeak-ng/build, piper_phonemize/{espeak-ng-data,libtashkeel_model.ort}) - # setup.py's hard-coded paths expect, matching upstream's own Makefile - # `python`/`python-wheel` targets. Fetches the onnxruntime .so via a - # fixed cp312 interpreter, not the matrix's own cp310/cp311: our - # riscv64 onnxruntime wheel starts at cp312 (the .so itself has no - # Python-ABI dependency, so any interpreter that can pip-install it - # works). The renamed .so keeps its original embedded SONAME - # (libonnxruntime.so.1) regardless of the filename on disk, so - # auditwheel can't find a match without re-soname'ing it too - # (gotcha 17's sherpa-onnx-core precedent for this same .so). - CIBW_BEFORE_ALL_LINUX: >- - dnf install -y cmake unzip git && - mkdir -p /tmp/espeak-ng-src && cd /tmp/espeak-ng-src && - git init -q && git remote add origin https://github.com/rhasspy/espeak-ng.git && - git fetch -q --depth 1 origin "${ESPEAK_NG_REF}" && git checkout -q FETCH_HEAD && - cd - && - cmake -S /tmp/espeak-ng-src -B /tmp/espeak-ng-build - -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR=lib - -DBUILD_ESPEAK_NG_TESTS=OFF - -DUSE_MBROLA=OFF -DUSE_LIBSONIC=OFF -DUSE_LIBPCAUDIO=OFF - -DUSE_KLATT=OFF -DUSE_SPEECHPLAYER=OFF - -DCMAKE_INSTALL_PREFIX="$(pwd)/espeak-ng/build" && - cmake --build /tmp/espeak-ng-build --parallel && - cmake --install /tmp/espeak-ng-build && - /opt/python/cp312-cp312/bin/python -m pip download --no-deps --only-binary=:all: - --index-url https://pypi.riseproject.dev/simple/ - -d /tmp/ort_pkg "onnxruntime==${ONNXRUNTIME_VERSION}" && - unzip -q /tmp/ort_pkg/*.whl -d /tmp/ort_pkg/extracted && - mkdir -p "lib/Linux-$(uname -m)/onnxruntime/lib" "lib/Linux-$(uname -m)/onnxruntime/include" && - cp /tmp/ort_pkg/extracted/onnxruntime/capi/libonnxruntime.so."${ONNXRUNTIME_VERSION}" - "lib/Linux-$(uname -m)/onnxruntime/lib/libonnxruntime.so" && - patchelf --set-soname libonnxruntime.so "lib/Linux-$(uname -m)/onnxruntime/lib/libonnxruntime.so" && - cp /tmp/ort_pkg/extracted/onnxruntime/capi/libonnxruntime_providers_shared.so - "lib/Linux-$(uname -m)/onnxruntime/lib/" && - curl -fsSL --retry 5 - "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz" - | tar xz -C "lib/Linux-$(uname -m)/onnxruntime" --wildcards --strip-components=1 - "onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}/include/*.h" && - cp -R espeak-ng/build/share/espeak-ng-data piper_phonemize/espeak-ng-data && - cp etc/libtashkeel_model.ort piper_phonemize/libtashkeel_model.ort && - cp /tmp/espeak-ng-src/COPYING COPYING.espeak-ng && - curl -fsSL --retry 5 "https://raw.githubusercontent.com/microsoft/onnxruntime/v${ONNXRUNTIME_VERSION}/LICENSE" -o LICENSE.onnxruntime - # Upstream's released wheel ships no licence text for either bundled - # library (verified against the real PyPI 1.1.0 wheel); setuptools' - # default file-list glob (COPYING*/LICEN[CS]E*) picks the two files - # staged above into dist-info/licenses/ without any patch. - CIBW_TEST_COMMAND: python {project}/src/python_test.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: piper-phonemize-${{ env.PIPER_PHONEMIZE_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "piper-phonemize" + version: "${{ matrix.version }}" + repository: "rhasspy/piper-phonemize" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + timeout-minutes: 120 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # CIBW_BEFORE_ALL_LINUX runs inside the manylinux container, a separate + # process environment that only sees what cibuildwheel explicitly + # forwards (gotcha 707) - without this, both vars above are unset inside + # it and every reference below silently expands to the empty string. + # auditwheel's repair step (a separate invocation from before-all, + # in the same container) resolves NEEDED libraries like the system + # loader would; this fork's espeak-ng CMakeLists sets no RPATH, so + # without this libespeak-ng.so can't be found even though it was + # findable at link time via -L. + cibw-environment-linux: "ESPEAK_NG_REF=8593723f10cfd9befd50de447f14bf0a9d2a14a4 ONNXRUNTIME_VERSION=1.31.0 LD_LIBRARY_PATH=/project/espeak-ng/build/lib:/project/lib/Linux-riscv64/onnxruntime/lib" + # Stages the same on-disk layout (lib/Linux-/onnxruntime, + # espeak-ng/build, piper_phonemize/{espeak-ng-data,libtashkeel_model.ort}) + # setup.py's hard-coded paths expect, matching upstream's own Makefile + # `python`/`python-wheel` targets. Fetches the onnxruntime .so via a + # fixed cp312 interpreter, not the matrix's own cp310/cp311: our + # riscv64 onnxruntime wheel starts at cp312 (the .so itself has no + # Python-ABI dependency, so any interpreter that can pip-install it + # works). The renamed .so keeps its original embedded SONAME + # (libonnxruntime.so.1) regardless of the filename on disk, so + # auditwheel can't find a match without re-soname'ing it too + # (gotcha 17's sherpa-onnx-core precedent for this same .so). + cibw-before-all-linux: > + dnf install -y cmake unzip git && + mkdir -p /tmp/espeak-ng-src && cd /tmp/espeak-ng-src && + git init -q && git remote add origin https://github.com/rhasspy/espeak-ng.git && + git fetch -q --depth 1 origin "${ESPEAK_NG_REF}" && git checkout -q FETCH_HEAD && + cd - && + cmake -S /tmp/espeak-ng-src -B /tmp/espeak-ng-build + -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR=lib + -DBUILD_ESPEAK_NG_TESTS=OFF + -DUSE_MBROLA=OFF -DUSE_LIBSONIC=OFF -DUSE_LIBPCAUDIO=OFF + -DUSE_KLATT=OFF -DUSE_SPEECHPLAYER=OFF + -DCMAKE_INSTALL_PREFIX="$(pwd)/espeak-ng/build" && + cmake --build /tmp/espeak-ng-build --parallel && + cmake --install /tmp/espeak-ng-build && + /opt/python/cp312-cp312/bin/python -m pip download --no-deps --only-binary=:all: + --index-url https://pypi.riseproject.dev/simple/ + -d /tmp/ort_pkg "onnxruntime==${ONNXRUNTIME_VERSION}" && + unzip -q /tmp/ort_pkg/*.whl -d /tmp/ort_pkg/extracted && + mkdir -p "lib/Linux-$(uname -m)/onnxruntime/lib" "lib/Linux-$(uname -m)/onnxruntime/include" && + cp /tmp/ort_pkg/extracted/onnxruntime/capi/libonnxruntime.so."${ONNXRUNTIME_VERSION}" + "lib/Linux-$(uname -m)/onnxruntime/lib/libonnxruntime.so" && + patchelf --set-soname libonnxruntime.so "lib/Linux-$(uname -m)/onnxruntime/lib/libonnxruntime.so" && + cp /tmp/ort_pkg/extracted/onnxruntime/capi/libonnxruntime_providers_shared.so + "lib/Linux-$(uname -m)/onnxruntime/lib/" && + curl -fsSL --retry 5 + "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz" + | tar xz -C "lib/Linux-$(uname -m)/onnxruntime" --wildcards --strip-components=1 + "onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}/include/*.h" && + cp -R espeak-ng/build/share/espeak-ng-data piper_phonemize/espeak-ng-data && + cp etc/libtashkeel_model.ort piper_phonemize/libtashkeel_model.ort && + cp /tmp/espeak-ng-src/COPYING COPYING.espeak-ng && + curl -fsSL --retry 5 "https://raw.githubusercontent.com/microsoft/onnxruntime/v${ONNXRUNTIME_VERSION}/LICENSE" -o LICENSE.onnxruntime + # Upstream's released wheel ships no licence text for either bundled + # library (verified against the real PyPI 1.1.0 wheel); setuptools' + # default file-list glob (COPYING*/LICEN[CS]E*) picks the two files + # staged above into dist-info/licenses/ without any patch. + cibw-test-command: "python {project}/src/python_test.py" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-polars-cloud.yml b/.github/workflows/build-polars-cloud.yml index e49353352fdd..7a26d34d3d34 100644 --- a/.github/workflows/build-polars-cloud.yml +++ b/.github/workflows/build-polars-cloud.yml @@ -55,55 +55,35 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build polars-cloud ${{ matrix.version }} cp310-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - POLARS_CLOUD_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout polars-cloud-client client-${{ env.POLARS_CLOUD_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: pola-rs/polars-cloud-client - ref: client-${{ env.POLARS_CLOUD_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: client - output-dir: wheelhouse/ - env: - # pyo3's abi3-py310 feature (client/crates/lib/Cargo.toml) makes this - # one wheel, built on cp310, the oldest interpreter its tag claims, - # and re-tested on cp312/cp313/cp314 via find_compatible_wheel. - CIBW_BUILD: >- - cp310-manylinux_riscv64 cp312-manylinux_riscv64 - cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # client/crates/lib pulls in protos-{common,client-compute,client-control}, - # which generate code with prost/tonic; Rocky 10's CRB repo (enabled in - # the image) carries protoc (gotcha 100). - CIBW_BEFORE_BUILD: yum install -y protobuf-compiler protobuf-devel - # Each protos crate's build.rs passes explicit, existing include dirs, - # so CRB's protoc resolves google/protobuf/*.proto from protobuf-devel - # by itself; PROTOC_INCLUDE stays unset (gotcha 599). - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_COMMAND: >- - python -c "import polars_cloud.polars_cloud as m; assert m.__file__.endswith('.so'), m.__file__" && - python -c "import polars_cloud as pc; print(pc.__version__)" && - pc --help - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: polars-cloud-${{ env.POLARS_CLOUD_VERSION }}-cp310-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "polars-cloud" + version: "${{ matrix.version }}" + repository: "pola-rs/polars-cloud-client" + ref: "client-${{ matrix.version }}" + artifact-tag: "cp310-abi3-manylinux_riscv64" + timeout-minutes: 360 + cibw-package-dir: "client" + # pyo3's abi3-py310 feature (client/crates/lib/Cargo.toml) makes this + # one wheel, built on cp310, the oldest interpreter its tag claims, + # and re-tested on cp312/cp313/cp314 via find_compatible_wheel. + cibw-build: > + cp310-manylinux_riscv64 cp312-manylinux_riscv64 + cp313-manylinux_riscv64 cp314-manylinux_riscv64 + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + # client/crates/lib pulls in protos-{common,client-compute,client-control}, + # which generate code with prost/tonic; Rocky 10's CRB repo (enabled in + # the image) carries protoc (gotcha 100). + cibw-before-build: "yum install -y protobuf-compiler protobuf-devel" + # Each protos crate's build.rs passes explicit, existing include dirs, + # so CRB's protoc resolves google/protobuf/*.proto from protobuf-devel + # by itself; PROTOC_INCLUDE stays unset (gotcha 599). + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-command: > + python -c "import polars_cloud.polars_cloud as m; assert m.__file__.endswith('.so'), m.__file__" && + python -c "import polars_cloud as pc; print(pc.__version__)" && + pc --help publish: name: Publish polars-cloud ${{ matrix.version }} diff --git a/.github/workflows/build-pqcrypto.yml b/.github/workflows/build-pqcrypto.yml index 68b8d07b7c14..7b7c6bdc2665 100644 --- a/.github/workflows/build-pqcrypto.yml +++ b/.github/workflows/build-pqcrypto.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pqcrypto ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: @@ -67,39 +65,24 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - PQCRYPTO_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pqcrypto v${{ env.PQCRYPTO_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: backbone-hq/pqcrypto - ref: v${{ env.PQCRYPTO_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # No [tool.cibuildwheel] upstream, so the Rust toolchain its maturin - # backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -q tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pqcrypto-${{ env.PQCRYPTO_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pqcrypto" + version: "${{ matrix.version }}" + repository: "backbone-hq/pqcrypto" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 90 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # No [tool.cibuildwheel] upstream, so the Rust toolchain its maturin + # backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -q tests" publish: name: Publish pqcrypto ${{ matrix.version }} diff --git a/.github/workflows/build-private-attribute-cpp.yml b/.github/workflows/build-private-attribute-cpp.yml index e1604280dd93..f65b2bdcb556 100644 --- a/.github/workflows/build-private-attribute-cpp.yml +++ b/.github/workflows/build-private-attribute-cpp.yml @@ -52,42 +52,23 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build private-attribute-cpp ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PRIVATE_ATTRIBUTE_CPP_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout private_attribute_cpp ${{ env.PRIVATE_ATTRIBUTE_CPP_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Locked-chess-official/private_attribute_cpp - ref: ${{ env.PRIVATE_ATTRIBUTE_CPP_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -X faulthandler -m pytest tests -vvs -W error - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: private-attribute-cpp-${{ env.PRIVATE_ATTRIBUTE_CPP_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "private-attribute-cpp" + version: "${{ matrix.version }}" + repository: "Locked-chess-official/private_attribute_cpp" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-musllinux-riscv64-image: "quay.io/pypa/musllinux_1_2_riscv64" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: "python -X faulthandler -m pytest tests -vvs -W error" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-pulp.yml b/.github/workflows/build-pulp.yml index 2c23444acb5d..645768a62899 100644 --- a/.github/workflows/build-pulp.yml +++ b/.github/workflows/build-pulp.yml @@ -49,57 +49,40 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pulp ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PULP_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pulp ${{ env.PULP_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: coin-or/pulp - ref: ${{ env.PULP_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is out of reach: rustup publishes rust-std but no - # rustc/cargo host toolchain for riscv64gc-unknown-linux-musl. - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pulp ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" - # numpy is an undeclared runtime import of pulp.apis.highs, pulled in - # unconditionally by pulp/__init__.py -> pulp.apis; plain `import pulp` - # fails without it even though it's missing from Requires-Dist. - CIBW_TEST_REQUIRES: pytest numpy - CIBW_TEST_SOURCES: pulp/tests pyproject.toml - # The rest of upstream's test suite exercises third-party/commercial - # solvers (Gurobi, CPLEX, Mosek, Xpress, COPT, cuOpt) that are neither - # installed nor runnable here; test_rust_core.py exercises the actual - # compiled extension end to end (toRustModel/summary) with no solver. - CIBW_TEST_COMMAND: >- - python -c "import pulp._rustcore as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v pulp/tests/test_rust_core.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pulp-${{ env.PULP_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pulp" + version: "${{ matrix.version }}" + repository: "coin-or/pulp" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + # musllinux is out of reach: rustup publishes rust-std but no + # rustc/cargo host toolchain for riscv64gc-unknown-linux-musl. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pulp ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + # numpy is an undeclared runtime import of pulp.apis.highs, pulled in + # unconditionally by pulp/__init__.py -> pulp.apis; plain `import pulp` + # fails without it even though it's missing from Requires-Dist. + cibw-test-requires: "pytest numpy" + cibw-test-sources: "pulp/tests pyproject.toml" + # The rest of upstream's test suite exercises third-party/commercial + # solvers (Gurobi, CPLEX, Mosek, Xpress, COPT, cuOpt) that are neither + # installed nor runnable here; test_rust_core.py exercises the actual + # compiled extension end to end (toRustModel/summary) with no solver. + cibw-test-command: > + python -c "import pulp._rustcore as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v pulp/tests/test_rust_core.py publish: name: Publish pulp ${{ matrix.version }} diff --git a/.github/workflows/build-py-ballisticcalc-exts.yml b/.github/workflows/build-py-ballisticcalc-exts.yml index 3dca8cc0d9e9..33ff9cb1ab57 100644 --- a/.github/workflows/build-py-ballisticcalc-exts.yml +++ b/.github/workflows/build-py-ballisticcalc-exts.yml @@ -52,8 +52,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build py-ballisticcalc-exts ${{ matrix.version }} ${{ matrix.tag }}-${{ matrix.libc }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: @@ -68,44 +66,27 @@ jobs: - tag: cp314t build: cp314t - env: - PY_BALLISTICCALC_EXTS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout py-ballisticcalc v${{ env.PY_BALLISTICCALC_EXTS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: o-murphy/py-ballisticcalc - ref: v${{ env.PY_BALLISTICCALC_EXTS_VERSION }} - submodules: recursive - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: py_ballisticcalc.exts - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.build }}-${{ matrix.libc }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }} - # Upstream's build[uv] needs a host uv the riscv64 runner does not have (gotcha 13). - CIBW_BUILD_FRONTEND: build - CIBW_ENVIRONMENT: >- - SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PY_BALLISTICCALC_EXTS=${{ env.PY_BALLISTICCALC_EXTS_VERSION }} - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_SOURCES: pyproject.toml tests py_ballisticcalc.exts/pyproject.toml py_ballisticcalc.exts/tests - CIBW_TEST_REQUIRES: pytest py-ballisticcalc==${{ env.PY_BALLISTICCALC_EXTS_VERSION }} - CIBW_TEST_COMMAND: >- - for engine in cythonized_euler_engine cythonized_rk4_engine cythonized_verlet_engine; do - python -m pytest py_ballisticcalc.exts/tests -v --engine=$engine && - python -m pytest tests -v --engine=$engine || exit 1; done - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: py-ballisticcalc-exts-${{ env.PY_BALLISTICCALC_EXTS_VERSION }}-${{ matrix.tag }}-${{ matrix.libc }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "py-ballisticcalc-exts" + version: "${{ matrix.version }}" + repository: "o-murphy/py-ballisticcalc" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-${{ matrix.libc }}_riscv64" + timeout-minutes: 120 + checkout-submodules: "recursive" + cibw-package-dir: "py_ballisticcalc.exts" + cibw-build: "${{ matrix.build }}-${{ matrix.libc }}_riscv64" + cibw-musllinux-riscv64-image: "quay.io/pypa/musllinux_1_2_riscv64" + # Upstream's build[uv] needs a host uv the riscv64 runner does not have (gotcha 13). + cibw-build-frontend: "build" + cibw-environment-linux: "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PY_BALLISTICCALC_EXTS=${{ matrix.version }}" + cibw-test-sources: "pyproject.toml tests py_ballisticcalc.exts/pyproject.toml py_ballisticcalc.exts/tests" + cibw-test-requires: "pytest py-ballisticcalc==${{ matrix.version }}" + cibw-test-command: > + for engine in cythonized_euler_engine cythonized_rk4_engine cythonized_verlet_engine; do + python -m pytest py_ballisticcalc.exts/tests -v --engine=$engine && + python -m pytest tests -v --engine=$engine || exit 1; done gpl_sources: needs: [setup] diff --git a/.github/workflows/build-py-horned-owl.yml b/.github/workflows/build-py-horned-owl.yml index 0ee62811e94d..402138722c12 100644 --- a/.github/workflows/build-py-horned-owl.yml +++ b/.github/workflows/build-py-horned-owl.yml @@ -49,53 +49,35 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build py-horned-owl ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PY_HORNED_OWL_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout py-horned-owl v${{ env.PY_HORNED_OWL_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ontology-tools/py-horned-owl - ref: v${{ env.PY_HORNED_OWL_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # py-horned-owl ships no [tool.cibuildwheel]; the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - # The suite sits in a sibling test/ (not inside the pyhornedowl/ package), but - # running it straight from the checkout still shadows the wheel: `python -m` - # prepends the checkout root (which holds the uncompiled pyhornedowl/ source) - # to sys.path regardless (gotcha 218). test-sources stages only test/ into an - # empty cwd so the import can only resolve to the installed wheel. - CIBW_TEST_SOURCES: test - CIBW_TEST_COMMAND: >- - python -c "import pyhornedowl.pyhornedowl as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest test/ - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: py-horned-owl-${{ env.PY_HORNED_OWL_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "py-horned-owl" + version: "${{ matrix.version }}" + repository: "ontology-tools/py-horned-owl" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # py-horned-owl ships no [tool.cibuildwheel]; the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + # The suite sits in a sibling test/ (not inside the pyhornedowl/ package), but + # running it straight from the checkout still shadows the wheel: `python -m` + # prepends the checkout root (which holds the uncompiled pyhornedowl/ source) + # to sys.path regardless (gotcha 218). test-sources stages only test/ into an + # empty cwd so the import can only resolve to the installed wheel. + cibw-test-sources: "test" + cibw-test-command: > + python -c "import pyhornedowl.pyhornedowl as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest test/ publish: name: Publish py-horned-owl ${{ matrix.version }} diff --git a/.github/workflows/build-py-rust-stemmers.yml b/.github/workflows/build-py-rust-stemmers.yml index 73a52e48a906..a3c639a55612 100644 --- a/.github/workflows/build-py-rust-stemmers.yml +++ b/.github/workflows/build-py-rust-stemmers.yml @@ -49,51 +49,34 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build py-rust-stemmers ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PY_RUST_STEMMERS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout py-rust-stemmers v${{ env.PY_RUST_STEMMERS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: qdrant/py-rust-stemmers - ref: v${{ env.PY_RUST_STEMMERS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is out of reach: rustup publishes rust-std but no - # rustc/cargo host toolchain for riscv64gc-unknown-linux-musl. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # py-rust-stemmers ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | - sh -s -- -y --profile minimal - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests pyproject.toml - CIBW_TEST_COMMAND: >- - python -c "import py_rust_stemmers.py_rust_stemmers as m; - assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: py_rust_stemmers-${{ env.PY_RUST_STEMMERS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "py_rust_stemmers" + version: "${{ matrix.version }}" + repository: "qdrant/py-rust-stemmers" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + # musllinux is out of reach: rustup publishes rust-std but no + # rustc/cargo host toolchain for riscv64gc-unknown-linux-musl. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # py-rust-stemmers ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | + sh -s -- -y --profile minimal + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests pyproject.toml" + cibw-test-command: > + python -c "import py_rust_stemmers.py_rust_stemmers as m; + assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish py-rust-stemmers ${{ matrix.version }} diff --git a/.github/workflows/build-py-svg-hush.yml b/.github/workflows/build-py-svg-hush.yml index ea9cc0e6c062..770ebc7cf545 100644 --- a/.github/workflows/build-py-svg-hush.yml +++ b/.github/workflows/build-py-svg-hush.yml @@ -49,50 +49,32 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build py-svg-hush ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PY_SVG_HUSH_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout py-svg-hush v${{ env.PY_SVG_HUSH_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: jams2/py-svg-hush - ref: v${{ env.PY_SVG_HUSH_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # py-svg-hush ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - # maturin auto-generates a py_svg_hush/__init__.py shim ("from - # .py_svg_hush import *") around the compiled py_svg_hush.py_svg_hush - # submodule, so that's the .so to check (gotcha 314). - CIBW_TEST_COMMAND: >- - python -c "import py_svg_hush.py_svg_hush as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: py-svg-hush-${{ env.PY_SVG_HUSH_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "py-svg-hush" + version: "${{ matrix.version }}" + repository: "jams2/py-svg-hush" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # py-svg-hush ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + # maturin auto-generates a py_svg_hush/__init__.py shim ("from + # .py_svg_hush import *") around the compiled py_svg_hush.py_svg_hush + # submodule, so that's the .so to check (gotcha 314). + cibw-test-command: > + python -c "import py_svg_hush.py_svg_hush as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish py-svg-hush ${{ matrix.version }} diff --git a/.github/workflows/build-pycrc32.yml b/.github/workflows/build-pycrc32.yml index f28926e5d5cb..1e15936a4645 100644 --- a/.github/workflows/build-pycrc32.yml +++ b/.github/workflows/build-pycrc32.yml @@ -49,53 +49,35 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pycrc32 ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYCRC32_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pycrc32 v${{ env.PYCRC32_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: code-inflation/pycrc32 - ref: v${{ env.PYCRC32_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pycrc32 ships no [tool.cibuildwheel]; the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - # The test suite lives at pycrc32/tests, inside the importable package - # directory (which also holds __init__.py). Staging only the tests - # subtree keeps test_cwd's pycrc32/ from carrying an __init__.py, so - # it stays a harmless namespace portion and the installed wheel's - # concrete package wins the import (gotcha 174). - CIBW_TEST_SOURCES: pycrc32/tests - CIBW_TEST_COMMAND: >- - python -c "import pycrc32.pycrc32 as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest pycrc32/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pycrc32-${{ env.PYCRC32_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pycrc32" + version: "${{ matrix.version }}" + repository: "code-inflation/pycrc32" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pycrc32 ships no [tool.cibuildwheel]; the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + # The test suite lives at pycrc32/tests, inside the importable package + # directory (which also holds __init__.py). Staging only the tests + # subtree keeps test_cwd's pycrc32/ from carrying an __init__.py, so + # it stays a harmless namespace portion and the installed wheel's + # concrete package wins the import (gotcha 174). + cibw-test-sources: "pycrc32/tests" + cibw-test-command: > + python -c "import pycrc32.pycrc32 as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest pycrc32/tests publish: name: Publish pycrc32 ${{ matrix.version }} diff --git a/.github/workflows/build-pycrdt.yml b/.github/workflows/build-pycrdt.yml index 59238a6ecf40..c1f5f7b039be 100644 --- a/.github/workflows/build-pycrdt.yml +++ b/.github/workflows/build-pycrdt.yml @@ -49,50 +49,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pycrdt ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYCRDT_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pycrdt ${{ env.PYCRDT_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: y-crdt/pycrdt - ref: ${{ env.PYCRDT_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - output-dir: wheelhouse/ - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pycrdt ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=pydantic-core - CIBW_TEST_REQUIRES: "pytest>=8.3.5,<10 trio>=0.25.1,<0.35 pydantic>=2.5.2,<3" - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import pycrdt._pycrdt as m; assert m.__file__.endswith('.so'), m.__file__" - && python -m pytest -v tests --ignore tests/test_types.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pycrdt-${{ env.PYCRDT_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pycrdt" + version: "${{ matrix.version }}" + repository: "y-crdt/pycrdt" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pycrdt ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-environment: "PIP_ONLY_BINARY=pydantic-core" + cibw-test-requires: "pytest>=8.3.5,<10 trio>=0.25.1,<0.35 pydantic>=2.5.2,<3" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import pycrdt._pycrdt as m; assert m.__file__.endswith('.so'), m.__file__" + && python -m pytest -v tests --ignore tests/test_types.py publish: name: Publish pycrdt ${{ matrix.version }} diff --git a/.github/workflows/build-pycryptodomex.yml b/.github/workflows/build-pycryptodomex.yml index 5ef3a45b2ea5..eb53e62486a8 100644 --- a/.github/workflows/build-pycryptodomex.yml +++ b/.github/workflows/build-pycryptodomex.yml @@ -58,36 +58,20 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build pycryptodomex ${{ matrix.version }} cp37-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 - - env: - PYCRYPTODOMEX_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pycryptodome v${{ env.PYCRYPTODOMEX_VERSION }}x - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Legrandin/pycryptodome - ref: v${{ env.PYCRYPTODOMEX_VERSION }}x - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_TEST_REQUIRES: ${{ env.TEST_REQUIRES }} - CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pycryptodomex-${{ env.PYCRYPTODOMEX_VERSION }}-cp37-abi3-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # Free-threaded builds get no abi3 wheel (setup.py skips py_limited_api under + # Py_GIL_DISABLED); cp314t is the only free-threaded interpreter in the image. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pycryptodomex" + version: "${{ matrix.version }}" + repository: "Legrandin/pycryptodome" + ref: "v${{ matrix.version }}x" + artifact-tag: "cp37-abi3-manylinux_riscv64" + timeout-minutes: 180 + cibw-build: "cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64" + cibw-test-requires: "pycryptodome-test-vectors==1.0.22" + cibw-test-command: "python -m Cryptodome.SelfTest --skip-slow-tests" - # Free-threaded builds get no abi3 wheel (setup.py skips py_limited_api under - # Py_GIL_DISABLED); cp314t is the only free-threaded interpreter in the image. build_freethreaded: needs: [setup] if: needs.setup.outputs.versions != '[]' @@ -96,33 +80,17 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build pycryptodomex ${{ matrix.version }} cp314t-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 - - env: - PYCRYPTODOMEX_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pycryptodome v${{ env.PYCRYPTODOMEX_VERSION }}x - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Legrandin/pycryptodome - ref: v${{ env.PYCRYPTODOMEX_VERSION }}x - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp314t-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_TEST_REQUIRES: ${{ env.TEST_REQUIRES }} - CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pycryptodomex-${{ env.PYCRYPTODOMEX_VERSION }}-cp314t-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pycryptodomex" + version: "${{ matrix.version }}" + repository: "Legrandin/pycryptodome" + ref: "v${{ matrix.version }}x" + artifact-tag: "cp314t-manylinux_riscv64" + timeout-minutes: 180 + cibw-build: "cp314t-manylinux_riscv64" + cibw-test-requires: "pycryptodome-test-vectors==1.0.22" + cibw-test-command: "python -m Cryptodome.SelfTest --skip-slow-tests" publish: name: Publish pycryptodomex ${{ matrix.version }} diff --git a/.github/workflows/build-pyfixest.yml b/.github/workflows/build-pyfixest.yml index d6f8216bc6a1..ea690048d49f 100644 --- a/.github/workflows/build-pyfixest.yml +++ b/.github/workflows/build-pyfixest.yml @@ -49,73 +49,53 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pyfixest ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYFIXEST_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pyfixest v${{ env.PYFIXEST_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: py-econometrics/pyfixest - ref: v${{ env.PYFIXEST_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - output-dir: wheelhouse/ - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pyfixest ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,scipy,pandas,matplotlib,duckdb,pillow,polars-runtime-32,pyarrow - CIBW_TEST_REQUIRES: pytest pytest-xdist pytest-benchmark duckdb matplotlib polars pyarrow - CIBW_TEST_SOURCES: tests benchmarks pyfixest/did/data - # test_collinearity.py, test_count_fixef_fully_nested.py, - # test_demean.py and test_detect_singletons.py import pyfixest's - # numba/jax backends at module scope, and the jax-named tests and - # test_wildboottest.py/test_rwolf_error (wildboottest needs numba) - # call them; neither has a riscv64 wheel anywhere, nor a port in - # this repo. test_batched_lsmr.py and test_lsmr_compiled.py import - # torch, which has no riscv64 wheel either. test_quantreg.py needs - # statsmodels, which has no riscv64 wheel for cp314 (CLAUDE.md - # gotcha 84). test_check_version.py tests upstream's release script - # under .github/, not the wheel. test_errors_etable expects the - # AssertionError of upstream's locked maketables 0.1.8; 0.2.0 - # raises ValueError. - CIBW_TEST_COMMAND: >- - python -c "import pyfixest.core._core_impl as m; assert m.__file__.endswith('.so'), m.__file__" - && python -m pytest -v tests -n auto - -m "not (extended or against_r_core or against_r_extended or plots or hac)" - -k "not (jax or test_rwolf_error or test_errors_etable)" - --ignore tests/test_batched_lsmr.py - --ignore tests/test_check_version.py - --ignore tests/test_collinearity.py - --ignore tests/test_count_fixef_fully_nested.py - --ignore tests/test_demean.py - --ignore tests/test_detect_singletons.py - --ignore tests/test_lsmr_compiled.py - --ignore tests/test_quantreg.py - --ignore tests/test_wildboottest.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyfixest-${{ env.PYFIXEST_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pyfixest" + version: "${{ matrix.version }}" + repository: "py-econometrics/pyfixest" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 180 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pyfixest ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\" PIP_ONLY_BINARY=numpy,scipy,pandas,matplotlib,duckdb,pillow,polars-runtime-32,pyarrow" + cibw-test-requires: "pytest pytest-xdist pytest-benchmark duckdb matplotlib polars pyarrow" + cibw-test-sources: "tests benchmarks pyfixest/did/data" + # test_collinearity.py, test_count_fixef_fully_nested.py, + # test_demean.py and test_detect_singletons.py import pyfixest's + # numba/jax backends at module scope, and the jax-named tests and + # test_wildboottest.py/test_rwolf_error (wildboottest needs numba) + # call them; neither has a riscv64 wheel anywhere, nor a port in + # this repo. test_batched_lsmr.py and test_lsmr_compiled.py import + # torch, which has no riscv64 wheel either. test_quantreg.py needs + # statsmodels, which has no riscv64 wheel for cp314 (CLAUDE.md + # gotcha 84). test_check_version.py tests upstream's release script + # under .github/, not the wheel. test_errors_etable expects the + # AssertionError of upstream's locked maketables 0.1.8; 0.2.0 + # raises ValueError. + cibw-test-command: > + python -c "import pyfixest.core._core_impl as m; assert m.__file__.endswith('.so'), m.__file__" + && python -m pytest -v tests -n auto + -m "not (extended or against_r_core or against_r_extended or plots or hac)" + -k "not (jax or test_rwolf_error or test_errors_etable)" + --ignore tests/test_batched_lsmr.py + --ignore tests/test_check_version.py + --ignore tests/test_collinearity.py + --ignore tests/test_count_fixef_fully_nested.py + --ignore tests/test_demean.py + --ignore tests/test_detect_singletons.py + --ignore tests/test_lsmr_compiled.py + --ignore tests/test_quantreg.py + --ignore tests/test_wildboottest.py publish: name: Publish pyfixest ${{ matrix.version }} diff --git a/.github/workflows/build-pyiceberg-core.yml b/.github/workflows/build-pyiceberg-core.yml index 84c729fc4a5b..481f1938a6e3 100644 --- a/.github/workflows/build-pyiceberg-core.yml +++ b/.github/workflows/build-pyiceberg-core.yml @@ -52,70 +52,50 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build pyiceberg-core ${{ matrix.version }} cp310-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - PYICEBERG_CORE_VERSION: ${{ matrix.version }} - - steps: - # Checked out at the workspace root: bindings/python is a member of the - # iceberg-rust Cargo workspace and builds against its sibling crates. - - name: Checkout iceberg-rust v${{ env.PYICEBERG_CORE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: apache/iceberg-rust - ref: v${{ env.PYICEBERG_CORE_VERSION }} - persist-credentials: false - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: bindings/python - output-dir: wheelhouse/ - # pyo3 carries abi3-py310 unconditionally, so upstream ships one - # cp310-abi3 wheel (their own release job builds it on python3.12, - # not the abi3 floor); pypi.riseproject.dev also has no riscv64 - # pyarrow/pyiceberg/fastavro wheel below cp312, so cp312 is where we - # build and test too (build-deltalake.yml takes the same wheel-once - # approach for the same reasons). - only: cp312-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # iceberg-rust ships no [tool.cibuildwheel]; the Rust toolchain its - # maturin backend needs is installed in-container here. musllinux is - # dropped - rustup.rs ships no riscv64 musl toolchain. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # The checkout's rust-toolchain.toml pins a nightly for clippy/rustfmt - # only (its own comment: "will not affect downstream users") but that - # file ships in the git tree, not the sdist pip builds from, so it - # overrides the stable toolchain above unless RUSTUP_TOOLCHAIN forces it. - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" RUSTUP_TOOLCHAIN=stable - # conftest.py imports pyiceberg at module level for every test file. - CIBW_TEST_REQUIRES: pytest pyarrow>=17 pyiceberg>=0.11 - # test-sources resolves against the checkout root, not package-dir. - CIBW_TEST_SOURCES: bindings/python/tests bindings/python/pyproject.toml - CIBW_TEST_ENVIRONMENT_LINUX: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=pyarrow,pyiceberg - # test_datafusion_table_provider.py and test_huggingface_and_cdc.py both - # `import datafusion` unconditionally, which has no riscv64 wheel anywhere. - # test_manifest.py imports pyiceberg.io.pyarrow, which unconditionally - # imports pyarrow._s3fs; build-pyarrow.yml ships ARROW_S3=OFF for riscv64, - # so that module can't be imported here either. Verified against the real - # riscv64 wheel: only test_transform.py collects and runs (11 passed). - CIBW_TEST_COMMAND: >- - cd bindings/python && - python -c "import pyiceberg_core.pyiceberg_core_rust as m; - assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest tests/test_transform.py -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyiceberg-core-${{ env.PYICEBERG_CORE_VERSION }}-cp310-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # Checked out at the workspace root: bindings/python is a member of the + # iceberg-rust Cargo workspace and builds against its sibling crates. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pyiceberg-core" + version: "${{ matrix.version }}" + repository: "apache/iceberg-rust" + ref: "v${{ matrix.version }}" + artifact-tag: "cp310-abi3-manylinux_riscv64" + timeout-minutes: 360 + cibw-package-dir: "bindings/python" + # pyo3 carries abi3-py310 unconditionally, so upstream ships one + # cp310-abi3 wheel (their own release job builds it on python3.12, + # not the abi3 floor); pypi.riseproject.dev also has no riscv64 + # pyarrow/pyiceberg/fastavro wheel below cp312, so cp312 is where we + # build and test too (build-deltalake.yml takes the same wheel-once + # approach for the same reasons). + cibw-build: "cp312-manylinux_riscv64" + # iceberg-rust ships no [tool.cibuildwheel]; the Rust toolchain its + # maturin backend needs is installed in-container here. musllinux is + # dropped - rustup.rs ships no riscv64 musl toolchain. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + # The checkout's rust-toolchain.toml pins a nightly for clippy/rustfmt + # only (its own comment: "will not affect downstream users") but that + # file ships in the git tree, not the sdist pip builds from, so it + # overrides the stable toolchain above unless RUSTUP_TOOLCHAIN forces it. + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" RUSTUP_TOOLCHAIN=stable" + # conftest.py imports pyiceberg at module level for every test file. + cibw-test-requires: "pytest pyarrow>=17 pyiceberg>=0.11" + # test-sources resolves against the checkout root, not package-dir. + cibw-test-sources: "bindings/python/tests bindings/python/pyproject.toml" + cibw-test-environment-linux: "PIP_ONLY_BINARY=pyarrow,pyiceberg" + # test_datafusion_table_provider.py and test_huggingface_and_cdc.py both + # `import datafusion` unconditionally, which has no riscv64 wheel anywhere. + # test_manifest.py imports pyiceberg.io.pyarrow, which unconditionally + # imports pyarrow._s3fs; build-pyarrow.yml ships ARROW_S3=OFF for riscv64, + # so that module can't be imported here either. Verified against the real + # riscv64 wheel: only test_transform.py collects and runs (11 passed). + cibw-test-command: > + cd bindings/python && + python -c "import pyiceberg_core.pyiceberg_core_rust as m; + assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest tests/test_transform.py -v publish: name: Publish pyiceberg-core ${{ matrix.version }} diff --git a/.github/workflows/build-pyjnius.yml b/.github/workflows/build-pyjnius.yml index 10e5aaeeee59..e03fa7d00e80 100644 --- a/.github/workflows/build-pyjnius.yml +++ b/.github/workflows/build-pyjnius.yml @@ -51,39 +51,21 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pyjnius ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYJNIUS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pyjnius ${{ env.PYJNIUS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: kivy/pyjnius - ref: ${{ env.PYJNIUS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Upstream builds against JDK 11; Rocky 10 only packages JDK 21. - CIBW_BEFORE_ALL_LINUX: dnf -y install java-21-openjdk-devel - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyjnius-${{ env.PYJNIUS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pyjnius" + version: "${{ matrix.version }}" + repository: "kivy/pyjnius" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Upstream builds against JDK 11; Rocky 10 only packages JDK 21. + cibw-before-all-linux: "dnf -y install java-21-openjdk-devel" test_wheels: needs: [setup, build_wheels] diff --git a/.github/workflows/build-pykvfinder.yml b/.github/workflows/build-pykvfinder.yml index f4e1d4792aa6..5cbd0f1a1ec8 100644 --- a/.github/workflows/build-pykvfinder.yml +++ b/.github/workflows/build-pykvfinder.yml @@ -51,41 +51,20 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pykvfinder ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYKVFINDER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pyKVFinder v${{ env.PYKVFINDER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: LBC-LNBio/pyKVFinder - ref: v${{ env.PYKVFINDER_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT_LINUX: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,matplotlib,pillow,contourpy,kiwisolver - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pykvfinder-${{ env.PYKVFINDER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error - + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pykvfinder" + version: "${{ matrix.version }}" + repository: "LBC-LNBio/pyKVFinder" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-environment-linux: "PIP_ONLY_BINARY=numpy,matplotlib,pillow,contourpy,kiwisolver" gpl_sources: needs: [setup] if: needs.setup.outputs.versions != '[]' diff --git a/.github/workflows/build-pymicro-vad.yml b/.github/workflows/build-pymicro-vad.yml index 10b9f1454d54..70d65dd9c94a 100644 --- a/.github/workflows/build-pymicro-vad.yml +++ b/.github/workflows/build-pymicro-vad.yml @@ -56,38 +56,19 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build pymicro-vad ${{ matrix.version }} cp312-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 - env: - PYMICRO_VAD_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pymicro-vad v${{ env.PYMICRO_VAD_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rhasspy/pymicro-vad - ref: v${{ env.PYMICRO_VAD_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: >- - cp312-manylinux_riscv64 cp313-manylinux_riscv64 - cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_CONFIG_SETTINGS: --build-option=--py-limited-api=${{ env.ABI3_FLOOR }} - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest -q {package}/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pymicro-vad-${{ env.PYMICRO_VAD_VERSION }}-cp312-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pymicro-vad" + version: "${{ matrix.version }}" + repository: "rhasspy/pymicro-vad" + ref: "v${{ matrix.version }}" + artifact-tag: "cp312-abi3-manylinux_riscv64" + cibw-build: > + cp312-manylinux_riscv64 cp313-manylinux_riscv64 + cp314-manylinux_riscv64 + cibw-config-settings: "--build-option=--py-limited-api=cp312" + cibw-test-requires: "pytest" + cibw-test-command: "pytest -q {package}/tests" publish: name: Publish pymicro-vad ${{ matrix.version }} diff --git a/.github/workflows/build-pyoxipng.yml b/.github/workflows/build-pyoxipng.yml index 7d93347a97ff..c556df38e13f 100644 --- a/.github/workflows/build-pyoxipng.yml +++ b/.github/workflows/build-pyoxipng.yml @@ -49,52 +49,34 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pyoxipng ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYOXIPNG_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pyoxipng v${{ env.PYOXIPNG_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: nfrasser/pyoxipng - ref: v${{ env.PYOXIPNG_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pyoxipng ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: test - # pyoxipng's pyproject.toml has no python-source; maturin - # auto-generates an oxipng/__init__.py shim ("from .oxipng import - # *") around the compiled oxipng.oxipng submodule, so that's the - # .so to check. - CIBW_TEST_COMMAND: >- - python -c "import oxipng.oxipng as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyoxipng-${{ env.PYOXIPNG_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pyoxipng" + version: "${{ matrix.version }}" + repository: "nfrasser/pyoxipng" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pyoxipng ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "test" + # pyoxipng's pyproject.toml has no python-source; maturin + # auto-generates an oxipng/__init__.py shim ("from .oxipng import + # *") around the compiled oxipng.oxipng submodule, so that's the + # .so to check. + cibw-test-command: > + python -c "import oxipng.oxipng as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v test publish: name: Publish pyoxipng ${{ matrix.version }} diff --git a/.github/workflows/build-pyrage.yml b/.github/workflows/build-pyrage.yml index e0a6bcac59e9..f5ea35702e25 100644 --- a/.github/workflows/build-pyrage.yml +++ b/.github/workflows/build-pyrage.yml @@ -50,8 +50,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pyrage ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -74,44 +72,28 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - PYRAGE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pyrage v${{ env.PYRAGE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: woodruffw/pyrage - ref: v${{ env.PYRAGE_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pyrage ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest parameterized - CIBW_TEST_SOURCES: test - # No python-source in pyproject.toml, so maturin ships an auto-generated - # pyrage/__init__.py shim around the compiled pyrage/pyrage.*.so submodule - # (gotcha 314) - probe that submodule, not the top-level import. - CIBW_TEST_COMMAND: >- - python -c "import pyrage.pyrage as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pyrage-${{ env.PYRAGE_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pyrage" + version: "${{ matrix.version }}" + repository: "woodruffw/pyrage" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # pyrage ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest parameterized" + cibw-test-sources: "test" + # No python-source in pyproject.toml, so maturin ships an auto-generated + # pyrage/__init__.py shim around the compiled pyrage/pyrage.*.so submodule + # (gotcha 314) - probe that submodule, not the top-level import. + cibw-test-command: > + python -c "import pyrage.pyrage as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v test publish: name: Publish pyrage ${{ matrix.version }} diff --git a/.github/workflows/build-pysentry-rs.yml b/.github/workflows/build-pysentry-rs.yml index e298e432fecc..59509b335f44 100644 --- a/.github/workflows/build-pysentry-rs.yml +++ b/.github/workflows/build-pysentry-rs.yml @@ -48,46 +48,28 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pysentry-rs ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYSENTRY_RS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pysentry-rs ${{ env.PYSENTRY_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: nyudenkov/pysentry - ref: v${{ env.PYSENTRY_RS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # pysentry-rs ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container. - 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" - CIBW_TEST_COMMAND: >- - python -c "import pysentry; assert pysentry._internal.__file__.endswith('.so'), pysentry._internal.__file__; print(pysentry.get_version())" && - pysentry-rs --help - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pysentry-rs-${{ env.PYSENTRY_RS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pysentry-rs" + version: "${{ matrix.version }}" + repository: "nyudenkov/pysentry" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pysentry-rs ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container. + 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\"" + cibw-test-command: > + python -c "import pysentry; assert pysentry._internal.__file__.endswith('.so'), pysentry._internal.__file__; print(pysentry.get_version())" && + pysentry-rs --help publish: name: Publish pysentry-rs ${{ matrix.version }} diff --git a/.github/workflows/build-pysequoia.yml b/.github/workflows/build-pysequoia.yml index df14e5786f1c..2068ef557612 100644 --- a/.github/workflows/build-pysequoia.yml +++ b/.github/workflows/build-pysequoia.yml @@ -49,48 +49,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build pysequoia ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - PYSEQUOIA_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout pysequoia v${{ env.PYSEQUOIA_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: wiktor-k/pysequoia - ref: v${{ env.PYSEQUOIA_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: the riscv64 musl-hosted rustc segfaulted (SIGSEGV) in 2 of 2 - # musl legs, on different crates (p521, sequoia-openpgp); the glibc-hosted one is - # reliable (gotcha 639). - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import pysequoia.pysequoia as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pysequoia-${{ env.PYSEQUOIA_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "pysequoia" + version: "${{ matrix.version }}" + repository: "wiktor-k/pysequoia" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + # musllinux is dropped: the riscv64 musl-hosted rustc segfaulted (SIGSEGV) in 2 of 2 + # musl legs, on different crates (p521, sequoia-openpgp); the glibc-hosted one is + # reliable (gotcha 639). + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import pysequoia.pysequoia as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish pysequoia ${{ matrix.version }} diff --git a/.github/workflows/build-python-calamine.yml b/.github/workflows/build-python-calamine.yml index e29ef84fe053..667d9bf0f93e 100644 --- a/.github/workflows/build-python-calamine.yml +++ b/.github/workflows/build-python-calamine.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build python-calamine ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -66,45 +64,28 @@ jobs: - python: cp314t pandas: '' - env: - PYTHON_CALAMINE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout python-calamine v${{ env.PYTHON_CALAMINE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: dimastbk/python-calamine - ref: v${{ env.PYTHON_CALAMINE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-manylinux_riscv64 - output-dir: wheelhouse/ - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # python-calamine ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=pandas,numpy - CIBW_TEST_REQUIRES: pytest~=9.0 ${{ matrix.pandas }} - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import python_calamine._python_calamine as m; - assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: python-calamine-${{ env.PYTHON_CALAMINE_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "python-calamine" + version: "${{ matrix.version }}" + repository: "dimastbk/python-calamine" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-manylinux_riscv64" + # python-calamine ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-environment: "PIP_ONLY_BINARY=pandas,numpy" + cibw-test-requires: "pytest~=9.0 ${{ matrix.pandas }}" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import python_calamine._python_calamine as m; + assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish python-calamine ${{ matrix.version }} diff --git a/.github/workflows/build-python-ripgrep.yml b/.github/workflows/build-python-ripgrep.yml index 80fcf270e9a8..7f280a16091b 100644 --- a/.github/workflows/build-python-ripgrep.yml +++ b/.github/workflows/build-python-ripgrep.yml @@ -58,64 +58,46 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build python-ripgrep ${{ matrix.version }} cp38-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - PYTHON_RIPGREP_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout python-ripgrep ${{ env.PYTHON_RIPGREP_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: indent-com/python-ripgrep - ref: ${{ env.PYTHON_RIPGREP_REF }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - # - # pyo3's abi3-py38 feature means this is one wheel (always tagged - # cp38-abi3, whichever interpreter builds it), but 0.0.9's own - # pyproject.toml sets requires-python ">=3.10,<3.13" -- narrower - # than the abi3 floor -- so building (and, worse, testing) on - # cp38/cp39 would have pip refuse to install the just-built wheel - # on its own test venv. cp310 is both the real installable floor - # and upstream's own ci.yml matrix floor, so it is built there and - # re-tested on cp311/cp312 via find_compatible_wheel; cp313/cp314 - # are dropped, matching the "<3.13" upper bound upstream declares - # (and pyo3 0.22.3 predates 3.14 besides). - CIBW_BUILD: >- - cp310-manylinux_riscv64 cp311-manylinux_riscv64 - cp312-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # python-ripgrep ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_SOURCES: src test.py - # test.py is upstream's own `python test.py` smoke test (ci.yml); - # python_ripgrep/__init__.py is a maturin-generated shim re-exporting - # the compiled submodule, so that submodule is probed by its own name. - CIBW_TEST_COMMAND: >- - python -c "from python_ripgrep import python_ripgrep as ext; - assert ext.__file__.endswith('.so'), ext.__file__" && - python test.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: python-ripgrep-${{ env.PYTHON_RIPGREP_VERSION }}-cp38-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "python-ripgrep" + version: "${{ matrix.version }}" + repository: "indent-com/python-ripgrep" + ref: "93220e8b608121b41722941f719e5cb86397e092" + artifact-tag: "cp38-abi3-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + # + # pyo3's abi3-py38 feature means this is one wheel (always tagged + # cp38-abi3, whichever interpreter builds it), but 0.0.9's own + # pyproject.toml sets requires-python ">=3.10,<3.13" -- narrower + # than the abi3 floor -- so building (and, worse, testing) on + # cp38/cp39 would have pip refuse to install the just-built wheel + # on its own test venv. cp310 is both the real installable floor + # and upstream's own ci.yml matrix floor, so it is built there and + # re-tested on cp311/cp312 via find_compatible_wheel; cp313/cp314 + # are dropped, matching the "<3.13" upper bound upstream declares + # (and pyo3 0.22.3 predates 3.14 besides). + cibw-build: > + cp310-manylinux_riscv64 cp311-manylinux_riscv64 + cp312-manylinux_riscv64 + # python-ripgrep ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-sources: "src test.py" + # test.py is upstream's own `python test.py` smoke test (ci.yml); + # python_ripgrep/__init__.py is a maturin-generated shim re-exporting + # the compiled submodule, so that submodule is probed by its own name. + cibw-test-command: > + python -c "from python_ripgrep import python_ripgrep as ext; + assert ext.__file__.endswith('.so'), ext.__file__" && + python test.py publish: name: Publish python-ripgrep ${{ matrix.version }} diff --git a/.github/workflows/build-rbloom.yml b/.github/workflows/build-rbloom.yml index a0e77295c46f..33dcf99deac3 100644 --- a/.github/workflows/build-rbloom.yml +++ b/.github/workflows/build-rbloom.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build rbloom ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -68,43 +66,27 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - RBLOOM_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout rbloom v${{ env.RBLOOM_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: KenanHanke/rbloom - ref: v${{ env.RBLOOM_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # rbloom ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_SOURCES: tests - # rbloom's pyproject.toml has no python-source; maturin auto-generates - # a rbloom/__init__.py shim ("from .rbloom import *") around the - # compiled rbloom.rbloom submodule, so that's the .so to check. - CIBW_TEST_COMMAND: >- - python -c "import rbloom.rbloom as m; assert m.__file__.endswith('.so'), m.__file__" && - python tests/api_test.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: rbloom-${{ env.RBLOOM_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "rbloom" + version: "${{ matrix.version }}" + repository: "KenanHanke/rbloom" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # rbloom ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-sources: "tests" + # rbloom's pyproject.toml has no python-source; maturin auto-generates + # a rbloom/__init__.py shim ("from .rbloom import *") around the + # compiled rbloom.rbloom submodule, so that's the .so to check. + cibw-test-command: > + python -c "import rbloom.rbloom as m; assert m.__file__.endswith('.so'), m.__file__" && + python tests/api_test.py publish: name: Publish rbloom ${{ matrix.version }} diff --git a/.github/workflows/build-regress.yml b/.github/workflows/build-regress.yml index 98f1c794ca78..2c860fc23f04 100644 --- a/.github/workflows/build-regress.yml +++ b/.github/workflows/build-regress.yml @@ -48,46 +48,29 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build regress ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - REGRESS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout regress ${{ env.REGRESS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: crate-py/regress - ref: v${{ env.REGRESS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # regress ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: regress-${{ env.REGRESS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "regress" + version: "${{ matrix.version }}" + repository: "crate-py/regress" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 180 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # regress ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -v tests" publish: name: Publish regress ${{ matrix.version }} diff --git a/.github/workflows/build-renkin.yml b/.github/workflows/build-renkin.yml index 4ba45320c023..895b22d15149 100644 --- a/.github/workflows/build-renkin.yml +++ b/.github/workflows/build-renkin.yml @@ -46,64 +46,46 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build renkin ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - RENKIN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout renkin ${{ env.RENKIN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: kent-tokyo/renkin - ref: v${{ env.RENKIN_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # renkin's pyproject.toml ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_COMMAND: >- - python -c "import json, renkin; - assert hasattr(renkin, '__version__'), '__version__ missing'; - assert callable(renkin.find_routes), 'find_routes missing'; - assert callable(renkin.predict_forward), 'predict_forward missing'; - assert callable(renkin.validate_forward), 'validate_forward missing'; - assert callable(renkin.audit_route), 'audit_route missing'; - result = renkin.find_routes('c1ccccc1', 3, 1, 0); - assert result, 'find_routes returned empty'; - result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, template_metadata_path=None); - assert result, 'find_routes with template_metadata_path=None returned empty'; - result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, reranker_model_path=None, reranker_freq_table_path=None); - assert result, 'find_routes with reranker paths=None returned empty'; - assert 'reranker_failures' not in json.loads(result), 'reranker_failures must be absent when no reranker is configured'; - result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, reranker_model_path='/nonexistent/model.txt', reranker_freq_table_path='/nonexistent/freq.json'); - assert result, 'find_routes must fall back to legacy ordering on a bad reranker path, not raise'; - assert 'reranker_failures' not in json.loads(result), 'reranker_failures must be absent when the reranker failed to load'; - result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, reranker_model_path='/nonexistent/model.txt'); - assert result, 'find_routes must fall back to legacy ordering when only one reranker path is given, not raise'; - assert 'reranker_failures' not in json.loads(result), 'reranker_failures must be absent for a mismatched (one-None) reranker path pair too'; - print('ok:', renkin.__version__)" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: renkin-${{ env.RENKIN_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "renkin" + version: "${{ matrix.version }}" + repository: "kent-tokyo/renkin" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # renkin's pyproject.toml ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-command: > + python -c "import json, renkin; + assert hasattr(renkin, '__version__'), '__version__ missing'; + assert callable(renkin.find_routes), 'find_routes missing'; + assert callable(renkin.predict_forward), 'predict_forward missing'; + assert callable(renkin.validate_forward), 'validate_forward missing'; + assert callable(renkin.audit_route), 'audit_route missing'; + result = renkin.find_routes('c1ccccc1', 3, 1, 0); + assert result, 'find_routes returned empty'; + result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, template_metadata_path=None); + assert result, 'find_routes with template_metadata_path=None returned empty'; + result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, reranker_model_path=None, reranker_freq_table_path=None); + assert result, 'find_routes with reranker paths=None returned empty'; + assert 'reranker_failures' not in json.loads(result), 'reranker_failures must be absent when no reranker is configured'; + result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, reranker_model_path='/nonexistent/model.txt', reranker_freq_table_path='/nonexistent/freq.json'); + assert result, 'find_routes must fall back to legacy ordering on a bad reranker path, not raise'; + assert 'reranker_failures' not in json.loads(result), 'reranker_failures must be absent when the reranker failed to load'; + result = renkin.find_routes('c1ccccc1', depth=3, max_routes=1, beam_width=0, reranker_model_path='/nonexistent/model.txt'); + assert result, 'find_routes must fall back to legacy ordering when only one reranker path is given, not raise'; + assert 'reranker_failures' not in json.loads(result), 'reranker_failures must be absent for a mismatched (one-None) reranker path pair too'; + print('ok:', renkin.__version__)" publish: name: Publish renkin ${{ matrix.version }} diff --git a/.github/workflows/build-rensa.yml b/.github/workflows/build-rensa.yml index 782b4dfd47c4..f8152535f88b 100644 --- a/.github/workflows/build-rensa.yml +++ b/.github/workflows/build-rensa.yml @@ -49,53 +49,35 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build rensa ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - RENSA_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout rensa v${{ env.RENSA_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: beowolx/rensa - ref: v${{ env.RENSA_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # rensa ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest - # tests/test_benchmarks.py imports from ../benchmarks via - # Path(__file__).resolve().parents[1] / "benchmarks" (gotcha 104). - CIBW_TEST_SOURCES: tests benchmarks - # rensa's pyproject.toml has no python-source; maturin auto-generates - # a rensa/__init__.py shim ("from .rensa import *") around the - # compiled rensa.rensa submodule, so that's the .so to check. - CIBW_TEST_COMMAND: >- - python -c "import rensa.rensa as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: rensa-${{ env.RENSA_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "rensa" + version: "${{ matrix.version }}" + repository: "beowolx/rensa" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # rensa ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest" + # tests/test_benchmarks.py imports from ../benchmarks via + # Path(__file__).resolve().parents[1] / "benchmarks" (gotcha 104). + cibw-test-sources: "tests benchmarks" + # rensa's pyproject.toml has no python-source; maturin auto-generates + # a rensa/__init__.py shim ("from .rensa import *") around the + # compiled rensa.rensa submodule, so that's the .so to check. + cibw-test-command: > + python -c "import rensa.rensa as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests publish: name: Publish rensa ${{ matrix.version }} diff --git a/.github/workflows/build-resvg-py.yml b/.github/workflows/build-resvg-py.yml index 59da0ed83a8f..54a1889fb08a 100644 --- a/.github/workflows/build-resvg-py.yml +++ b/.github/workflows/build-resvg-py.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build resvg-py ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -72,49 +70,33 @@ jobs: - tag: cp315t build: cp315t-manylinux_riscv64 - env: - RESVG_PY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout resvg-py ${{ env.RESVG_PY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: baseplate-admin/resvg-py - ref: ${{ env.RESVG_PY_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # resvg-py ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - # The cp315-abi3.abi3t wheel exports its multi-phase init entry point as - # PyModExport_resvg_py (defined in the extension itself, not imported); - # cibuildwheel's bundled abi3audit doesn't recognize that name and flags - # it as a non-abi3 symbol (gotcha 134), reproducing on upstream's own - # published wheel. - CIBW_AUDIT_COMMAND: '' - CIBW_TEST_REQUIRES: pytest pyperclip - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import resvg_py.resvg_py as m, importlib.metadata as md; - assert m.__file__.endswith('.so'), m.__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('resvg_py'))" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: resvg-py-${{ env.RESVG_PY_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "resvg-py" + version: "${{ matrix.version }}" + repository: "baseplate-admin/resvg-py" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # resvg-py ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + # The cp315-abi3.abi3t wheel exports its multi-phase init entry point as + # PyModExport_resvg_py (defined in the extension itself, not imported); + # cibuildwheel's bundled abi3audit doesn't recognize that name and flags + # it as a non-abi3 symbol (gotcha 134), reproducing on upstream's own + # published wheel. + cibw-audit-command: '' + cibw-test-requires: "pytest pyperclip" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import resvg_py.resvg_py as m, importlib.metadata as md; + assert m.__file__.endswith('.so'), m.__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('resvg_py'))" && + python -m pytest -v tests publish: name: Publish resvg-py ${{ matrix.version }} diff --git a/.github/workflows/build-rigour.yml b/.github/workflows/build-rigour.yml index 888796591ee2..08b66d525f25 100644 --- a/.github/workflows/build-rigour.yml +++ b/.github/workflows/build-rigour.yml @@ -49,13 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build rigour ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - # Siblings on the same dependency graph finish in ~35-40 minutes; cp312 - # was cancelled at 90 minutes stuck mid-compile on a small crate - # (thiserror) while every other interpreter passed well under that - # budget, so it reads as runner contention, not a genuinely slower - # build. Bumped for headroom. - timeout-minutes: 120 strategy: fail-fast: false matrix: @@ -83,62 +76,51 @@ jobs: - python: cp314 pytest_k: "" - env: - RIGOUR_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout rigour v${{ env.RIGOUR_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: opensanctions/rigour - ref: v${{ env.RIGOUR_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - # musllinux can't build: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.python }}-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # rigour ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. libicu-devel - # is also needed at test-install time: rigour's runtime dependency - # normality hard-requires pyicu, which has no riscv64 wheel on - # public PyPI or our registry, so pip builds it from sdist; Rocky - # 10's libicu-devel lives in appstream (not EPEL, which is empty on - # riscv64 per gotcha 51), so it installs without enabling any extra - # repo. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && - dnf install -y libicu-devel - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # typing_extensions isn't in pyproject.toml's [project] dependencies, - # but rigour/ids/__init__.py imports it unconditionally; upstream's - # own lint-test job never notices because mypy (a [dev] extra) pulls - # it in transitively. - CIBW_TEST_REQUIRES: pytest typing_extensions - # Build-from-checkout: rigour/ sits at the repo root next to tests/, - # and tests/__init__.py makes it a package, so pytest's default - # rootdir-prepend import mode would shadow the installed wheel with - # the checkout's own source (testing-and-shadowing gotcha 25). - # test-sources copies just tests/ into an empty cwd to avoid that. - CIBW_TEST_SOURCES: tests - # tests/test_genscripts.py imports the repo-root genscripts/ dev-tooling - # package (data-table generators for maintainers), which test-sources - # deliberately doesn't stage; it's not part of the installed wheel, so - # ignore it rather than staging more to satisfy an unrelated import. - CIBW_TEST_COMMAND: >- - python -c "import rigour._core as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v tests --ignore=tests/test_genscripts.py -k "${{ matrix.pytest_k }}" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: rigour-${{ env.RIGOUR_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # Siblings on the same dependency graph finish in ~35-40 minutes; cp312 + # was cancelled at 90 minutes stuck mid-compile on a small crate + # (thiserror) while every other interpreter passed well under that + # budget, so it reads as runner contention, not a genuinely slower + # build. Bumped for headroom. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "rigour" + version: "${{ matrix.version }}" + repository: "opensanctions/rigour" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + timeout-minutes: 120 + # musllinux can't build: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-manylinux_riscv64" + # rigour ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. libicu-devel + # is also needed at test-install time: rigour's runtime dependency + # normality hard-requires pyicu, which has no riscv64 wheel on + # public PyPI or our registry, so pip builds it from sdist; Rocky + # 10's libicu-devel lives in appstream (not EPEL, which is empty on + # riscv64 per gotcha 51), so it installs without enabling any extra + # repo. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + dnf install -y libicu-devel + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + # typing_extensions isn't in pyproject.toml's [project] dependencies, + # but rigour/ids/__init__.py imports it unconditionally; upstream's + # own lint-test job never notices because mypy (a [dev] extra) pulls + # it in transitively. + cibw-test-requires: "pytest typing_extensions" + # Build-from-checkout: rigour/ sits at the repo root next to tests/, + # and tests/__init__.py makes it a package, so pytest's default + # rootdir-prepend import mode would shadow the installed wheel with + # the checkout's own source (testing-and-shadowing gotcha 25). + # test-sources copies just tests/ into an empty cwd to avoid that. + cibw-test-sources: "tests" + # tests/test_genscripts.py imports the repo-root genscripts/ dev-tooling + # package (data-table generators for maintainers), which test-sources + # deliberately doesn't stage; it's not part of the installed wheel, so + # ignore it rather than staging more to satisfy an unrelated import. + cibw-test-command: > + python -c "import rigour._core as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v tests --ignore=tests/test_genscripts.py -k "${{ matrix.pytest_k }}" publish: name: Publish rigour ${{ matrix.version }} diff --git a/.github/workflows/build-river.yml b/.github/workflows/build-river.yml index d0de14c86319..372f28f9c6ba 100644 --- a/.github/workflows/build-river.yml +++ b/.github/workflows/build-river.yml @@ -51,100 +51,60 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build river ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 240 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - RIVER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout river ${{ env.RIVER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: online-ml/river - ref: ${{ env.RIVER_VERSION }} - persist-credentials: false - - - name: Build and test wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # build[uv] needs a host uv for the audit step, which the riscv64 runner lacks. - CIBW_BUILD_FRONTEND: build - CIBW_ENVIRONMENT_LINUX: >- - PATH="$HOME/.cargo/bin:$PATH" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_ENVIRONMENT: PIP_PREFER_BINARY=1 - CIBW_TEST_REQUIRES: >- - pytest scikit-learn sqlalchemy sympy gymnasium polars pyarrow - CIBW_TEST_SOURCES: tests conftest.py pyproject.toml - # test_docs.py needs the docs/ parser tooling, not the wheel; the memory - # ceiling in test_memory_usage_class is calibrated to CPython 3.13 object - # sizes and fails on 3.12 on x86_64 as well. - CIBW_TEST_COMMAND: >- - python -c "import river.anomaly, river.datasets, river.drift, river.stream, river.tree" && - python -c "import river._river_rust as m; assert m.__file__.endswith('.so'), m.__file__" && - python -c "from river import datasets, bandit; datasets.Elec2().download(); datasets.SMSSpam().download(); datasets.CreditCard().download(); datasets.Music().download(); datasets.CriteoAds().download(); bandit.datasets.NewsArticles().download()" && - python -m pytest tests - --ignore=tests/test_docs.py - --deselect "tests/tree/test_trees.py::test_memory_usage_class[dataset2-model2]" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: river-${{ env.RIVER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "river" + version: "${{ matrix.version }}" + repository: "online-ml/river" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 240 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # build[uv] needs a host uv for the audit step, which the riscv64 runner lacks. + cibw-build-frontend: "build" + cibw-environment-linux: "PATH=\"$HOME/.cargo/bin:$PATH\"" + cibw-test-environment: "PIP_PREFER_BINARY=1" + cibw-test-requires: > + pytest scikit-learn sqlalchemy sympy gymnasium polars pyarrow + cibw-test-sources: "tests conftest.py pyproject.toml" + # test_docs.py needs the docs/ parser tooling, not the wheel; the memory + # ceiling in test_memory_usage_class is calibrated to CPython 3.13 object + # sizes and fails on 3.12 on x86_64 as well. + cibw-test-command: > + python -c "import river.anomaly, river.datasets, river.drift, river.stream, river.tree" && + python -c "import river._river_rust as m; assert m.__file__.endswith('.so'), m.__file__" && + python -c "from river import datasets, bandit; datasets.Elec2().download(); datasets.SMSSpam().download(); datasets.CreditCard().download(); datasets.Music().download(); datasets.CriteoAds().download(); bandit.datasets.NewsArticles().download()" && + python -m pytest tests + --ignore=tests/test_docs.py + --deselect "tests/tree/test_trees.py::test_memory_usage_class[dataset2-model2]" build_abi3_wheels: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build river ${{ matrix.version }} cp311-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - RIVER_VERSION: ${{ matrix.version }} - MATURIN_PEP517_ARGS: "--features abi3" - - steps: - - name: Checkout river ${{ env.RIVER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: online-ml/river - ref: ${{ env.RIVER_VERSION }} - persist-credentials: false - - - name: Build and test wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: cp311-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BUILD_FRONTEND: build - CIBW_ENVIRONMENT_PASS_LINUX: MATURIN_PEP517_ARGS - CIBW_ENVIRONMENT_LINUX: >- - PATH="$HOME/.cargo/bin:$PATH" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # scipy 1.16/1.17 still accept 3.11 but have no riscv64 wheel; take the registry's 1.15. - CIBW_TEST_ENVIRONMENT: PIP_PREFER_BINARY=1 - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: river-${{ env.RIVER_VERSION }}-cp311-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "river" + version: "${{ matrix.version }}" + repository: "online-ml/river" + ref: "${{ matrix.version }}" + artifact-tag: "cp311-abi3-manylinux_riscv64" + timeout-minutes: 120 + cibw-build: "cp311-manylinux_riscv64" + cibw-build-frontend: "build" + cibw-environment-linux: "MATURIN_PEP517_ARGS=\"--features abi3\" PATH=\"$HOME/.cargo/bin:$PATH\"" + # scipy 1.16/1.17 still accept 3.11 but have no riscv64 wheel; take the registry's 1.15. + cibw-test-environment: "PIP_PREFER_BINARY=1" publish: name: Publish river ${{ matrix.version }} diff --git a/.github/workflows/build-ruff-format.yml b/.github/workflows/build-ruff-format.yml index 6c91552c00de..3a3c11fbf740 100644 --- a/.github/workflows/build-ruff-format.yml +++ b/.github/workflows/build-ruff-format.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build ruff-format ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: @@ -74,55 +72,40 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - RUFF_FORMAT_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout ruff-format v${{ env.RUFF_FORMAT_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: reflex-dev/ruff-format - ref: v${{ env.RUFF_FORMAT_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # ruff-format ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - # Upstream ships no test suite at all; exercise the three bound - # functions against known-good outputs (verified against the - # upstream ruff CLI) instead of an import-only smoke test. - # ruff-format is a pure-Rust maturin project (no python-source in - # pyproject.toml), so maturin wraps the extension in a generated - # ruff_format/__init__.py ("from .ruff_format import *") rather than - # shipping it as a flat top-level .so (gotcha 308) - probe the - # compiled submodule via sys.modules, not the package's own - # __file__, which is the shim. - CIBW_TEST_COMMAND: >- - python -c "import ruff_format as m, importlib.metadata as md, sys; - assert sys.modules['ruff_format.ruff_format'].__file__.endswith('.so'), sys.modules['ruff_format.ruff_format'].__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('ruff-format')); - assert m.is_valid_syntax('x = 1'); - assert not m.is_valid_syntax('def f(:'); - m.parse_code('x = 1'); - assert m.format_string('def hello( x,y, z ):\n print( x+y+z )\n') == 'def hello(x, y, z):\n print(x + y + z)\n'; - assert m.format_string('result = some_function_name(argument_one, argument_two, argument_three, argument_four)\n') == 'result = some_function_name(\n argument_one, argument_two, argument_three, argument_four\n)\n'; - assert m.format_string('result = some_function_name(argument_one, argument_two, argument_three, argument_four)\n', line_width=120) == 'result = some_function_name(argument_one, argument_two, argument_three, argument_four)\n'" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ruff-format-${{ env.RUFF_FORMAT_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "ruff-format" + version: "${{ matrix.version }}" + repository: "reflex-dev/ruff-format" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 90 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # ruff-format ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + # Upstream ships no test suite at all; exercise the three bound + # functions against known-good outputs (verified against the + # upstream ruff CLI) instead of an import-only smoke test. + # ruff-format is a pure-Rust maturin project (no python-source in + # pyproject.toml), so maturin wraps the extension in a generated + # ruff_format/__init__.py ("from .ruff_format import *") rather than + # shipping it as a flat top-level .so (gotcha 308) - probe the + # compiled submodule via sys.modules, not the package's own + # __file__, which is the shim. + cibw-test-command: > + python -c "import ruff_format as m, importlib.metadata as md, sys; + assert sys.modules['ruff_format.ruff_format'].__file__.endswith('.so'), sys.modules['ruff_format.ruff_format'].__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('ruff-format')); + assert m.is_valid_syntax('x = 1'); + assert not m.is_valid_syntax('def f(:'); + m.parse_code('x = 1'); + assert m.format_string('def hello( x,y, z ):\n print( x+y+z )\n') == 'def hello(x, y, z):\n print(x + y + z)\n'; + assert m.format_string('result = some_function_name(argument_one, argument_two, argument_three, argument_four)\n') == 'result = some_function_name(\n argument_one, argument_two, argument_three, argument_four\n)\n'; + assert m.format_string('result = some_function_name(argument_one, argument_two, argument_three, argument_four)\n', line_width=120) == 'result = some_function_name(argument_one, argument_two, argument_three, argument_four)\n'" publish: name: Publish ruff-format ${{ matrix.version }} diff --git a/.github/workflows/build-rustpy-xlsxwriter.yml b/.github/workflows/build-rustpy-xlsxwriter.yml index 1ded0ae6d5cc..e489ba0d0ec3 100644 --- a/.github/workflows/build-rustpy-xlsxwriter.yml +++ b/.github/workflows/build-rustpy-xlsxwriter.yml @@ -49,58 +49,37 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build rustpy-xlsxwriter ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - RUSTPY_XLSXWRITER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout rustpy-xlsxwriter ${{ env.RUSTPY_XLSXWRITER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: rahmadafandi/rustpy-xlsxwriter - ref: ${{ env.RUSTPY_XLSXWRITER_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # rustpy-xlsxwriter ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_ENVIRONMENT: >- - PIP_ONLY_BINARY=numpy,pandas,pyarrow,polars-runtime-32,polars-runtime-64 - # pandas has no cp314t wheel on our registry yet, and it's needed - # transitively by several test modules; skip testing that leg - # (the wheel itself still builds). - CIBW_TEST_SKIP: cp314t-* - CIBW_TEST_SOURCES: tests - # pyarrow is not in upstream's [project.optional-dependencies] tests - # extra but is in their frozen dev requirements.txt: pandas 3's - # __arrow_c_stream__ needs it, and without it pandas falls back to a - # slower path that mishandles NaT (test_csv.py::TestCSVArrowPath). - CIBW_TEST_REQUIRES: pytest faker openpyxl pandas pyarrow polars - CIBW_TEST_COMMAND: >- - python -m pytest tests/ -v -ra --durations=0 -m "not benchmark" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: rustpy-xlsxwriter-${{ env.RUSTPY_XLSXWRITER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "rustpy-xlsxwriter" + version: "${{ matrix.version }}" + repository: "rahmadafandi/rustpy-xlsxwriter" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # rustpy-xlsxwriter ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container here. + 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\"" + cibw-test-environment: "PIP_ONLY_BINARY=numpy,pandas,pyarrow,polars-runtime-32,polars-runtime-64" + # pandas has no cp314t wheel on our registry yet, and it's needed + # transitively by several test modules; skip testing that leg + # (the wheel itself still builds). + cibw-test-skip: "cp314t-*" + cibw-test-sources: "tests" + # pyarrow is not in upstream's [project.optional-dependencies] tests + # extra but is in their frozen dev requirements.txt: pandas 3's + # __arrow_c_stream__ needs it, and without it pandas falls back to a + # slower path that mishandles NaT (test_csv.py::TestCSVArrowPath). + cibw-test-requires: "pytest faker openpyxl pandas pyarrow polars" + cibw-test-command: > + python -m pytest tests/ -v -ra --durations=0 -m "not benchmark" publish: name: Publish rustpy-xlsxwriter ${{ matrix.version }} diff --git a/.github/workflows/build-scikit-learn.yml b/.github/workflows/build-scikit-learn.yml index 960a3c11f973..5372ee854b55 100644 --- a/.github/workflows/build-scikit-learn.yml +++ b/.github/workflows/build-scikit-learn.yml @@ -57,48 +57,29 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build scikit-learn ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 720 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - SKLEARN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout scikit-learn ${{ env.SKLEARN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: scikit-learn/scikit-learn - ref: ${{ env.SKLEARN_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BUILD_FRONTEND: build - # Scoped, not :all: - cython/meson-python have no riscv64 wheel and must build from sdist. - CIBW_ENVIRONMENT: >- - SKLEARN_SKIP_NETWORK_TESTS=1 - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,scipy,pandas - # check_license.py in test_wheels.sh asserts on the notice cibw_before_build.sh adds. - CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS - CIBW_BEFORE_BUILD: bash {project}/build_tools/wheels/cibw_before_build.sh {project} - CIBW_TEST_REQUIRES: pytest pytest-xdist scipy ${{ case(matrix.python == 'cp312', 'pandas', matrix.python == 'cp313', 'pandas', matrix.python == 'cp314', 'pandas', '') }} - CIBW_TEST_ENVIRONMENT: ${{ case(matrix.python == 'cp314', true, endsWith(matrix.python, 't'), true, '') && env.LOKY_DESELECT || '' }} - CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh {project} - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: scikit-learn-${{ env.SKLEARN_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "scikit-learn" + version: "${{ matrix.version }}" + repository: "scikit-learn/scikit-learn" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 720 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build-frontend: "build" + # Scoped, not :all: - cython/meson-python have no riscv64 wheel and must build from sdist. + cibw-environment-linux: "SKLEARN_SKIP_NETWORK_TESTS=1 PIP_ONLY_BINARY=numpy,scipy,pandas" + # check_license.py in test_wheels.sh asserts on the notice cibw_before_build.sh adds. + cibw-environment-pass-linux: "RUNNER_OS" + cibw-before-build: "bash {project}/build_tools/wheels/cibw_before_build.sh {project}" + cibw-test-requires: "pytest pytest-xdist scipy ${{ case(matrix.python == 'cp312', 'pandas', matrix.python == 'cp313', 'pandas', matrix.python == 'cp314', 'pandas', '') }}" + cibw-test-environment: "${{ case(matrix.python == 'cp314', true, endsWith(matrix.python, 't'), true, '') && 'PYTEST_ADDOPTS=''-k \"not (test_kdtree_picklable_with_joblib or (test_knn_forcing_backend and loky) or (test_function_no_callback_support and processes))\"''' || '' }}" + cibw-test-command: "bash {project}/build_tools/wheels/test_wheels.sh {project}" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-scikit-misc.yml b/.github/workflows/build-scikit-misc.yml index 3f29f06184b9..d3e0100660d1 100644 --- a/.github/workflows/build-scikit-misc.yml +++ b/.github/workflows/build-scikit-misc.yml @@ -49,42 +49,23 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build scikit-misc ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - SCIKIT_MISC_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout scikit-misc v${{ env.SCIKIT_MISC_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: has2k1/scikit-misc - ref: v${{ env.SCIKIT_MISC_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # numpy has a riscv64 wheel only on our registry; cython/meson-python - # build from sdist there, same as upstream's own build-time resolution. - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: scikit-misc-${{ env.SCIKIT_MISC_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error - + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "scikit-misc" + version: "${{ matrix.version }}" + repository: "has2k1/scikit-misc" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # numpy has a riscv64 wheel only on our registry; cython/meson-python + # build from sdist there, same as upstream's own build-time resolution. + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" gpl_sources: needs: [setup] if: needs.setup.outputs.versions != '[]' diff --git a/.github/workflows/build-sentry-cli.yml b/.github/workflows/build-sentry-cli.yml index affc479d0bdd..181e62266700 100644 --- a/.github/workflows/build-sentry-cli.yml +++ b/.github/workflows/build-sentry-cli.yml @@ -55,38 +55,21 @@ jobs: matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} name: Build sentry-cli ${{ matrix.version }} manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 - - env: - SENTRY_CLI_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout sentry-cli ${{ env.SENTRY_CLI_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: getsentry/sentry-cli - ref: ${{ env.SENTRY_CLI_VERSION }} - persist-credentials: false - - # The wheel is one py3-none executable, so a single build serves every interpreter. - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: cp312-manylinux_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # perl-core: openssl-src (static-ssl) needs FindBin/IPC::Cmd, absent from Rocky 10's minimal perl. - CIBW_BEFORE_ALL_LINUX: >- - dnf -y install perl-core && - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: sentry-cli-${{ env.SENTRY_CLI_VERSION }}-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # The wheel is one py3-none executable, so a single build serves every interpreter. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "sentry-cli" + version: "${{ matrix.version }}" + repository: "getsentry/sentry-cli" + ref: "${{ matrix.version }}" + artifact-tag: "manylinux_riscv64" + timeout-minutes: 360 + cibw-build: "cp312-manylinux_riscv64" + # perl-core: openssl-src (static-ssl) needs FindBin/IPC::Cmd, absent from Rocky 10's minimal perl. + cibw-before-all-linux: > + dnf -y install perl-core && + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" test_wheel: name: Test sentry-cli ${{ matrix.version }} on Python ${{ matrix.python-version }} diff --git a/.github/workflows/build-shazamio-core.yml b/.github/workflows/build-shazamio-core.yml index f6227339ee07..cfd88d7d3b2a 100644 --- a/.github/workflows/build-shazamio-core.yml +++ b/.github/workflows/build-shazamio-core.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build shazamio-core ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: @@ -67,45 +65,30 @@ jobs: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - env: - SHAZAMIO_CORE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout shazamio-core ${{ env.SHAZAMIO_CORE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: shazamio/shazamio-core - ref: ${{ env.SHAZAMIO_CORE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # shazamio-core ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - # Mirror upstream's own `test` job (pip install . pytest pytest-asyncio - # && pytest). test_the_flac_signature_matches_the_golden_uri compares the - # fingerprint of a decoded FLAC against a URI pinned on x86 Linux; on - # riscv64 the decoder yields a different (but valid) signature, so it is - # deselected. Every other test, including the mp3/ogg/opus decode and the - # bytes-vs-path equivalence ones, runs. - CIBW_TEST_REQUIRES: pytest pytest-asyncio - CIBW_TEST_COMMAND: >- - pytest {package}/tests -v - -k "not test_the_flac_signature_matches_the_golden_uri" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: shazamio-core-${{ env.SHAZAMIO_CORE_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "shazamio-core" + version: "${{ matrix.version }}" + repository: "shazamio/shazamio-core" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 120 + cibw-build: "${{ matrix.build }}" + # shazamio-core ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + # Mirror upstream's own `test` job (pip install . pytest pytest-asyncio + # && pytest). test_the_flac_signature_matches_the_golden_uri compares the + # fingerprint of a decoded FLAC against a URI pinned on x86 Linux; on + # riscv64 the decoder yields a different (but valid) signature, so it is + # deselected. Every other test, including the mp3/ogg/opus decode and the + # bytes-vs-path equivalence ones, runs. + cibw-test-requires: "pytest pytest-asyncio" + cibw-test-command: > + pytest {package}/tests -v + -k "not test_the_flac_signature_matches_the_golden_uri" publish: name: Publish shazamio-core ${{ matrix.version }} diff --git a/.github/workflows/build-silx.yml b/.github/workflows/build-silx.yml index ede31b4a092f..2d0220a41cdd 100644 --- a/.github/workflows/build-silx.yml +++ b/.github/workflows/build-silx.yml @@ -49,61 +49,39 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build silx ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - SILX_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout silx v${{ env.SILX_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: silx-kit/silx - ref: v${{ env.SILX_VERSION }} - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - WITH_QT_TEST: "False" - WITH_GL_TEST: "False" - SILX_OPENCL: "False" - - CIBW_ENVIRONMENT_PASS_LINUX: WITH_QT_TEST WITH_GL_TEST SILX_OPENCL - - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BUILD_FRONTEND: "build; args: -C setup-args=-Duse_openmp=disabled" - CIBW_ENVIRONMENT_LINUX: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - - # The `full,test` extras pull PySide6, pyopencl and bitshuffle, none of - # which has a riscv64 wheel; install the rest of both extras instead. - # h5pyd 1.0 (released after silx 3.1.1) probes /about, which the mock - # server in silx.io.test.test_utils::test_open_h5pyd does not serve. - CIBW_TEST_ENVIRONMENT: 'PIP_ONLY_BINARY=:all:' - CIBW_TEST_REQUIRES: >- - matplotlib python-dateutil scipy pooch Pillow pint hdf5plugin - h5pyd<1 imageio[tifffile] pytest pytest-mock pytest-httpserver - # Without a Qt binding, every test module under silx.gui, silx.app.view, - # silx.app.compare and silx.test.test_sx fails to import at collection - # time (WITH_QT_TEST=False only skips tests that did import), so leave - # them out. Same on every architecture. - CIBW_TEST_COMMAND: >- - d="$(python -c 'import os, silx; print(os.path.dirname(silx.__file__))')" && - pytest --verbosity=3 --pyargs silx - --ignore="$d/gui" --ignore="$d/app/view" --ignore="$d/app/compare" - --ignore="$d/test/test_sx.py" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: silx-${{ matrix.version }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "silx" + version: "${{ matrix.version }}" + repository: "silx-kit/silx" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 180 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build-frontend: "build; args: -C setup-args=-Duse_openmp=disabled" + cibw-environment-linux: "WITH_QT_TEST=False WITH_GL_TEST=False SILX_OPENCL=False" + # The `full,test` extras pull PySide6, pyopencl and bitshuffle, none of + # which has a riscv64 wheel; install the rest of both extras instead. + # h5pyd 1.0 (released after silx 3.1.1) probes /about, which the mock + # server in silx.io.test.test_utils::test_open_h5pyd does not serve. + cibw-test-environment: "PIP_ONLY_BINARY=:all:" + cibw-test-requires: > + matplotlib python-dateutil scipy pooch Pillow pint hdf5plugin + h5pyd<1 imageio[tifffile] pytest pytest-mock pytest-httpserver + # Without a Qt binding, every test module under silx.gui, silx.app.view, + # silx.app.compare and silx.test.test_sx fails to import at collection + # time (WITH_QT_TEST=False only skips tests that did import), so leave + # them out. Same on every architecture. + cibw-test-command: > + d="$(python -c 'import os, silx; print(os.path.dirname(silx.__file__))')" && + pytest --verbosity=3 --pyargs silx + --ignore="$d/gui" --ignore="$d/app/view" --ignore="$d/app/compare" + --ignore="$d/test/test_sx.py" publish: name: Publish silx ${{ matrix.version }} diff --git a/.github/workflows/build-sparse-dot-topn.yml b/.github/workflows/build-sparse-dot-topn.yml index 138377e10daa..ccdc2f3ca0d5 100644 --- a/.github/workflows/build-sparse-dot-topn.yml +++ b/.github/workflows/build-sparse-dot-topn.yml @@ -49,44 +49,23 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build sparse-dot-topn ${{ matrix.version }} cp312-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - SPARSE_DOT_TOPN_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout sparse_dot_topn v${{ env.SPARSE_DOT_TOPN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ing-bank/sparse_dot_topn - ref: v${{ env.SPARSE_DOT_TOPN_VERSION }} - submodules: true - persist-credentials: false - - # wheel.py-api = "cp312": cp312 builds the one abi3 wheel, cp313/cp314 re-test it. - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: >- - CMAKE_ARGS="-DSDTN_ENABLE_ARCH_FLAGS=OFF -DSDTN_ENABLE_OPENMP=ON -DSDTN_DISABLE_OPENMP=OFF" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,scipy,psutil - CIBW_TEST_COMMAND: pytest {project}/tests && python -c "from sparse_dot_topn import _has_openmp_support;assert _has_openmp_support" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: sparse-dot-topn-${{ env.SPARSE_DOT_TOPN_VERSION }}-cp312-abi3-manylinux_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # wheel.py-api = "cp312": cp312 builds the one abi3 wheel, cp313/cp314 re-test it. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "sparse-dot-topn" + version: "${{ matrix.version }}" + repository: "ing-bank/sparse_dot_topn" + ref: "v${{ matrix.version }}" + artifact-tag: "cp312-abi3-manylinux_riscv64" + checkout-submodules: "true" + cibw-build: "cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64" + cibw-environment-linux: "CMAKE_ARGS=\"-DSDTN_ENABLE_ARCH_FLAGS=OFF -DSDTN_ENABLE_OPENMP=ON -DSDTN_DISABLE_OPENMP=OFF\" PIP_ONLY_BINARY=numpy,scipy,psutil" + cibw-test-command: "pytest {project}/tests && python -c \"from sparse_dot_topn import _has_openmp_support;assert _has_openmp_support\"" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-sqlglotc.yml b/.github/workflows/build-sqlglotc.yml index 1f642daf3328..59481ab318c1 100644 --- a/.github/workflows/build-sqlglotc.yml +++ b/.github/workflows/build-sqlglotc.yml @@ -62,91 +62,73 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build sqlglotc ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - # mypyc compiles sqlglot natively on the riscv64 runner: 30.24.0 jobs took 2.4-2.7h and - # 30.23.0 cp314 hit the old 180 min ceiling. - timeout-minutes: 300 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - SQLGLOTC_VERSION: ${{ matrix.version }} - - steps: - # Full monorepo checkout: sqlglotc/setup.py compiles from the sibling - # ../sqlglot source tree, and tests/ (used below) lives at the repo root. - - name: Checkout sqlglot ${{ env.SQLGLOTC_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: tobymao/sqlglot - ref: v${{ env.SQLGLOTC_VERSION }} - fetch-depth: 0 - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: sqlglotc - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # tests/test_sqlglotc.py (added in 30.24.0) imports setuptools, which Python >=3.12 - # venvs no longer ship. - CIBW_TEST_REQUIRES: duckdb pandas python-dateutil pytz setuptools - CIBW_ENVIRONMENT_PASS_LINUX: PIP_EXTRA_INDEX_URL PIP_ONLY_BINARY - PIP_EXTRA_INDEX_URL: https://pypi.riseproject.dev/simple/ - # PyPI's newest pandas (3.0.5) ships no riscv64 wheel anywhere yet; - # without this, pip resolves it over our registry's 3.0.3 (which - # does have one) and falls back to a from-source build that never - # finishes in CI's time budget. Same for duckdb: PyPI's 2.0.0 sdist - # needs a clang/lld ThinLTO build and a riscv64 wheel of it is not on - # our registry yet, so stay on the registry's newest binary release. - PIP_ONLY_BINARY: pandas,duckdb - # tests.test_optimizer's test_unnest_subqueries runs its cases against duckdb, and - # the two "preserve IN in FULL/RIGHT JOIN ON" ones need duckdb to plan a non-inner - # join on a subquery, which the duckdb on our registry (anything below the 2.0.0 - # sdist above) raises NotImplementedException for. That is the engine, not the - # compiled sqlglot, so only that test is left out of the otherwise-unchanged - # `python -m unittest` run (no braces below: cibuildwheel expands {project}). - # It runs as a module (python -m), not from stdin: test_optimizer's process pool - # re-imports __main__ in its workers, which a script read from stdin cannot offer. - CIBW_TEST_COMMAND: | - cd {project} - cat > unittest_without_duckdb_gap.py <<'PYEOF' - import sys - import unittest - - DESELECTED = ( - "tests.test_optimizer.TestOptimizer.test_unnest_subqueries", - ) - - - def prune(suite): - kept = unittest.TestSuite() - for t in suite: - if isinstance(t, unittest.TestSuite): - sub = prune(t) - if sub.countTestCases(): - kept.addTest(sub) - elif t.id() not in DESELECTED: - kept.addTest(t) - return kept - - - if __name__ == "__main__": - suite = prune(unittest.defaultTestLoader.discover(".")) - result = unittest.TextTestRunner(verbosity=1).run(suite) - sys.exit(0 if result.wasSuccessful() else 1) - PYEOF - SKIP_INTEGRATION=1 python -m unittest_without_duckdb_gap - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: sqlglotc-${{ env.SQLGLOTC_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # mypyc compiles sqlglot natively on the riscv64 runner: 30.24.0 jobs took 2.4-2.7h and + # 30.23.0 cp314 hit the old 180 min ceiling. + # Full monorepo checkout: sqlglotc/setup.py compiles from the sibling + # ../sqlglot source tree, and tests/ (used below) lives at the repo root. + # PyPI's newest pandas (3.0.5) ships no riscv64 wheel anywhere yet; + # without this, pip resolves it over our registry's 3.0.3 (which + # does have one) and falls back to a from-source build that never + # finishes in CI's time budget. Same for duckdb: PyPI's 2.0.0 sdist + # needs a clang/lld ThinLTO build and a riscv64 wheel of it is not on + # our registry yet, so stay on the registry's newest binary release. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "sqlglotc" + version: "${{ matrix.version }}" + repository: "tobymao/sqlglot" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 300 + checkout-fetch-depth: 0 + cibw-environment-linux: "PIP_ONLY_BINARY=pandas,duckdb" + cibw-package-dir: "sqlglotc" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # tests/test_sqlglotc.py (added in 30.24.0) imports setuptools, which Python >=3.12 + # venvs no longer ship. + cibw-test-requires: "duckdb pandas python-dateutil pytz setuptools" + # tests.test_optimizer's test_unnest_subqueries runs its cases against duckdb, and + # the two "preserve IN in FULL/RIGHT JOIN ON" ones need duckdb to plan a non-inner + # join on a subquery, which the duckdb on our registry (anything below the 2.0.0 + # sdist above) raises NotImplementedException for. That is the engine, not the + # compiled sqlglot, so only that test is left out of the otherwise-unchanged + # `python -m unittest` run (no braces below: cibuildwheel expands {project}). + # It runs as a module (python -m), not from stdin: test_optimizer's process pool + # re-imports __main__ in its workers, which a script read from stdin cannot offer. + cibw-test-command: | + cd {project} + cat > unittest_without_duckdb_gap.py <<'PYEOF' + import sys + import unittest + + DESELECTED = ( + "tests.test_optimizer.TestOptimizer.test_unnest_subqueries", + ) + + + def prune(suite): + kept = unittest.TestSuite() + for t in suite: + if isinstance(t, unittest.TestSuite): + sub = prune(t) + if sub.countTestCases(): + kept.addTest(sub) + elif t.id() not in DESELECTED: + kept.addTest(t) + return kept + + + if __name__ == "__main__": + suite = prune(unittest.defaultTestLoader.discover(".")) + result = unittest.TextTestRunner(verbosity=1).run(suite) + sys.exit(0 if result.wasSuccessful() else 1) + PYEOF + SKIP_INTEGRATION=1 python -m unittest_without_duckdb_gap publish: name: Publish sqlglotc ${{ matrix.version }} diff --git a/.github/workflows/build-starlark-pyo3.yml b/.github/workflows/build-starlark-pyo3.yml index 384b857e5e51..e36133eac45f 100644 --- a/.github/workflows/build-starlark-pyo3.yml +++ b/.github/workflows/build-starlark-pyo3.yml @@ -49,50 +49,32 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build starlark-pyo3 ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - STARLARK_PYO3_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout starlark-pyo3 v${{ env.STARLARK_PYO3_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: inducer/starlark-pyo3 - ref: v${{ env.STARLARK_PYO3_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # starlark-pyo3 ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: test - # maturin auto-generates a starlark/__init__.py shim ("from .starlark - # import *") around the compiled starlark.starlark submodule, so - # that's the .so to check (gotcha 314). - CIBW_TEST_COMMAND: >- - python -c "import starlark.starlark as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: starlark-pyo3-${{ env.STARLARK_PYO3_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "starlark-pyo3" + version: "${{ matrix.version }}" + repository: "inducer/starlark-pyo3" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # starlark-pyo3 ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "test" + # maturin auto-generates a starlark/__init__.py shim ("from .starlark + # import *") around the compiled starlark.starlark submodule, so + # that's the .so to check (gotcha 314). + cibw-test-command: > + python -c "import starlark.starlark as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v test publish: name: Publish starlark-pyo3 ${{ matrix.version }} diff --git a/.github/workflows/build-stripy.yml b/.github/workflows/build-stripy.yml index 25231a0e61c9..6643915d57fe 100644 --- a/.github/workflows/build-stripy.yml +++ b/.github/workflows/build-stripy.yml @@ -49,44 +49,26 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build stripy ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - STRIPY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout stripy v${{ env.STRIPY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: underworldcode/stripy - ref: v${{ env.STRIPY_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_BUILD: pip install numpy meson-python ninja setuptools build - # numpy has a riscv64 wheel only on our registry; meson-python/ninja - # build from sdist there, same as upstream's own build-time resolution. - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest {project}/stripy/tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: stripy-${{ env.STRIPY_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "stripy" + version: "${{ matrix.version }}" + repository: "underworldcode/stripy" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-before-build: "pip install numpy meson-python ninja setuptools build" + # numpy has a riscv64 wheel only on our registry; meson-python/ninja + # build from sdist there, same as upstream's own build-time resolution. + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" + cibw-test-requires: "pytest" + cibw-test-command: "pytest {project}/stripy/tests" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-symengine.yml b/.github/workflows/build-symengine.yml index 7dd53f41a0a8..c9f27926127b 100644 --- a/.github/workflows/build-symengine.yml +++ b/.github/workflows/build-symengine.yml @@ -3,7 +3,7 @@ --- # This workflow is based on: https://github.com/symengine/symengine-wheels' conda # recipe (recipe/build.sh), the actual process that builds the published PyPI -# wheels — symengine.py's own .github/workflows/ci.yml tests against a +# wheels - symengine.py's own .github/workflows/ci.yml tests against a # system-installed SymEngine and never packages a wheel. name: Build symengine wheels (riscv64) @@ -56,81 +56,61 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build symengine ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - SYMENGINE_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout symengine.py ${{ env.SYMENGINE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: symengine/symengine.py - ref: v${{ env.SYMENGINE_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Builds the C++ SymEngine library once per container (not per - # interpreter) and installs it to /usr/local, which CMake's - # find_package(SymEngine) searches by default -- setup.py's own - # cmake invocation then picks it up with no --symengine-dir needed. - # gmp/mpfr/libmpc come from Rocky 10's repos, replacing upstream's - # conda-forge builds of the same libraries -- build/link-time only, - # no effect on what the C++ library computes. INTEGER_CLASS stays - # at its default (gmp) rather than upstream's flint: flint-devel - # has no Rocky 10 package on any arch (confirmed via repoquery), and - # it is a performance accelerator, not required for correctness. - # WITH_LLVM likewise stays at its default (no): upstream's own - # recipe pins llvmdev<17, but Rocky 10 only carries llvm-devel 21.x, - # and the LLVM JIT backend is optional. BUILD_TESTS/BUILD_BENCHMARKS - # are off to keep the native build bounded; the Python wheel is - # exercised instead by the upstream pytest suite below. - CIBW_BEFORE_ALL_LINUX: >- - dnf -y install gmp-devel mpfr-devel libmpc-devel && - cd /tmp && - curl -fsSLO https://github.com/symengine/symengine/releases/download/v${{ env.SYMENGINE_CXX_VERSION }}/symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz && - echo "${{ env.SYMENGINE_CXX_SHA256 }} symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz" | sha256sum -c - && - tar xzf symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz && - cmake -Bbuild -Ssymengine-${{ env.SYMENGINE_CXX_VERSION }} -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release - -DBUILD_FOR_DISTRIBUTION=yes -DBUILD_SHARED_LIBS=no -DWITH_MPC=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no && - cmake --build build -j"$(nproc)" && - cmake --build build --target install && - cp /usr/share/licenses/gmp/COPYINGv3 /project/LICENSE.gmp && - cp /usr/share/licenses/mpfr/COPYING.LESSER /project/LICENSE.mpfr && - cp /usr/share/licenses/libmpc/COPYING.LESSER /project/LICENSE.mpc - CIBW_BEFORE_BUILD: pip install -U "cython>=0.29.24" setuptools - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - # SymEngineConfig.cmake (installed by the C++ build) declares - # `cmake_minimum_required(VERSION 2.8.12)` with no upper bound; - # CMake 4 in this image refuses anything below 3.5 (gotcha 257). - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CMAKE_POLICY_VERSION_MINIMUM=3.5 - # The wheel bundles its own tests/ (symengine/tests/CMakeLists.txt - # installs them alongside the package), so no checkout staging is - # needed -- this is upstream's own bin/test_python.py invocation, - # run against the installed wheel with no source tree in sys.path - # to shadow it. - CIBW_TEST_REQUIRES: pytest sympy numpy - CIBW_TEST_COMMAND: python -c "import symengine, sys; sys.exit(0 if symengine.test() else 1)" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: symengine-${{ env.SYMENGINE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "symengine" + version: "${{ matrix.version }}" + repository: "symengine/symengine.py" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 120 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Builds the C++ SymEngine library once per container (not per + # interpreter) and installs it to /usr/local, which CMake's + # find_package(SymEngine) searches by default -- setup.py's own + # cmake invocation then picks it up with no --symengine-dir needed. + # gmp/mpfr/libmpc come from Rocky 10's repos, replacing upstream's + # conda-forge builds of the same libraries -- build/link-time only, + # no effect on what the C++ library computes. INTEGER_CLASS stays + # at its default (gmp) rather than upstream's flint: flint-devel + # has no Rocky 10 package on any arch (confirmed via repoquery), and + # it is a performance accelerator, not required for correctness. + # WITH_LLVM likewise stays at its default (no): upstream's own + # recipe pins llvmdev<17, but Rocky 10 only carries llvm-devel 21.x, + # and the LLVM JIT backend is optional. BUILD_TESTS/BUILD_BENCHMARKS + # are off to keep the native build bounded; the Python wheel is + # exercised instead by the upstream pytest suite below. + cibw-before-all-linux: > + dnf -y install gmp-devel mpfr-devel libmpc-devel && + cd /tmp && + curl -fsSLO https://github.com/symengine/symengine/releases/download/v${{ env.SYMENGINE_CXX_VERSION }}/symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz && + echo "${{ env.SYMENGINE_CXX_SHA256 }} symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz" | sha256sum -c - && + tar xzf symengine-${{ env.SYMENGINE_CXX_VERSION }}.tar.gz && + cmake -Bbuild -Ssymengine-${{ env.SYMENGINE_CXX_VERSION }} -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release + -DBUILD_FOR_DISTRIBUTION=yes -DBUILD_SHARED_LIBS=no -DWITH_MPC=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no && + cmake --build build -j"$(nproc)" && + cmake --build build --target install && + cp /usr/share/licenses/gmp/COPYINGv3 /project/LICENSE.gmp && + cp /usr/share/licenses/mpfr/COPYING.LESSER /project/LICENSE.mpfr && + cp /usr/share/licenses/libmpc/COPYING.LESSER /project/LICENSE.mpc + cibw-before-build: "pip install -U \"cython>=0.29.24\" setuptools" + cibw-build-frontend: "pip; args: --no-build-isolation" + # SymEngineConfig.cmake (installed by the C++ build) declares + # `cmake_minimum_required(VERSION 2.8.12)` with no upper bound; + # CMake 4 in this image refuses anything below 3.5 (gotcha 257). + cibw-environment-linux: "PIP_ONLY_BINARY=numpy CMAKE_POLICY_VERSION_MINIMUM=3.5" + # The wheel bundles its own tests/ (symengine/tests/CMakeLists.txt + # installs them alongside the package), so no checkout staging is + # needed -- this is upstream's own bin/test_python.py invocation, + # run against the installed wheel with no source tree in sys.path + # to shadow it. + cibw-test-requires: "pytest sympy numpy" + cibw-test-command: "python -c \"import symengine, sys; sys.exit(0 if symengine.test() else 1)\"" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-tach.yml b/.github/workflows/build-tach.yml index 781bc4239989..b16123510818 100644 --- a/.github/workflows/build-tach.yml +++ b/.github/workflows/build-tach.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tach ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -68,59 +66,37 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - TACH_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tach v${{ env.TACH_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: gauge-sh/tach - ref: v${{ env.TACH_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # tach ships no [tool.cibuildwheel]; the Rust toolchain its maturin - # backend needs is installed in-container here (gotcha 10). - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal - # ruff_linter's dependency graph is heavy enough to SIGABRT (alloc - # failure) at cargo's default parallelism on these 4-core runners. - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CARGO_BUILD_JOBS=2 - # Upstream's own pytest suite (python/tests); test_version.py reads - # pyproject.toml/Cargo.toml two levels above, and test_export.py - # needs a real .git ancestor (upstream runs pytest from the full - # clone), so stage those too. - CIBW_TEST_SOURCES: python/tests pyproject.toml Cargo.toml .git - CIBW_TEST_REQUIRES: pytest==9.1.1 pytest-mock==3.15.1 - # git_ops.py's is_github_actions() branch avoids repo.active_branch - # (which errors on the detached HEAD actions/checkout leaves), but - # only fires when these are set; cibuildwheel's test container - # doesn't forward the host's own GITHUB_* env. - CIBW_TEST_ENVIRONMENT: >- - GITHUB_ACTIONS=true - GITHUB_EVENT_NAME=${{ github.event_name }} - GITHUB_REF_NAME=${{ github.ref_name }} - GITHUB_HEAD_REF=${{ github.head_ref }} - CIBW_TEST_COMMAND: >- - python -c "import tach.extension as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest python/tests -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tach-${{ env.TACH_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tach" + version: "${{ matrix.version }}" + repository: "gauge-sh/tach" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # tach ships no [tool.cibuildwheel]; the Rust toolchain its maturin + # backend needs is installed in-container here (gotcha 10). + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + # ruff_linter's dependency graph is heavy enough to SIGABRT (alloc + # failure) at cargo's default parallelism on these 4-core runners. + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" CARGO_BUILD_JOBS=2" + # Upstream's own pytest suite (python/tests); test_version.py reads + # pyproject.toml/Cargo.toml two levels above, and test_export.py + # needs a real .git ancestor (upstream runs pytest from the full + # clone), so stage those too. + cibw-test-sources: "python/tests pyproject.toml Cargo.toml .git" + cibw-test-requires: "pytest==9.1.1 pytest-mock==3.15.1" + # git_ops.py's is_github_actions() branch avoids repo.active_branch + # (which errors on the detached HEAD actions/checkout leaves), but + # only fires when these are set; cibuildwheel's test container + # doesn't forward the host's own GITHUB_* env. + cibw-test-environment: "GITHUB_ACTIONS=true GITHUB_EVENT_NAME=${{ github.event_name }} GITHUB_REF_NAME=${{ github.ref_name }} GITHUB_HEAD_REF=${{ github.head_ref }}" + cibw-test-command: > + python -c "import tach.extension as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest python/tests -v publish: name: Publish tach ${{ matrix.version }} diff --git a/.github/workflows/build-tantivy.yml b/.github/workflows/build-tantivy.yml index 20dfde44e12b..b5fc4d320fe9 100644 --- a/.github/workflows/build-tantivy.yml +++ b/.github/workflows/build-tantivy.yml @@ -49,53 +49,37 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tantivy ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 120 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TANTIVY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tantivy-py ${{ env.TANTIVY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: quickwit-oss/tantivy-py - ref: ${{ env.TANTIVY_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_ARCHS: riscv64 - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # tantivy-py ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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"' - # The repo-root tantivy/ package (from .tantivy import *) shadows the - # wheel's compiled submodule when tested in place (no .so there outside - # a maturin-develop editable install), so stage only what the suite - # needs (gotcha 25). docs/contributing.md is a symlink to - # ../CONTRIBUTING.md, so that file needs staging too or test_docs.py - # hits a dangling link. - CIBW_TEST_SOURCES: tests docs CONTRIBUTING.md - CIBW_TEST_REQUIRES: pytest mktestdocs==0.2.1 - CIBW_TEST_COMMAND: >- - python -c "import tantivy.tantivy as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tantivy-${{ env.TANTIVY_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tantivy" + version: "${{ matrix.version }}" + repository: "quickwit-oss/tantivy-py" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 120 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # tantivy-py ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + # The repo-root tantivy/ package (from .tantivy import *) shadows the + # wheel's compiled submodule when tested in place (no .so there outside + # a maturin-develop editable install), so stage only what the suite + # needs (gotcha 25). docs/contributing.md is a symlink to + # ../CONTRIBUTING.md, so that file needs staging too or test_docs.py + # hits a dangling link. + cibw-test-sources: "tests docs CONTRIBUTING.md" + cibw-test-requires: "pytest mktestdocs==0.2.1" + cibw-test-command: > + python -c "import tantivy.tantivy as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest tests publish: name: Publish tantivy ${{ matrix.version }} diff --git a/.github/workflows/build-tcod.yml b/.github/workflows/build-tcod.yml index f48c9856b0bc..af19cf8af63b 100644 --- a/.github/workflows/build-tcod.yml +++ b/.github/workflows/build-tcod.yml @@ -53,113 +53,77 @@ jobs: if: needs.setup.outputs.versions != '[]' # No env context in jobs..name: the floor is spelled out (see ABI3_FLOOR). name: Build tcod ${{ matrix.version }} cp310-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - TCOD_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tcod ${{ env.TCOD_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: libtcod/python-tcod - ref: ${{ env.TCOD_VERSION }} - submodules: recursive - fetch-depth: 0 - persist-credentials: false - - - name: Build and test wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp310-* cp311-* cp312-* cp313-* cp314-* - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # Upstream's own before-all, minus epel-release (gotcha 51: EPEL is - # empty on riscv64, a no-op) and minus vulkan-devel/libXScrnSaver-devel - # (no riscv64 package; SDL's cmake auto-detects their absence and - # disables the matching optional backend instead of failing). - CIBW_BEFORE_ALL_LINUX: >- - dnf install -y -q - gcc git cmake make pkgconfig - alsa-lib-devel pulseaudio-libs-devel - libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel libXi-devel - dbus-devel ibus-devel systemd-devel - mesa-libGL-devel mesa-libEGL-devel mesa-libGLES-devel libxkbcommon-devel - wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel libusb1-devel && - git clone --depth 1 --branch release-3.2.16 https://github.com/libsdl-org/SDL.git /tmp/sdl && - cmake -S /tmp/sdl -B /tmp/sdl-build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON && - cmake --build /tmp/sdl-build --config Release -j$(nproc) && - cmake --install /tmp/sdl-build --config Release --prefix /usr/local && - cp /usr/local/lib64/pkgconfig/sdl3.pc /lib64/pkgconfig/sdl3.pc - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CIBW_BEFORE_TEST: pip install numpy - CIBW_TEST_COMMAND: python -c "import tcod.context" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tcod-${{ env.TCOD_VERSION }}-${{ env.ABI3_FLOOR }}-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tcod" + version: "${{ matrix.version }}" + repository: "libtcod/python-tcod" + ref: "${{ matrix.version }}" + artifact-tag: "cp310-abi3-manylinux_riscv64" + timeout-minutes: 90 + checkout-submodules: "recursive" + checkout-fetch-depth: 0 + cibw-build: "cp310-* cp311-* cp312-* cp313-* cp314-*" + # Upstream's own before-all, minus epel-release (gotcha 51: EPEL is + # empty on riscv64, a no-op) and minus vulkan-devel/libXScrnSaver-devel + # (no riscv64 package; SDL's cmake auto-detects their absence and + # disables the matching optional backend instead of failing). + cibw-before-all-linux: > + dnf install -y -q + gcc git cmake make pkgconfig + alsa-lib-devel pulseaudio-libs-devel + libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel libXi-devel + dbus-devel ibus-devel systemd-devel + mesa-libGL-devel mesa-libEGL-devel mesa-libGLES-devel libxkbcommon-devel + wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel libusb1-devel && + git clone --depth 1 --branch release-3.2.16 https://github.com/libsdl-org/SDL.git /tmp/sdl && + cmake -S /tmp/sdl -B /tmp/sdl-build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON && + cmake --build /tmp/sdl-build --config Release -j$(nproc) && + cmake --install /tmp/sdl-build --config Release --prefix /usr/local && + cp /usr/local/lib64/pkgconfig/sdl3.pc /lib64/pkgconfig/sdl3.pc + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" + cibw-before-test: "pip install numpy" + cibw-test-command: "python -c \"import tcod.context\"" build_freethreaded: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tcod ${{ matrix.version }} cp314t-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - TCOD_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tcod ${{ env.TCOD_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: libtcod/python-tcod - ref: ${{ env.TCOD_VERSION }} - submodules: recursive - fetch-depth: 0 - persist-credentials: false - - - name: Build and test wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_ARCHS: riscv64 - CIBW_BUILD: cp314t-* - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_BEFORE_ALL_LINUX: >- - dnf install -y -q - gcc git cmake make pkgconfig - alsa-lib-devel pulseaudio-libs-devel - libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel libXi-devel - dbus-devel ibus-devel systemd-devel - mesa-libGL-devel mesa-libEGL-devel mesa-libGLES-devel libxkbcommon-devel - wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel libusb1-devel && - git clone --depth 1 --branch release-3.2.16 https://github.com/libsdl-org/SDL.git /tmp/sdl && - cmake -S /tmp/sdl -B /tmp/sdl-build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON && - cmake --build /tmp/sdl-build --config Release -j$(nproc) && - cmake --install /tmp/sdl-build --config Release --prefix /usr/local && - cp /usr/local/lib64/pkgconfig/sdl3.pc /lib64/pkgconfig/sdl3.pc - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy - CIBW_BEFORE_TEST: pip install numpy - CIBW_TEST_COMMAND: python -c "import tcod.context" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tcod-${{ env.TCOD_VERSION }}-cp314t-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tcod" + version: "${{ matrix.version }}" + repository: "libtcod/python-tcod" + ref: "${{ matrix.version }}" + artifact-tag: "cp314t-manylinux_riscv64" + timeout-minutes: 90 + checkout-submodules: "recursive" + checkout-fetch-depth: 0 + cibw-build: "cp314t-*" + cibw-before-all-linux: > + dnf install -y -q + gcc git cmake make pkgconfig + alsa-lib-devel pulseaudio-libs-devel + libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel libXi-devel + dbus-devel ibus-devel systemd-devel + mesa-libGL-devel mesa-libEGL-devel mesa-libGLES-devel libxkbcommon-devel + wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel libusb1-devel && + git clone --depth 1 --branch release-3.2.16 https://github.com/libsdl-org/SDL.git /tmp/sdl && + cmake -S /tmp/sdl -B /tmp/sdl-build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON && + cmake --build /tmp/sdl-build --config Release -j$(nproc) && + cmake --install /tmp/sdl-build --config Release --prefix /usr/local && + cp /usr/local/lib64/pkgconfig/sdl3.pc /lib64/pkgconfig/sdl3.pc + cibw-environment-linux: "PIP_ONLY_BINARY=numpy" + cibw-before-test: "pip install numpy" + cibw-test-command: "python -c \"import tcod.context\"" publish: name: Publish tcod ${{ matrix.version }} diff --git a/.github/workflows/build-test-results-parser.yml b/.github/workflows/build-test-results-parser.yml index 321c6702d1de..8eca689bce14 100644 --- a/.github/workflows/build-test-results-parser.yml +++ b/.github/workflows/build-test-results-parser.yml @@ -48,48 +48,30 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build test-results-parser ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TEST_RESULTS_PARSER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout test-results-parser v${{ env.TEST_RESULTS_PARSER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: codecov/test-results-parser - ref: v${{ env.TEST_RESULTS_PARSER_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # test-results-parser ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container. - 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" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import test_results_parser; assert test_results_parser.test_results_parser.__file__.endswith('.so'), test_results_parser.test_results_parser.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: test-results-parser-${{ env.TEST_RESULTS_PARSER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "test-results-parser" + version: "${{ matrix.version }}" + repository: "codecov/test-results-parser" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # test-results-parser ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container. + 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\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import test_results_parser; assert test_results_parser.test_results_parser.__file__.endswith('.so'), test_results_parser.test_results_parser.__file__" && + python -m pytest -v tests publish: name: Publish test-results-parser ${{ matrix.version }} diff --git a/.github/workflows/build-tibs.yml b/.github/workflows/build-tibs.yml index aa55721d3501..73a68c7f50d1 100644 --- a/.github/workflows/build-tibs.yml +++ b/.github/workflows/build-tibs.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tibs ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -68,42 +66,25 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - TIBS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tibs v${{ env.TIBS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: scott-griffiths/tibs - ref: v${{ env.TIBS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # tibs ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest hypothesis pytest-benchmark - # doc/ carries the `>>>` examples that tests/test_docs.py runs. - CIBW_TEST_SOURCES: tests doc - CIBW_TEST_COMMAND: python -m pytest - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tibs-${{ env.TIBS_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tibs" + version: "${{ matrix.version }}" + repository: "scott-griffiths/tibs" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # tibs ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest hypothesis pytest-benchmark" + # doc/ carries the `>>>` examples that tests/test_docs.py runs. + cibw-test-sources: "tests doc" + cibw-test-command: "python -m pytest" publish: name: Publish tibs ${{ matrix.version }} diff --git a/.github/workflows/build-tiktoken.yml b/.github/workflows/build-tiktoken.yml index c9268d996cad..28a858cba1e5 100644 --- a/.github/workflows/build-tiktoken.yml +++ b/.github/workflows/build-tiktoken.yml @@ -47,8 +47,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tiktoken ${{ matrix.version }} - runs-on: ${{ matrix.os }} - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -63,26 +61,15 @@ jobs: # python-version: [39, 310, 311, 312, 313, 314, 314t, 315, 315t] python-version: [ 312, 313, 314, 314t] - env: - TIKTOKEN_VERSION: ${{ matrix.version }} - - steps: - # we need to checkout upstream source - - name: Checkout tiktoken ${{ env.TIKTOKEN_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 - with: - repository: openai/tiktoken - ref: ${{ env.TIKTOKEN_VERSION }} - persist-credentials: false - - - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - CIBW_BUILD: "cp${{ matrix.python-version}}-*" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tiktoken-${{ env.TIKTOKEN_VERSION }}-cp${{ matrix.python-version }}-manylinux_riscv64 - path: ./wheelhouse/*.whl + # we need to checkout upstream source + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tiktoken" + version: "${{ matrix.version }}" + repository: "openai/tiktoken" + ref: "${{ matrix.version }}" + artifact-tag: "cp${{ matrix.python-version }}-manylinux_riscv64" + cibw-build: "cp${{ matrix.python-version}}-*" publish: name: Publish tiktoken ${{ matrix.version }} diff --git a/.github/workflows/build-tinyobjloader.yml b/.github/workflows/build-tinyobjloader.yml index c27ac884ecd1..e32f143b540a 100644 --- a/.github/workflows/build-tinyobjloader.yml +++ b/.github/workflows/build-tinyobjloader.yml @@ -47,48 +47,29 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tinyobjloader ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TINYOBJLOADER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tinyobjloader v${{ env.TINYOBJLOADER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: tinyobjloader/tinyobjloader - ref: v${{ env.TINYOBJLOADER_VERSION }} - fetch-depth: 0 - fetch-tags: true - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # numpy has no riscv64 wheel on public PyPI; keep pip on our registry's copy. - # It's only a test dependency: the wheel itself declares none. - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=numpy - CIBW_TEST_REQUIRES: numpy - # Upstream ships no automated test suite at this tag; python/sample.py is - # its own smoke-test script exercising parsing, attributes, materials, - # shapes, and the numpy_* accessors against models/cornell_box.obj. - CIBW_TEST_COMMAND: cd {project}/python && python sample.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tinyobjloader-${{ env.TINYOBJLOADER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tinyobjloader" + version: "${{ matrix.version }}" + repository: "tinyobjloader/tinyobjloader" + ref: "v${{ matrix.version }}" + checkout-fetch-tags: true + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + checkout-fetch-depth: 0 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # numpy has no riscv64 wheel on public PyPI; keep pip on our registry's copy. + # It's only a test dependency: the wheel itself declares none. + cibw-test-environment: "PIP_ONLY_BINARY=numpy" + cibw-test-requires: "numpy" + # Upstream ships no automated test suite at this tag; python/sample.py is + # its own smoke-test script exercising parsing, attributes, materials, + # shapes, and the numpy_* accessors against models/cornell_box.obj. + cibw-test-command: "cd {project}/python && python sample.py" publish: name: Publish tinyobjloader ${{ matrix.version }} diff --git a/.github/workflows/build-torchft.yml b/.github/workflows/build-torchft.yml index b4c5b9e13e56..2ed665b182df 100644 --- a/.github/workflows/build-torchft.yml +++ b/.github/workflows/build-torchft.yml @@ -52,86 +52,65 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build torchft ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TORCHFT_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout torchft v${{ env.TORCHFT_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: meta-pytorch/torchft - ref: v${{ env.TORCHFT_VERSION }} - persist-credentials: false - - - 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 }} - # cp310/cp311 compile in ~22min, but cp312/cp313 (the only legs whose tests can install torch) lose the runner ~50min in, - # before and after the cargo cap below; bound the container to 12GB of the runner's 15GB (no swap) so an OOM kills pytest, not the runner (gotchas 421, 458). - CIBW_CONTAINER_ENGINE: "docker; create_args: --memory=12g --memory-swap=12g" - # torchft ships no [tool.cibuildwheel]; the Rust toolchain its maturin - # backend needs is installed in-container here. tonic-build needs - # protoc at build time to compile proto/torchft.proto; Rocky 10's CRB - # repo (enabled in the image) has one (CLAUDE.md gotcha 100). - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && - yum install -y protobuf-compiler protobuf-devel - # PROTOC_INCLUDE is needed because proto/torchft.proto imports - # google/protobuf/timestamp.proto and CRB's protoc (3.19) resolves - # well-known types from disk rather than from the binary. - # CARGO_BUILD_JOBS=2 and a single release codegen unit: on all six - # cp312/cp313 legs across three run attempts the build died while - # rustc was compiling the torchft crate itself, either with - # "Fatal glibc error: pthread_mutex_lock.c:94 (___pthread_mutex_lock): - # assertion failed: mutex->__data.__owner == 0" from rustc or with the - # runner losing communication; this caps rustc's parallel LLVM threads - # and peak memory (see gotcha 421 and gotcha 458). - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PROTOC_INCLUDE=/usr/include - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CARGO_BUILD_JOBS=2 - CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 - # The integ tests run 2-3 replicas per process; one intra-op thread each keeps them within the 4-core runner. - CIBW_TEST_ENVIRONMENT_LINUX: PIP_ONLY_BINARY=numpy,torch OMP_NUM_THREADS=1 - CIBW_TEST_REQUIRES: pytest==8.3.4 pytest-timeout pytest-rerunfailures parameterized numpy - # Mirrors upstream's own cpu-runner test leg (pytest -v --reruns 3 - # --reruns-delay 5). diloco_regression_test.py resolves its golden - # fixtures relative to the installed package's parent directory - # (site-packages/test_fixtures/...), which no wheel -- upstream's - # published one included -- ships; -k drops it rather than chasing a - # fixture layout the wheel was never going to carry. - # BabyGlooMultiPgTest (process_group_test.py) uses - # mp.get_context("spawn") to run each of its WORLD_SIZE=3 ranks in a - # real subprocess that reimports torch+torchft from scratch; every - # one of its collectives errored deterministically (RERUN x3, then - # ERROR) on both cp312 and cp313 runs, and the accumulated spawns - # eventually hit the 12GB container cap above and got SIGKILLed - # (exit 137) before the suite could finish. NormalGlooMultiPgTest - # exercises the identical collective matrix in-process (no - # subprocess spawn) and passes cleanly, so this only drops the - # subprocess-spawn variant upstream itself already treats as - # environment-fragile (`@skipIf(sys.platform == "darwin", ...)`). - CIBW_TEST_COMMAND: >- - python -c "import torchft._torchft as m; assert m.__file__.endswith('.so'), m.__file__" && - python -m pytest -v --pyargs torchft - --timeout=180 --timeout-method=thread --reruns 3 --reruns-delay 5 - -k "not diloco_regression and not BabyGlooMultiPgTest" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: torchft-${{ env.TORCHFT_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "torchft" + version: "${{ matrix.version }}" + repository: "meta-pytorch/torchft" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + timeout-minutes: 180 + cibw-build: "${{ matrix.python }}-manylinux_riscv64" + # cp310/cp311 compile in ~22min, but cp312/cp313 (the only legs whose tests can install torch) lose the runner ~50min in, + # before and after the cargo cap below; bound the container to 12GB of the runner's 15GB (no swap) so an OOM kills pytest, not the runner (gotchas 421, 458). + cibw-container-engine: "docker; create_args: --memory=12g --memory-swap=12g" + # torchft ships no [tool.cibuildwheel]; the Rust toolchain its maturin + # backend needs is installed in-container here. tonic-build needs + # protoc at build time to compile proto/torchft.proto; Rocky 10's CRB + # repo (enabled in the image) has one (CLAUDE.md gotcha 100). + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + yum install -y protobuf-compiler protobuf-devel + # PROTOC_INCLUDE is needed because proto/torchft.proto imports + # google/protobuf/timestamp.proto and CRB's protoc (3.19) resolves + # well-known types from disk rather than from the binary. + # CARGO_BUILD_JOBS=2 and a single release codegen unit: on all six + # cp312/cp313 legs across three run attempts the build died while + # rustc was compiling the torchft crate itself, either with + # "Fatal glibc error: pthread_mutex_lock.c:94 (___pthread_mutex_lock): + # assertion failed: mutex->__data.__owner == 0" from rustc or with the + # runner losing communication; this caps rustc's parallel LLVM threads + # and peak memory (see gotcha 421 and gotcha 458). + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" PROTOC_INCLUDE=/usr/include CARGO_BUILD_JOBS=2 CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1" + # The integ tests run 2-3 replicas per process; one intra-op thread each keeps them within the 4-core runner. + cibw-test-environment-linux: "PIP_ONLY_BINARY=numpy,torch OMP_NUM_THREADS=1" + cibw-test-requires: "pytest==8.3.4 pytest-timeout pytest-rerunfailures parameterized numpy" + # Mirrors upstream's own cpu-runner test leg (pytest -v --reruns 3 + # --reruns-delay 5). diloco_regression_test.py resolves its golden + # fixtures relative to the installed package's parent directory + # (site-packages/test_fixtures/...), which no wheel -- upstream's + # published one included -- ships; -k drops it rather than chasing a + # fixture layout the wheel was never going to carry. + # BabyGlooMultiPgTest (process_group_test.py) uses + # mp.get_context("spawn") to run each of its WORLD_SIZE=3 ranks in a + # real subprocess that reimports torch+torchft from scratch; every + # one of its collectives errored deterministically (RERUN x3, then + # ERROR) on both cp312 and cp313 runs, and the accumulated spawns + # eventually hit the 12GB container cap above and got SIGKILLed + # (exit 137) before the suite could finish. NormalGlooMultiPgTest + # exercises the identical collective matrix in-process (no + # subprocess spawn) and passes cleanly, so this only drops the + # subprocess-spawn variant upstream itself already treats as + # environment-fragile (`@skipIf(sys.platform == "darwin", ...)`). + cibw-test-command: > + python -c "import torchft._torchft as m; assert m.__file__.endswith('.so'), m.__file__" && + python -m pytest -v --pyargs torchft + --timeout=180 --timeout-method=thread --reruns 3 --reruns-delay 5 + -k "not diloco_regression and not BabyGlooMultiPgTest" publish: name: Publish torchft ${{ matrix.version }} diff --git a/.github/workflows/build-typeid-python.yml b/.github/workflows/build-typeid-python.yml index cebdcd2b82c5..daf809d21766 100644 --- a/.github/workflows/build-typeid-python.yml +++ b/.github/workflows/build-typeid-python.yml @@ -48,52 +48,32 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build typeid-python ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - TYPEID_PYTHON_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout typeid-python v${{ env.TYPEID_PYTHON_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: akhundMurad/typeid-python - ref: v${{ env.TYPEID_PYTHON_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # typeid-python ships no [tool.cibuildwheel], so install the Rust - # toolchain its maturin backend needs in-container and put it on PATH. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # [tool.maturin] include (LICENSE/README/typeid/rust-base32) leaves - # tests/ out of the sdist, so stage it from the checkout (gotcha 104). - # Mirrors upstream's pytest suite; doc tests (make test-docs) and lint - # (make lint) are dev-only, not wheel tests. - CIBW_TEST_REQUIRES: pytest requests pyyaml click pydantic - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -q tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: typeid-python-${{ env.TYPEID_PYTHON_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "typeid-python" + version: "${{ matrix.version }}" + repository: "akhundMurad/typeid-python" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # typeid-python ships no [tool.cibuildwheel], so install the Rust + # toolchain its maturin backend needs in-container and put it on PATH. + 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\"" + # [tool.maturin] include (LICENSE/README/typeid/rust-base32) leaves + # tests/ out of the sdist, so stage it from the checkout (gotcha 104). + # Mirrors upstream's pytest suite; doc tests (make test-docs) and lint + # (make lint) are dev-only, not wheel tests. + cibw-test-requires: "pytest requests pyyaml click pydantic" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -q tests" publish: name: Publish typeid-python ${{ matrix.version }} diff --git a/.github/workflows/build-typst.yml b/.github/workflows/build-typst.yml index 243df94d67ab..382729f41c38 100644 --- a/.github/workflows/build-typst.yml +++ b/.github/workflows/build-typst.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build typst ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -68,45 +66,32 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - TYPST_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout typst-py v${{ env.TYPST_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: messense/typst-py - ref: v${{ env.TYPST_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # typst-py ships no [tool.cibuildwheel]: install the Rust toolchain - # maturin needs, plus `perl` for the vendored OpenSSL build that - # typst-kit's `vendor-openssl` feature pulls in (gotcha 46 -- Rocky - # 10 ships no FindBin.pm/Time::Piece, so `perl-core` alone isn't - # enough). - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && - dnf -y install perl - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import typst._typst as m, importlib.metadata as md; - assert m.__file__.endswith('.so'), m.__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('typst'))" && - python -m pytest tests -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: typst-${{ env.TYPST_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "typst" + version: "${{ matrix.version }}" + repository: "messense/typst-py" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # typst-py ships no [tool.cibuildwheel]: install the Rust toolchain + # maturin needs, plus `perl` for the vendored OpenSSL build that + # typst-kit's `vendor-openssl` feature pulls in (gotcha 46 -- Rocky + # 10 ships no FindBin.pm/Time::Piece, so `perl-core` alone isn't + # enough). + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + dnf -y install perl + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import typst._typst as m, importlib.metadata as md; + assert m.__file__.endswith('.so'), m.__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('typst'))" && + python -m pytest tests -v publish: name: Publish typst ${{ matrix.version }} diff --git a/.github/workflows/build-tzfpy.yml b/.github/workflows/build-tzfpy.yml index a3588fd037c5..5b9004f6e99d 100644 --- a/.github/workflows/build-tzfpy.yml +++ b/.github/workflows/build-tzfpy.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build tzfpy ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 180 strategy: fail-fast: false matrix: @@ -68,46 +66,29 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - TZFPY_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout tzfpy ${{ env.TZFPY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ringsaturn/tzfpy - ref: v${{ env.TZFPY_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # tzfpy ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_REQUIRES: pytest citiespy pytz tzdata arrow whenever - CIBW_TEST_SOURCES: tests - # test_bench.py and test_build_simple_index.py test the benchmark - # harness and a release script, not the wheel. - CIBW_TEST_COMMAND: >- - python -m pytest -v - tests/test_basic.py tests/test_smock.py tests/test_exp_index_env.py - tests/test_compatibility.py - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: tzfpy-${{ env.TZFPY_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "tzfpy" + version: "${{ matrix.version }}" + repository: "ringsaturn/tzfpy" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 180 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # tzfpy ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest citiespy pytz tzdata arrow whenever" + cibw-test-sources: "tests" + # test_bench.py and test_build_simple_index.py test the benchmark + # harness and a release script, not the wheel. + cibw-test-command: > + python -m pytest -v + tests/test_basic.py tests/test_smock.py tests/test_exp_index_env.py + tests/test_compatibility.py publish: name: Publish tzfpy ${{ matrix.version }} diff --git a/.github/workflows/build-ua-parser-rs.yml b/.github/workflows/build-ua-parser-rs.yml index 9f1e654e004b..430e47beb912 100644 --- a/.github/workflows/build-ua-parser-rs.yml +++ b/.github/workflows/build-ua-parser-rs.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build ua-parser-rs ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: @@ -70,60 +68,45 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - UA_PARSER_RS_VERSION: ${{ matrix.version }} - - steps: - # ua-parser-rs is a pyo3/maturin wheel living at `ua-parser-rs/` inside - # the ua-parser/uap-python monorepo (moved there from ua-parser/uap-rust - # -- the crate's own Cargo.toml still points `homepage`/`repository` at - # the old location). - - name: Checkout uap-python ua-parser-rs-${{ env.UA_PARSER_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: ua-parser/uap-python - ref: ua-parser-rs-${{ env.UA_PARSER_RS_VERSION }} - submodules: true - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: ua-parser-rs - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # ua-parser-rs ships no [tool.cibuildwheel], so the Rust toolchain - # its maturin backend needs is installed in-container here. - 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" - CIBW_TEST_REQUIRES: pytest pyyaml - # CIBW_TEST_SOURCES resolves against the checkout root (the - # uap-python monorepo), not package-dir: staging the top-level - # `ua_parser` package plus the uap-core submodule it tests against - # lets the test command install and exercise the real ua_parser.regex - # backend that wraps this wheel, same as upstream's own CI does. - CIBW_TEST_SOURCES: tests uap-core src pyproject.toml README.rst - # ua_parser_rs's top-level __init__.py is maturin's own pyi-stub shim - # ('from .ua_parser_rs import *', matching the official PyPI wheel) -- - # the compiled extension is the ua_parser_rs.ua_parser_rs submodule. - CIBW_TEST_COMMAND: >- - python -c "import ua_parser_rs; - assert ua_parser_rs.ua_parser_rs.__file__.endswith(('.so', '.pyd')), ua_parser_rs.ua_parser_rs.__file__; - e = ua_parser_rs.UserAgentExtractor([('(Chrome)/([0-9]+)', None, None, None, None, None)]); - r = e.extract('Mozilla/5.0 Chrome/120'); - assert r is not None and r.family == 'Chrome' and r.major == '120', r" && - python -m pip install . && - python -m pytest -v tests/test_core.py -k regex - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ua_parser_rs-${{ env.UA_PARSER_RS_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # ua-parser-rs is a pyo3/maturin wheel living at `ua-parser-rs/` inside + # the ua-parser/uap-python monorepo (moved there from ua-parser/uap-rust + # -- the crate's own Cargo.toml still points `homepage`/`repository` at + # the old location). + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "ua_parser_rs" + version: "${{ matrix.version }}" + repository: "ua-parser/uap-python" + ref: "ua-parser-rs-${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 90 + checkout-submodules: "true" + cibw-package-dir: "ua-parser-rs" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # ua-parser-rs ships no [tool.cibuildwheel], so the Rust toolchain + # its maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest pyyaml" + # CIBW_TEST_SOURCES resolves against the checkout root (the + # uap-python monorepo), not package-dir: staging the top-level + # `ua_parser` package plus the uap-core submodule it tests against + # lets the test command install and exercise the real ua_parser.regex + # backend that wraps this wheel, same as upstream's own CI does. + cibw-test-sources: "tests uap-core src pyproject.toml README.rst" + # ua_parser_rs's top-level __init__.py is maturin's own pyi-stub shim + # ('from .ua_parser_rs import *', matching the official PyPI wheel) -- + # the compiled extension is the ua_parser_rs.ua_parser_rs submodule. + cibw-test-command: > + python -c "import ua_parser_rs; + assert ua_parser_rs.ua_parser_rs.__file__.endswith(('.so', '.pyd')), ua_parser_rs.ua_parser_rs.__file__; + e = ua_parser_rs.UserAgentExtractor([('(Chrome)/([0-9]+)', None, None, None, None, None)]); + r = e.extract('Mozilla/5.0 Chrome/120'); + assert r is not None and r.family == 'Chrome' and r.major == '120', r" && + python -m pip install . && + python -m pytest -v tests/test_core.py -k regex publish: name: Publish ua-parser-rs ${{ matrix.version }} diff --git a/.github/workflows/build-unicode-segmentation-rs.yml b/.github/workflows/build-unicode-segmentation-rs.yml index dcd95b52307e..767074f39ec1 100644 --- a/.github/workflows/build-unicode-segmentation-rs.yml +++ b/.github/workflows/build-unicode-segmentation-rs.yml @@ -49,8 +49,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build unicode-segmentation-rs ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -69,50 +67,32 @@ jobs: - python: cp315t features: '--features abi3t' - env: - UNICODE_SEGMENTATION_RS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout unicode-segmentation-rs v${{ env.UNICODE_SEGMENTATION_RS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: WeblateOrg/unicode-segmentation-rs - ref: v${{ env.UNICODE_SEGMENTATION_RS_VERSION }} - persist-credentials: false - - - name: Build and test wheel - 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 }} - # unicode-segmentation-rs ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container here. - 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" - MATURIN_PEP517_ARGS="${{ matrix.features }}" - # The cp315-abi3.abi3t wheel exports its multi-phase init entry point as - # PyModExport_unicode_segmentation_rs (defined in the extension itself, not - # imported); cibuildwheel's bundled abi3audit doesn't recognize that name and - # flags it as a non-abi3 symbol (gotcha 134), reproducing on upstream's own - # published wheel. - CIBW_AUDIT_COMMAND: '' - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import unicode_segmentation_rs as m, importlib.metadata as md; - assert m.unicode_segmentation_rs.__file__.endswith('.so'), m.unicode_segmentation_rs.__file__; - assert any(str(p).endswith('licenses/LICENSE') for p in md.files('unicode-segmentation-rs'))" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: unicode-segmentation-rs-${{ env.UNICODE_SEGMENTATION_RS_VERSION }}-${{ matrix.python }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "unicode-segmentation-rs" + version: "${{ matrix.version }}" + repository: "WeblateOrg/unicode-segmentation-rs" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-manylinux_riscv64" + cibw-build: "${{ matrix.python }}-manylinux_riscv64" + # unicode-segmentation-rs ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container here. + 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\" MATURIN_PEP517_ARGS=\"${{ matrix.features }}\"" + # The cp315-abi3.abi3t wheel exports its multi-phase init entry point as + # PyModExport_unicode_segmentation_rs (defined in the extension itself, not + # imported); cibuildwheel's bundled abi3audit doesn't recognize that name and + # flags it as a non-abi3 symbol (gotcha 134), reproducing on upstream's own + # published wheel. + cibw-audit-command: '' + cibw-test-requires: "pytest" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import unicode_segmentation_rs as m, importlib.metadata as md; + assert m.unicode_segmentation_rs.__file__.endswith('.so'), m.unicode_segmentation_rs.__file__; + assert any(str(p).endswith('licenses/LICENSE') for p in md.files('unicode-segmentation-rs'))" && + python -m pytest -v tests publish: name: Publish unicode-segmentation-rs ${{ matrix.version }} diff --git a/.github/workflows/build-usearch.yml b/.github/workflows/build-usearch.yml index 1e14d6b81f2a..4508b04eabc3 100644 --- a/.github/workflows/build-usearch.yml +++ b/.github/workflows/build-usearch.yml @@ -49,61 +49,42 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build usearch ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - USEARCH_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout usearch v${{ env.USEARCH_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: unum-cloud/USearch - ref: v${{ env.USEARCH_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # setup.py unconditionally links -static-libstdc++ on Linux; the - # image's gcc-c++ package doesn't pull in the static archive, so - # add it to upstream's own before-all (glibc-devel wget python3-devel). - CIBW_BEFORE_ALL_LINUX: >- - yum update -y --disablerepo=extras --setopt=install_weak_deps=0 && - yum install -y --disablerepo=extras glibc-devel wget python3-devel libstdc++-static - # numpy has no riscv64 wheel on public PyPI yet; numkong and cmake - # already publish one there, so only numpy needs our registry. - # PIP_PREFER_BINARY (gotcha 354) keeps an unpinned numpy build - # requirement from racing a same-day PyPI release that our own - # riscv64 wheel hasn't been published for yet, which otherwise - # falls back to a from-source build that ICEs the manylinux gcc. - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_PREFER_BINARY=1 - # Upstream disables cibuildwheel's own test step (pyproject.toml: - # "everything is happening in a super slow container" / tests run in - # prerelease.yml instead) - run that suite here since it's the only - # place riscv64 wheels get tested. numba/cppyy/peachpy are skipped: - # none has a riscv64 wheel, and every test using them already - # self-skips via ImportError (or a platform.machine() check for - # peachpy) when the optional package is absent. - CIBW_TEST_REQUIRES: pytest pytest-repeat - CIBW_TEST_COMMAND: pytest {package}/python/scripts - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: usearch-${{ env.USEARCH_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "usearch" + version: "${{ matrix.version }}" + repository: "unum-cloud/USearch" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # setup.py unconditionally links -static-libstdc++ on Linux; the + # image's gcc-c++ package doesn't pull in the static archive, so + # add it to upstream's own before-all (glibc-devel wget python3-devel). + cibw-before-all-linux: > + yum update -y --disablerepo=extras --setopt=install_weak_deps=0 && + yum install -y --disablerepo=extras glibc-devel wget python3-devel libstdc++-static + # numpy has no riscv64 wheel on public PyPI yet; numkong and cmake + # already publish one there, so only numpy needs our registry. + # PIP_PREFER_BINARY (gotcha 354) keeps an unpinned numpy build + # requirement from racing a same-day PyPI release that our own + # riscv64 wheel hasn't been published for yet, which otherwise + # falls back to a from-source build that ICEs the manylinux gcc. + cibw-environment-linux: "PIP_PREFER_BINARY=1" + # Upstream disables cibuildwheel's own test step (pyproject.toml: + # "everything is happening in a super slow container" / tests run in + # prerelease.yml instead) - run that suite here since it's the only + # place riscv64 wheels get tested. numba/cppyy/peachpy are skipped: + # none has a riscv64 wheel, and every test using them already + # self-skips via ImportError (or a platform.machine() check for + # peachpy) when the optional package is absent. + cibw-test-requires: "pytest pytest-repeat" + cibw-test-command: "pytest {package}/python/scripts" gpl_sources: needs: [setup] diff --git a/.github/workflows/build-uuid-utils.yml b/.github/workflows/build-uuid-utils.yml index a0e62f70ffef..f8619935f693 100644 --- a/.github/workflows/build-uuid-utils.yml +++ b/.github/workflows/build-uuid-utils.yml @@ -48,46 +48,29 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build uuid-utils ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 90 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - UUID_UTILS_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout uuid-utils ${{ env.UUID_UTILS_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: aminalaee/uuid-utils - ref: ${{ env.UUID_UTILS_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # uuid-utils ships no [tool.cibuildwheel], so the Rust toolchain its - # maturin backend needs is installed in-container here. - 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"' - CIBW_TEST_REQUIRES: pytest pytest-codspeed - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: uuid-utils-${{ env.UUID_UTILS_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "uuid-utils" + version: "${{ matrix.version }}" + repository: "aminalaee/uuid-utils" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 90 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # uuid-utils ships no [tool.cibuildwheel], so the Rust toolchain its + # maturin backend needs is installed in-container here. + 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\"" + cibw-test-requires: "pytest pytest-codspeed" + cibw-test-sources: "tests" + cibw-test-command: "python -m pytest -v tests" publish: name: Publish uuid-utils ${{ matrix.version }} diff --git a/.github/workflows/build-vaex-core.yml b/.github/workflows/build-vaex-core.yml index b58ec96cce22..b1f6dd8e2448 100644 --- a/.github/workflows/build-vaex-core.yml +++ b/.github/workflows/build-vaex-core.yml @@ -52,76 +52,56 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build vaex-core ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - # The four C++ extensions (-O3 -g, heavily templated) take ~2h40m to - # compile on the riscv64 runner on their own; 180 left no headroom. - timeout-minutes: 360 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - VAEX_CORE_VERSION: ${{ matrix.version }} - - steps: - # vaex-core lives in a subdirectory of the vaex monorepo and vendors - # pybind11/string-view-lite/hopscotch-map/flat_hash_map as submodules. - - name: Checkout vaex core-v${{ env.VAEX_CORE_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: vaexio/vaex - ref: core-v${{ env.VAEX_CORE_VERSION }} - submodules: true - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: packages/vaex-core - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # superstrings links against pcre/pcrecpp. Upstream's - # bin/install_pcre.sh tries a distro package, then falls back to a - # source build. manylinux_2_39_riscv64 is Rocky Linux 10, and RHEL 10 - # dropped PCRE1 (only pcre2 is left), so `dnf install pcre-devel` - # finds nothing. We take the source-build path with the final PCRE1 - # release, using the flags distro packages use (no JIT: PCRE1's sljit - # has no riscv64 backend). --libdir=/usr/lib64 keeps the libraries on - # the riscv64 linker path (gotcha 140). auditwheel vendors - # libpcre/libpcrecpp into the wheel, so PCRE's BSD licence goes in - # too: setuptools' default LICEN[CS]E* glob picks it up from the - # package dir. - CIBW_BEFORE_ALL_LINUX: >- - cd /tmp && - curl -fsSL --retry 5 -o pcre-${{ env.PCRE_VERSION }}.tar.gz https://sourceforge.net/projects/pcre/files/pcre/${{ env.PCRE_VERSION }}/pcre-${{ env.PCRE_VERSION }}.tar.gz/download && - echo "${{ env.PCRE_SHA256 }} pcre-${{ env.PCRE_VERSION }}.tar.gz" | sha256sum -c - && - tar xzf pcre-${{ env.PCRE_VERSION }}.tar.gz && - (cd pcre-${{ env.PCRE_VERSION }} && ./configure --prefix=/usr --libdir=/usr/lib64 --disable-static --enable-cpp --enable-utf --enable-unicode-properties && make -j"$(nproc)" && make install) && - cp pcre-${{ env.PCRE_VERSION }}/LICENCE /project/packages/vaex-core/LICENSE.pcre - # Upstream's import smoke test, plus a regex search so pcrecpp is - # really called, plus a check that the PCRE licence made it in. - CIBW_TEST_COMMAND: >- - python -c "import vaex, importlib.metadata as md; - df = vaex.from_arrays(x=[1,2], s=['ab', 'cd']); print(df); - assert df.s.str.contains('^a.').tolist() == [True, False]; - n = {p.name for p in md.files('vaex-core') if '.dist-info/licenses/' in str(p)}; - assert n == {'LICENSE.txt', 'LICENSE.pcre'}, n" - # Only the compiled distributions are forced to wheels. `:all:` also - # rejected aplus, a pure-Python requirement that only ships an sdist - # ("No matching distribution found for aplus", gotcha 488). - CIBW_TEST_ENVIRONMENT_LINUX: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - PIP_ONLY_BINARY=numpy,pandas,pyarrow,blake3,pydantic-core,pyyaml - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: vaex_core-${{ env.VAEX_CORE_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error - + # The four C++ extensions (-O3 -g, heavily templated) take ~2h40m to + # compile on the riscv64 runner on their own; 180 left no headroom. + # vaex-core lives in a subdirectory of the vaex monorepo and vendors + # pybind11/string-view-lite/hopscotch-map/flat_hash_map as submodules. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "vaex_core" + version: "${{ matrix.version }}" + repository: "vaexio/vaex" + ref: "core-v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + timeout-minutes: 360 + checkout-submodules: "true" + cibw-package-dir: "packages/vaex-core" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # superstrings links against pcre/pcrecpp. Upstream's + # bin/install_pcre.sh tries a distro package, then falls back to a + # source build. manylinux_2_39_riscv64 is Rocky Linux 10, and RHEL 10 + # dropped PCRE1 (only pcre2 is left), so `dnf install pcre-devel` + # finds nothing. We take the source-build path with the final PCRE1 + # release, using the flags distro packages use (no JIT: PCRE1's sljit + # has no riscv64 backend). --libdir=/usr/lib64 keeps the libraries on + # the riscv64 linker path (gotcha 140). auditwheel vendors + # libpcre/libpcrecpp into the wheel, so PCRE's BSD licence goes in + # too: setuptools' default LICEN[CS]E* glob picks it up from the + # package dir. + cibw-before-all-linux: > + cd /tmp && + curl -fsSL --retry 5 -o pcre-${{ env.PCRE_VERSION }}.tar.gz https://sourceforge.net/projects/pcre/files/pcre/${{ env.PCRE_VERSION }}/pcre-${{ env.PCRE_VERSION }}.tar.gz/download && + echo "${{ env.PCRE_SHA256 }} pcre-${{ env.PCRE_VERSION }}.tar.gz" | sha256sum -c - && + tar xzf pcre-${{ env.PCRE_VERSION }}.tar.gz && + (cd pcre-${{ env.PCRE_VERSION }} && ./configure --prefix=/usr --libdir=/usr/lib64 --disable-static --enable-cpp --enable-utf --enable-unicode-properties && make -j"$(nproc)" && make install) && + cp pcre-${{ env.PCRE_VERSION }}/LICENCE /project/packages/vaex-core/LICENSE.pcre + # Upstream's import smoke test, plus a regex search so pcrecpp is + # really called, plus a check that the PCRE licence made it in. + cibw-test-command: > + python -c "import vaex, importlib.metadata as md; + df = vaex.from_arrays(x=[1,2], s=['ab', 'cd']); print(df); + assert df.s.str.contains('^a.').tolist() == [True, False]; + n = {p.name for p in md.files('vaex-core') if '.dist-info/licenses/' in str(p)}; + assert n == {'LICENSE.txt', 'LICENSE.pcre'}, n" + # Only the compiled distributions are forced to wheels. `:all:` also + # rejected aplus, a pure-Python requirement that only ships an sdist + # ("No matching distribution found for aplus", gotcha 488). + cibw-test-environment-linux: "PIP_ONLY_BINARY=numpy,pandas,pyarrow,blake3,pydantic-core,pyyaml" publish: name: Publish vaex-core ${{ matrix.version }} needs: [setup, build_wheels] diff --git a/.github/workflows/build-vodozemac.yml b/.github/workflows/build-vodozemac.yml index 4290cfa3d714..b512bce5191e 100644 --- a/.github/workflows/build-vodozemac.yml +++ b/.github/workflows/build-vodozemac.yml @@ -49,49 +49,31 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build vodozemac ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - VODOZEMAC_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout vodozemac-python ${{ env.VODOZEMAC_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: matrix-nio/vodozemac-python - ref: ${{ env.VODOZEMAC_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # vodozemac-python ships no [tool.cibuildwheel], so the Rust - # toolchain its maturin backend needs is installed in-container - # here. - 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" - CIBW_TEST_REQUIRES: pytest hypothesis - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import vodozemac.vodozemac as ext; assert ext.__file__.endswith('.so'), ext.__file__" && - python -m pytest -v tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: vodozemac-${{ env.VODOZEMAC_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "vodozemac" + version: "${{ matrix.version }}" + repository: "matrix-nio/vodozemac-python" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # vodozemac-python ships no [tool.cibuildwheel], so the Rust + # toolchain its maturin backend needs is installed in-container + # here. + 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\"" + cibw-test-requires: "pytest hypothesis" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import vodozemac.vodozemac as ext; assert ext.__file__.endswith('.so'), ext.__file__" && + python -m pytest -v tests publish: name: Publish vodozemac ${{ matrix.version }} diff --git a/.github/workflows/build-vtracer.yml b/.github/workflows/build-vtracer.yml index 8e0d8111383f..f32e7f0702f1 100644 --- a/.github/workflows/build-vtracer.yml +++ b/.github/workflows/build-vtracer.yml @@ -49,56 +49,38 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build vtracer ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 60 strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - VTRACER_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout vtracer ${{ env.VTRACER_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: visioncortex/vtracer - ref: ${{ env.VTRACER_VERSION }} - persist-credentials: false - - - name: Build and test wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: cmdapp - output-dir: wheelhouse/ - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # vtracer's pyproject.toml carries no [tool.cibuildwheel], so the - # Rust toolchain its maturin backend needs is installed in-container - # here. - 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" - # Upstream ships no Python test suite at all. Exercise the - # extension for real instead: convert a small two-colour raster to - # SVG and check it actually traced a path, not just the README's - # bare import. - CIBW_TEST_COMMAND: >- - python -c "import vtracer.vtracer as ext, vtracer; - assert ext.__file__.endswith('.so'), ext.__file__; - w, h = 10, 10; - pixels = [(255, 0, 0, 255) if x < w // 2 else (0, 0, 255, 255) for y in range(h) for x in range(w)]; - svg = vtracer.convert_pixels_to_svg(pixels, (w, h)); - assert isinstance(svg, str) and ' + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + # Upstream ships no Python test suite at all. Exercise the + # extension for real instead: convert a small two-colour raster to + # SVG and check it actually traced a path, not just the README's + # bare import. + cibw-test-command: > + python -c "import vtracer.vtracer as ext, vtracer; + assert ext.__file__.endswith('.so'), ext.__file__; + w, h = 10, 10; + pixels = [(255, 0, 0, 255) if x < w // 2 else (0, 0, 255, 255) for y in range(h) for x in range(w)]; + svg = vtracer.convert_pixels_to_svg(pixels, (w, h)); + assert isinstance(svg, str) and '- - 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 hypothesis typing-extensions time_machine tzdata pydantic pytest-order - CIBW_TEST_SOURCES: tests - CIBW_TEST_COMMAND: >- - python -c "import whenever; assert whenever._EXTENSION_LOADED, whenever._EXTENSION_LOADED" && - python -m pytest -q tests - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: whenever-${{ env.WHENEVER_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "whenever" + version: "${{ matrix.version }}" + repository: "ariebovenberg/whenever" + ref: "${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # pyproject.toml declares no [build-system] rust toolchain; the Rust + # toolchain setuptools_rust needs is installed in-container. + 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\"" + cibw-test-requires: "pytest hypothesis typing-extensions time_machine tzdata pydantic pytest-order" + cibw-test-sources: "tests" + cibw-test-command: > + python -c "import whenever; assert whenever._EXTENSION_LOADED, whenever._EXTENSION_LOADED" && + python -m pytest -q tests publish: name: Publish whenever ${{ matrix.version }} diff --git a/.github/workflows/build-wren-core-py.yml b/.github/workflows/build-wren-core-py.yml index ab5b00476997..90c73a346410 100644 --- a/.github/workflows/build-wren-core-py.yml +++ b/.github/workflows/build-wren-core-py.yml @@ -54,54 +54,35 @@ jobs: # cp312 instead -- the wheel is still tagged cp311-abi3 regardless of # which interpreter compiles it (CLAUDE.md gotcha 96). name: Build wren-core-py ${{ matrix.version }} cp311-abi3-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: version: ${{ fromJSON(needs.setup.outputs.versions) }} - env: - WREN_CORE_PY_VERSION: ${{ matrix.version }} - - steps: - # wren-core-py is not itself a Cargo workspace member; it path-depends - # on ../wren-core/core and ../wren-core-base, both siblings in the - # Canner/WrenAI monorepo, so the checkout root has to be the repo - # root, not core/wren-core-py itself. - - name: Checkout WrenAI wren-core-py-v${{ env.WREN_CORE_PY_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: Canner/WrenAI - ref: wren-core-py-v${{ env.WREN_CORE_PY_VERSION }} - persist-credentials: false - - - name: Build wheel - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - package-dir: core/wren-core-py - output-dir: wheelhouse/ - env: - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64 - # No [tool.cibuildwheel] table upstream, so the Rust toolchain - # maturin needs is installed in-container here. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - CIBW_TEST_ENVIRONMENT: PIP_ONLY_BINARY=pyarrow,numpy - CIBW_TEST_REQUIRES: pytest pyarrow - CIBW_TEST_SOURCES: core/wren-core-py/tests - # Upstream runs pytest from core/wren-core-py; tests open tests/functions.csv relative to it. - CIBW_TEST_COMMAND: cd core/wren-core-py && python -m pytest tests -v - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: wren-core-py-${{ env.WREN_CORE_PY_VERSION }}-cp311-abi3-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + # wren-core-py is not itself a Cargo workspace member; it path-depends + # on ../wren-core/core and ../wren-core-base, both siblings in the + # Canner/WrenAI monorepo, so the checkout root has to be the repo + # root, not core/wren-core-py itself. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "wren-core-py" + version: "${{ matrix.version }}" + repository: "Canner/WrenAI" + ref: "wren-core-py-v${{ matrix.version }}" + artifact-tag: "cp311-abi3-manylinux_riscv64" + timeout-minutes: 360 + cibw-package-dir: "core/wren-core-py" + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "cp312-manylinux_riscv64 cp313-manylinux_riscv64 cp314-manylinux_riscv64" + # No [tool.cibuildwheel] table upstream, so the Rust toolchain + # maturin needs is installed in-container here. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\"" + cibw-test-environment: "PIP_ONLY_BINARY=pyarrow,numpy" + cibw-test-requires: "pytest pyarrow" + cibw-test-sources: "core/wren-core-py/tests" + # Upstream runs pytest from core/wren-core-py; tests open tests/functions.csv relative to it. + cibw-test-command: "cd core/wren-core-py && python -m pytest tests -v" publish: name: Publish wren-core-py ${{ matrix.version }} diff --git a/.github/workflows/build-wreq.yml b/.github/workflows/build-wreq.yml index 9b83f5e0163e..c6a34b84fd11 100644 --- a/.github/workflows/build-wreq.yml +++ b/.github/workflows/build-wreq.yml @@ -52,8 +52,6 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build wreq ${{ matrix.version }} ${{ matrix.tag }}-manylinux_riscv64 - runs-on: ubuntu-24.04-riscv - timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -70,73 +68,54 @@ jobs: - tag: cp314t build: cp314t-manylinux_riscv64 - env: - WREQ_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout wreq-python v${{ env.WREQ_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: 0x676e67/wreq-python - ref: v${{ env.WREQ_VERSION }} - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - env: - # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. - CIBW_BUILD: ${{ matrix.build }} - CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} - # btls-sys runs bindgen (libclang) and `git apply`s its BoringSSL patches. - CIBW_BEFORE_ALL_LINUX: >- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && - dnf install -y clang-devel git - # From 0.12.2 on, wreq-python's own Cargo.toml [patch.crates-io] pins - # wreq/wreq-util/btls to exact git revs, so a plain lockfile already - # resolves to those; the 0.12.1-only --precise pin below is no longer - # just unneeded but breaks the build, since cargo reads a --precise - # value against a git-patched dependency as a git ref, and - # "6.0.0-rc.29" isn't one in 0x676e67/wreq. - # From 0.13.0 on, wreq-python's [patch.crates-io] also floats netty to - # branch=main; netty's own Cargo.toml separately patches http2 to a git - # rev for a Connection::extended_connect_protocol method no http2 release - # has yet ("Remove once an http2 release includes" it, per netty's own - # comment), but a dependency's [patch] table is only honoured for the - # top-level workspace, so wreq-python's build never picks it up and - # resolves crates.io's http2 instead, which is missing that method. Add - # the same patch to wreq-python's own Cargo.toml before locking. - CIBW_BEFORE_BUILD_LINUX: >- - ${{ matrix.version == '0.12.1' && format('cargo generate-lockfile && cargo update -p wreq --precise {0}', env.WREQ_CRATE_VERSION) || - matrix.version == '0.13.0' && 'sed -i ''/^\[patch.crates-io\]/a http2 = { git = "https://github.com/0x676e67/http2", rev = "c932fc91f3139f5613a579b7b11df2860d66745c" }'' Cargo.toml && cargo generate-lockfile' || - 'cargo generate-lockfile' }} - CIBW_ENVIRONMENT_LINUX: >- - PATH="$PATH:$HOME/.cargo/bin" - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - MATURIN_PEP517_ARGS="--features jemalloc" - CARGO_BUILD_JOBS=2 - # Upstream's tests job serves httpbin on localhost:8080 from the kennethreitz/httpbin - # container, i.e. under gunicorn: httpbin answers every chunked (streamed-body) - # request with a 501 unless SERVER_SOFTWARE is gunicorn, so the Werkzeug dev - # server behind `python -m httpbin.core` fails the body-stream tests. - CIBW_TEST_REQUIRES: pytest pytest-asyncio pytest-rerunfailures httpbin gunicorn - # The body-stream and multipart tests open these by a repo-root-relative path. - CIBW_TEST_SOURCES: tests README.md Cargo.toml LICENSE - CIBW_TEST_COMMAND: >- - python -m gunicorn -b 127.0.0.1:8080 -k gthread --threads 8 httpbin:app > httpbin.log 2>&1 & HTTPBIN_PID=$!; - python -c "import wreq.wreq as m; assert m.__file__.endswith('.so'), m.__file__" && - for i in $(seq 60); do - python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/get', timeout=2)" 2>/dev/null && break; - sleep 1; done && - python -m pytest -v tests; rc=$?; - kill $HTTPBIN_PID; [ $rc = 0 ] || tail -n 50 httpbin.log; exit $rc - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: wreq-${{ env.WREQ_VERSION }}-${{ matrix.tag }}-manylinux_riscv64 - path: wheelhouse/*.whl - if-no-files-found: error + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "wreq" + version: "${{ matrix.version }}" + repository: "0x676e67/wreq-python" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.tag }}-manylinux_riscv64" + timeout-minutes: 360 + # musllinux is dropped: rustup.rs ships no riscv64 musl toolchain. + cibw-build: "${{ matrix.build }}" + # btls-sys runs bindgen (libclang) and `git apply`s its BoringSSL patches. + cibw-before-all-linux: > + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + dnf install -y clang-devel git + # From 0.12.2 on, wreq-python's own Cargo.toml [patch.crates-io] pins + # wreq/wreq-util/btls to exact git revs, so a plain lockfile already + # resolves to those; the 0.12.1-only --precise pin below is no longer + # just unneeded but breaks the build, since cargo reads a --precise + # value against a git-patched dependency as a git ref, and + # "6.0.0-rc.29" isn't one in 0x676e67/wreq. + # From 0.13.0 on, wreq-python's [patch.crates-io] also floats netty to + # branch=main; netty's own Cargo.toml separately patches http2 to a git + # rev for a Connection::extended_connect_protocol method no http2 release + # has yet ("Remove once an http2 release includes" it, per netty's own + # comment), but a dependency's [patch] table is only honoured for the + # top-level workspace, so wreq-python's build never picks it up and + # resolves crates.io's http2 instead, which is missing that method. Add + # the same patch to wreq-python's own Cargo.toml before locking. + cibw-before-build-linux: > + ${{ matrix.version == '0.12.1' && format('cargo generate-lockfile && cargo update -p wreq --precise {0}', env.WREQ_CRATE_VERSION) || + matrix.version == '0.13.0' && 'sed -i ''/^\[patch.crates-io\]/a http2 = { git = "https://github.com/0x676e67/http2", rev = "c932fc91f3139f5613a579b7b11df2860d66745c" }'' Cargo.toml && cargo generate-lockfile' || + 'cargo generate-lockfile' }} + cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" MATURIN_PEP517_ARGS=\"--features jemalloc\" CARGO_BUILD_JOBS=2" + # Upstream's tests job serves httpbin on localhost:8080 from the kennethreitz/httpbin + # container, i.e. under gunicorn: httpbin answers every chunked (streamed-body) + # request with a 501 unless SERVER_SOFTWARE is gunicorn, so the Werkzeug dev + # server behind `python -m httpbin.core` fails the body-stream tests. + cibw-test-requires: "pytest pytest-asyncio pytest-rerunfailures httpbin gunicorn" + # The body-stream and multipart tests open these by a repo-root-relative path. + cibw-test-sources: "tests README.md Cargo.toml LICENSE" + cibw-test-command: > + python -m gunicorn -b 127.0.0.1:8080 -k gthread --threads 8 httpbin:app > httpbin.log 2>&1 & HTTPBIN_PID=$!; + python -c "import wreq.wreq as m; assert m.__file__.endswith('.so'), m.__file__" && + for i in $(seq 60); do + python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/get', timeout=2)" 2>/dev/null && break; + sleep 1; done && + python -m pytest -v tests; rc=$?; + kill $HTTPBIN_PID; [ $rc = 0 ] || tail -n 50 httpbin.log; exit $rc publish: name: Publish wreq ${{ matrix.version }} diff --git a/.github/workflows/build-xgrammar.yml b/.github/workflows/build-xgrammar.yml index 939a21961c9b..93101ab3631e 100644 --- a/.github/workflows/build-xgrammar.yml +++ b/.github/workflows/build-xgrammar.yml @@ -46,97 +46,78 @@ jobs: needs: [setup] if: needs.setup.outputs.versions != '[]' name: Build xgrammar ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - runs-on: ubuntu-24.04-riscv strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} - env: - XGRAMMAR_VERSION: ${{ matrix.version }} - - steps: - - name: Checkout xgrammar v${{ env.XGRAMMAR_VERSION }} - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: mlc-ai/xgrammar - ref: v${{ env.XGRAMMAR_VERSION }} - # 3rdparty/dlpack and 3rdparty/googletest are needed at build time; - # dlpack headers are referenced by CMake, googletest by the C++ tests. - # cpptrace is only used when XGRAMMAR_ENABLE_CPPTRACE=ON (off by default). - submodules: recursive - persist-credentials: false - - - name: Build wheels - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 - with: - output-dir: wheelhouse/ - only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64 - env: - # pyproject pins [tool.cibuildwheel.linux] archs to x86_64+aarch64; - # override so this native riscv runner builds the riscv64 wheel. - CIBW_ARCHS: riscv64 - # Override upstream's build-frontend = "build[uv]". cibuildwheel's audit - # step creates a venv on the *host* runner (not in the container) and, - # when the frontend is build[uv], insists on a host `uv` binary. - # The self-hosted riscv runner has no host uv, so use plain `build` - # (pip/virtualenv on the host) instead. - CIBW_BUILD_FRONTEND: build - # CIBW_ENVIRONMENT applies to both build and test phases. - # Point pip at our registry so build-time deps (apache-tvm-ffi riscv64 - # wheel) and test-time deps resolve correctly. - # Do NOT set ONLY_BINARY here: scikit-build-core itself is a build dep - # that installs from sdist if needed. - CIBW_ENVIRONMENT: >- - PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ - # Skip tests for cp314t: numpy, tokenizers and safetensors (runtime - # deps pulled in via transformers) have no free-threaded riscv64 - # wheels on any index yet, so the test-install step fails. The wheel - # itself builds and links correctly; re-enable once those deps land. - CIBW_TEST_SKIP: cp314t-* - # Test phase only: force wheels-only so a missing riscv64 wheel for a - # heavy test dep (torch, tokenizers) fails fast instead of silently - # kicking off a multi-hour source build on the runner. - CIBW_TEST_ENVIRONMENT: "PIP_ONLY_BINARY=:all:" - # Mirror upstream's test-command from pyproject.toml - # (pytest {project}/tests -m "not hf_token_required"), but omit the - # hf_token_required marker filter: conftest.py already auto-skips those - # tests when no HF_TOKEN is present, so it's redundant here and we get - # a cleaner "SKIP" record instead of "not collected". Deselect the - # MELODY-tagged cases: they need cohere_melody, dropped below. On - # 0.2.5/0.2.5.post1 only, also deselect - # test_json_schema_style_deepseek_xml_format, - # test_json_schema_style_minimax_xml_format, - # test_json_schema_style_qwen_xml_format, - # test_qwen_parameter_xml_format and test_any_order_qwen_xml: their - # expected_grammar fixtures don't match what those tags' own - # converters emit (a pair of whitespace tokens around a - # TagDispatch xml_string field is missing or misplaced), - # independent of platform; the fixtures were corrected in v0.2.6. - # This is the full set of test functions affected by this fixture - # bug: confirmed exhaustively by diffing tests/python/*.py between - # the v0.2.5.post1 and v0.2.6 tags of mlc-ai/xgrammar and checking - # every hunk that touches qwen_xml/TagDispatch/xml_string fixtures - # (see tests/python/test_structural_tag_converter.py and - # tests/python/test_json_schema_converter.py diffs between those - # tags) -- no other test function has this bug. - CIBW_TEST_COMMAND: pytest {project}/tests -vvs -k "not MELODY${{ (matrix.version == '0.2.5' || matrix.version == '0.2.5.post1') && ' and not test_json_schema_style_deepseek_xml_format and not test_json_schema_style_minimax_xml_format and not test_json_schema_style_qwen_xml_format and not test_qwen_parameter_xml_format and not test_any_order_qwen_xml' || '' }}" - # Override test-extras = ["test"]: that pulls in cohere_melody, a - # Rust/maturin package with no riscv64 wheel anywhere and an sdist - # that itself fails to build (needs a working cargo toolchain in the - # build venv). An empty CIBW_TEST_EXTRAS does cancel test-extras - # (unlike CIBW_BEFORE_TEST, gotcha 336), so list the rest of the - # test extra by hand instead; sentencepiece unconditionally, since - # pyproject's python_version < '3.10' branch never applies to this - # matrix. - CIBW_TEST_EXTRAS: '' - CIBW_TEST_REQUIRES: "huggingface-hub[cli] protobuf pytest sentencepiece tiktoken" - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: xgrammar-${{ env.XGRAMMAR_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64 - path: ./wheelhouse/*.whl - if-no-files-found: error + # 3rdparty/dlpack and 3rdparty/googletest are needed at build time; + # dlpack headers are referenced by CMake, googletest by the C++ tests. + # cpptrace is only used when XGRAMMAR_ENABLE_CPPTRACE=ON (off by default). + # pyproject pins [tool.cibuildwheel.linux] archs to x86_64+aarch64; + # override so this native riscv runner builds the riscv64 wheel. + uses: $/.github/workflows/_build-cibuildwheel.yml + with: + package: "xgrammar" + version: "${{ matrix.version }}" + repository: "mlc-ai/xgrammar" + ref: "v${{ matrix.version }}" + artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + checkout-submodules: "recursive" + cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64" + # Override upstream's build-frontend = "build[uv]". cibuildwheel's audit + # step creates a venv on the *host* runner (not in the container) and, + # when the frontend is build[uv], insists on a host `uv` binary. + # The self-hosted riscv runner has no host uv, so use plain `build` + # (pip/virtualenv on the host) instead. + cibw-build-frontend: "build" + # CIBW_ENVIRONMENT applies to both build and test phases. + # Point pip at our registry so build-time deps (apache-tvm-ffi riscv64 + # wheel) and test-time deps resolve correctly. + # Do NOT set ONLY_BINARY here: scikit-build-core itself is a build dep + # that installs from sdist if needed. + # Skip tests for cp314t: numpy, tokenizers and safetensors (runtime + # deps pulled in via transformers) have no free-threaded riscv64 + # wheels on any index yet, so the test-install step fails. The wheel + # itself builds and links correctly; re-enable once those deps land. + cibw-test-skip: "cp314t-*" + # Test phase only: force wheels-only so a missing riscv64 wheel for a + # heavy test dep (torch, tokenizers) fails fast instead of silently + # kicking off a multi-hour source build on the runner. + cibw-test-environment: "PIP_ONLY_BINARY=:all:" + # Mirror upstream's test-command from pyproject.toml + # (pytest {project}/tests -m "not hf_token_required"), but omit the + # hf_token_required marker filter: conftest.py already auto-skips those + # tests when no HF_TOKEN is present, so it's redundant here and we get + # a cleaner "SKIP" record instead of "not collected". Deselect the + # MELODY-tagged cases: they need cohere_melody, dropped below. On + # 0.2.5/0.2.5.post1 only, also deselect + # test_json_schema_style_deepseek_xml_format, + # test_json_schema_style_minimax_xml_format, + # test_json_schema_style_qwen_xml_format, + # test_qwen_parameter_xml_format and test_any_order_qwen_xml: their + # expected_grammar fixtures don't match what those tags' own + # converters emit (a pair of whitespace tokens around a + # TagDispatch xml_string field is missing or misplaced), + # independent of platform; the fixtures were corrected in v0.2.6. + # This is the full set of test functions affected by this fixture + # bug: confirmed exhaustively by diffing tests/python/*.py between + # the v0.2.5.post1 and v0.2.6 tags of mlc-ai/xgrammar and checking + # every hunk that touches qwen_xml/TagDispatch/xml_string fixtures + # (see tests/python/test_structural_tag_converter.py and + # tests/python/test_json_schema_converter.py diffs between those + # tags) -- no other test function has this bug. + cibw-test-command: "pytest {project}/tests -vvs -k \"not MELODY${{ (matrix.version == '0.2.5' || matrix.version == '0.2.5.post1') && ' and not test_json_schema_style_deepseek_xml_format and not test_json_schema_style_minimax_xml_format and not test_json_schema_style_qwen_xml_format and not test_qwen_parameter_xml_format and not test_any_order_qwen_xml' || '' }}\"" + # Override test-extras = ["test"]: that pulls in cohere_melody, a + # Rust/maturin package with no riscv64 wheel anywhere and an sdist + # that itself fails to build (needs a working cargo toolchain in the + # build venv). An empty CIBW_TEST_EXTRAS does cancel test-extras + # (unlike CIBW_BEFORE_TEST, gotcha 336), so list the rest of the + # test extra by hand instead; sentencepiece unconditionally, since + # pyproject's python_version < '3.10' branch never applies to this + # matrix. + cibw-test-extras: '' + cibw-test-requires: "huggingface-hub[cli] protobuf pytest sentencepiece tiktoken" publish: name: Publish xgrammar ${{ matrix.version }}