Merge pull request #7 from Labeeb2339/codex/readme-install-integrity #37
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| # Historical evidence authentication checks recorded commits against | |
| # HEAD, so the test job needs the complete ancestry graph. | |
| fetch-depth: 0 | |
| # This job only reads repository history. Avoid checkout's temporary | |
| # credential includeIf entries so provenance tests see a closed local | |
| # Git configuration without weakening their fail-closed guard. | |
| persist-credentials: false | |
| - uses: actions/setup-python@v7.0.0 | |
| with: | |
| python-version: "3.11" | |
| - uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| python-version: "3.11" | |
| version: "0.11.31" | |
| - name: Install | |
| run: uv pip install --system -e ".[dev,eval]" | |
| - name: Verify frozen MBPP confirmation | |
| run: | | |
| recurquant verify-confirmation \ | |
| evidence/mbpp-v02-confirmation.json \ | |
| evidence/mbpp-v02-confirmation-manifest.json \ | |
| --expect-artifact-sha256 70394c419298fc872cdd08e8aec12d17d5a56aa20f7d3c9f09fe8fdbf26c6ba9 \ | |
| --expect-artifact-evidence-sha256 2a652df92f99fa81f785244d966829e909d31f200e5a1520b76e6b46fb45d3e0 | |
| - name: Verify frozen StateLease Stage-A record | |
| run: >- | |
| recurquant verify-statelease-stage-a | |
| evidence/experiment012-statelease-stage-a-666.json | |
| - name: Lint | |
| run: ruff check . | |
| - name: Test | |
| run: pytest | |
| - name: Check generated README assets | |
| run: python scripts/generate_readme_assets.py --check | |
| package: | |
| name: Build wheel and sdist | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - uses: actions/setup-python@v7.0.0 | |
| with: | |
| python-version: "3.11" | |
| - uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| version: "0.11.31" | |
| - name: Build distributions | |
| run: uv build | |
| - name: Check distribution metadata | |
| run: uvx --from "twine==6.2.0" twine check --strict dist/* | |
| - uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: recurquant-dist | |
| path: dist/* | |
| if-no-files-found: error | |
| retention-days: 7 | |
| wheel-install: | |
| name: Wheel import / ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| needs: package | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.11" | |
| - os: ubuntu-latest | |
| python-version: "3.13" | |
| - os: windows-latest | |
| python-version: "3.11" | |
| steps: | |
| - uses: actions/setup-python@v7.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/download-artifact@v8.0.1 | |
| with: | |
| name: recurquant-dist | |
| path: dist | |
| - name: Install CPU PyTorch | |
| run: python -m pip install "torch>=2.7" --index-url https://download.pytorch.org/whl/cpu | |
| - name: Install the built wheel | |
| run: >- | |
| python -c "import pathlib, subprocess, sys; | |
| wheel = next(pathlib.Path('dist').glob('*.whl')); | |
| subprocess.check_call([sys.executable, '-m', 'pip', 'install', str(wheel)])" | |
| - name: Validate import and console entry point | |
| run: | | |
| python -c "import importlib.metadata as m, recurquant; assert m.version('recurquant') == recurquant.__version__ == '0.2.0a1'; print(recurquant.__version__)" | |
| recurquant demo --bits 4 --group-size 16 |