Repository navigation
docs: Update projects #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 The RISE Project | |
| # SPDX-License-Identifier: MIT | |
| --- | |
| # neo4j-rust-ext ships no public build workflow of its own (its .github/ only | |
| # holds a changelog-entry check); this mirrors what its pyproject.toml/tox.ini | |
| # declare instead: a plain maturin PEP 517 build plus `pytest tests`. | |
| name: Build neo4j-rust-ext wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/neo4j-rust-ext.yaml not released yet' | |
| required: false | |
| default: '' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-neo4j-rust-ext.yml' | |
| - 'docs/packages/neo4j-rust-ext.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-neo4j-rust-ext.yml' | |
| - 'docs/packages/neo4j-rust-ext.yaml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| env: | |
| MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 | |
| jobs: | |
| setup: | |
| uses: $/.github/workflows/_setup.yml | |
| with: | |
| package: neo4j-rust-ext | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| name: Build neo4j-rust-ext ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 | |
| runs-on: ubuntu-24.04-riscv | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| # Upstream also publishes cp310/cp311 (no abi3), but pyarrow - one of | |
| # its own test dependencies - has no riscv64 wheel below cp312 on our | |
| # registry, so the matrix is trimmed to what it can actually test. | |
| python: ["cp312", "cp313", "cp314"] | |
| env: | |
| NEO4J_RUST_EXT_VERSION: ${{ matrix.version }} | |
| steps: | |
| - name: Checkout neo4j-rust-ext ${{ env.NEO4J_RUST_EXT_VERSION }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: neo4j/neo4j-python-driver-rust-ext | |
| ref: ${{ env.NEO4J_RUST_EXT_VERSION }} | |
| persist-credentials: false | |
| # Wheel version is `<neo4j version>.<release counter>`, e.g. 6.2.0.0 -> neo4j==6.2.0. | |
| - name: Derive the matching neo4j driver version | |
| run: | | |
| set -eu | |
| echo "NEO4J_VERSION=${NEO4J_RUST_EXT_VERSION%.*}" >> "${GITHUB_ENV}" | |
| - name: Build 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.python }}-manylinux_riscv64 | |
| CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} | |
| # neo4j-rust-ext 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" | |
| # Without it pip prefers PyPI's newer numpy/pandas/pyarrow, which | |
| # only publish riscv64 wheels on our own registry. | |
| CIBW_TEST_ENVIRONMENT: >- | |
| PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ | |
| PIP_ONLY_BINARY=numpy,pandas,pyarrow | |
| CIBW_TEST_REQUIRES: >- | |
| pytest pytest-mock pytest-benchmark numpy pandas pyarrow | |
| neo4j==${{ env.NEO4J_VERSION }} | |
| CIBW_TEST_SOURCES: tests | |
| # CONTRIBUTING.md's documented `pytest tests`, with tox.ini's own | |
| # `--benchmark-skip` flag to keep CI fast. The two deselected cases | |
| # assert an exact byte-for-byte f32 NaN payload/sign after an | |
| # f64->f32 native conversion (0xffc00000, 0x7fc00011); RISC-V's | |
| # FCVT.S.D always yields the canonical NaN 0x7fc00000, discarding | |
| # payload and sign, so this is gotcha 304's arch-specific | |
| # divergence, not a bug. | |
| CIBW_TEST_COMMAND: >- | |
| python -m pytest -v tests --benchmark-skip | |
| --deselect "tests/vector/from_driver/test_vector.py::test_from_native_special_values[f32-nan-data_be_raw13]" | |
| --deselect "tests/vector/from_driver/test_vector.py::test_from_native_special_values[f32-nan-data_be_raw14]" | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: neo4j-rust-ext-${{ env.NEO4J_RUST_EXT_VERSION }}-${{ matrix.python }}-manylinux_riscv64 | |
| path: wheelhouse/*.whl | |
| if-no-files-found: error | |
| publish: | |
| name: Publish neo4j-rust-ext ${{ matrix.version }} | |
| needs: [setup, build_wheels] | |
| if: needs.setup.outputs.versions != '[]' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| uses: $/.github/workflows/_publish-wheel.yml | |
| secrets: | |
| app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }} | |
| with: | |
| artifact-pattern: neo4j-rust-ext-${{ matrix.version }}-*-manylinux_riscv64 |