Skip to content

feat(rocmdoc): migrate to ROCmDoc v2 standard (central ccd466e) (#38) #71

feat(rocmdoc): migrate to ROCmDoc v2 standard (central ccd466e) (#38)

feat(rocmdoc): migrate to ROCmDoc v2 standard (central ccd466e) (#38) #71

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test-build:
name: lint + test + build (CPU, no torch; py${{ matrix.python }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# The package tooling is 3.11+ (CI proves 3.11/3.12/3.13). The published
# BENCHMARK was validated on 3.12 (see reproducibility.lock.yaml); that
# concerns the GPU run, not the CPU-installable package tested here.
python: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install (CPU extras only — never torch or transformers)
run: |
python -m pip install --upgrade pip
pip install -e ".[client,download,dev]"
pip install reuse
- name: compileall
run: python -m compileall -q src scripts
- name: ruff check
run: ruff check .
- name: ruff format --check
run: ruff format --check .
- name: shell syntax
run: bash -n scripts/*.sh
- name: reuse lint (SPDX licensing)
run: reuse lint
- name: pytest with coverage (no-GPU subset)
run: pytest -q -m "not gpu" --cov=hunyuan_ocr --cov-report=term-missing --cov-fail-under=65
- name: repo integrity (lock, manifest, links, SPDX, doc/lock consistency)
run: python scripts/check_repo.py
- name: README results match the lock (single source of truth)
run: python scripts/render_benchmark_tables.py --check
- name: build sdist + wheel
run: python -m build
- name: import + exercise built wheel in a clean venv
run: |
python -m venv /tmp/ve
WHL="$(ls dist/*.whl | head -n1)"
/tmp/ve/bin/pip install --no-deps "$WHL"
/tmp/ve/bin/pip install pillow pyyaml tqdm requests openai huggingface_hub
/tmp/ve/bin/python -c "import hunyuan_ocr; print('import ok', hunyuan_ocr.__version__)"
/tmp/ve/bin/hunyuan-ocr --help >/dev/null
/tmp/ve/bin/hunyuan-ocr doctor --json >/tmp/doctor.json
/tmp/ve/bin/python -c "import json,sys; d=json.load(open('/tmp/doctor.json')); sys.exit(0 if d['ok'] is False or d['ok'] is True else 1)"
- name: upload build artifacts
uses: actions/upload-artifact@v7
with:
name: dist-py${{ matrix.python }}
path: dist/