docs: Update projects (#2254) #84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 The RISE Project | |
| # SPDX-License-Identifier: MIT | |
| --- | |
| # This workflow is based on the `build_linux_wheels` job of | |
| # https://github.com/oracle/python-oracledb/blob/v4.0.2/.github/workflows/build.yaml | |
| # Dropped: macos, windows, musllinux (the registry has no musl riscv64 cryptography, | |
| # which oracledb requires at runtime). | |
| name: Build oracledb wheels (riscv64) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version glob to (re)build; empty builds every version of docs/packages/oracledb.yaml not released yet' | |
| required: false | |
| default: '' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-oracledb.yml' | |
| - 'docs/packages/oracledb.yaml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/build-oracledb.yml' | |
| - 'docs/packages/oracledb.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: oracledb | |
| version: ${{ inputs.version }} | |
| build_wheels: | |
| needs: [setup] | |
| if: needs.setup.outputs.versions != '[]' | |
| name: Build oracledb ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64 | |
| runs-on: ubuntu-24.04-riscv | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ${{ fromJSON(needs.setup.outputs.versions) }} | |
| # cp314t is left out: upstream publishes no free-threaded wheel and its tox | |
| # envlist stops at py314. | |
| python: | |
| - "cp312" | |
| - "cp313" | |
| - "cp314" | |
| env: | |
| ORACLEDB_VERSION: ${{ matrix.version }} | |
| steps: | |
| - name: Checkout python-oracledb v${{ env.ORACLEDB_VERSION }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: oracle/python-oracledb | |
| ref: v${{ env.ORACLEDB_VERSION }} | |
| submodules: true | |
| persist-credentials: false | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 | |
| with: | |
| output-dir: wheelhouse/ | |
| only: ${{ matrix.python }}-manylinux_riscv64 | |
| env: | |
| CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} | |
| CIBW_ENVIRONMENT: >- | |
| PYO_COMPILE_ARGS=-g0 | |
| PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ | |
| # Test phase only, so it can't starve the build backend (cython builds from sdist). | |
| CIBW_TEST_ENVIRONMENT: 'PIP_ONLY_BINARY=:all: PYO_TEST_MAIN_PASSWORD=unused' | |
| CIBW_TEST_REQUIRES: pytest numpy pandas | |
| CIBW_TEST_SOURCES: tests | |
| # Upstream's suite needs a live Oracle Database, which has no riscv64 build. | |
| # These five modules pass without one; test_misc_1009 is the only test in | |
| # them that opens a connection. | |
| CIBW_TEST_COMMAND: >- | |
| python -m pytest -k "not test_misc_1009" | |
| tests/misc/test_1000_module.py tests/data_types/test_1200_types.py | |
| tests/misc/test_1300_connect_params.py tests/misc/test_1400_pool_params.py | |
| tests/misc/test_1500_tnsnames.py | |
| - name: Check the extension modules made it into the wheel | |
| run: | | |
| python3 - wheelhouse/*.whl <<'EOF' | |
| import sys, zipfile | |
| expected = {"arrow_impl", "base_impl", "thick_impl", "thin_impl"} | |
| for whl in sys.argv[1:]: | |
| found = { | |
| n.split("/")[-1].split(".")[0] | |
| for n in zipfile.ZipFile(whl).namelist() | |
| if n.endswith(".so") | |
| } | |
| assert found == expected, (whl, found) | |
| print(whl, "ok") | |
| EOF | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: oracledb-${{ env.ORACLEDB_VERSION }}-${{ matrix.python }}-manylinux_riscv64 | |
| path: wheelhouse/*.whl | |
| if-no-files-found: error | |
| publish: | |
| name: Publish oracledb ${{ 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: oracledb-${{ matrix.version }}-*-manylinux_riscv64 |