Polish public repository documentation #31
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: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Python 3.12 quality and packaging | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Check out exact source | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python 3.12 with lock-bound cache | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: requirements-dev.lock | |
| - name: Install the reviewed development lock | |
| run: python -m pip install --require-hashes -r requirements-dev.lock | |
| - name: Install QuantForge without dependency resolution | |
| run: python -m pip install -e . --no-deps --no-build-isolation | |
| - name: Run the complete local quality contract | |
| run: scripts/quality.sh | |
| env: | |
| CFFCONVERT: cffconvert | |
| PYTHON: python | |
| - name: Prove deterministic scenario exports and audit replay | |
| run: >- | |
| python -m scripts.verify_determinism | |
| --work-dir release/ci-determinism | |
| --report release/ci-determinism-validation.json | |
| - name: Install and exercise the wheel outside the source tree | |
| run: >- | |
| python -m scripts.wheel_smoke | |
| --wheel dist/quantforge_ai-0.1.0-py3-none-any.whl | |
| --requirements-lock requirements.lock | |
| --version 0.1.0 | |
| --work-dir release/ci-wheel-smoke | |
| compatibility: | |
| name: ${{ matrix.os }} / Python ${{ matrix.python }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 25 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| python: "3.13" | |
| - os: ubuntu-24.04 | |
| python: "3.14" | |
| - os: macos-14 | |
| python: "3.12" | |
| - os: windows-2022 | |
| python: "3.12" | |
| steps: | |
| - name: Check out exact source | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python with lock-bound cache | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: pip | |
| cache-dependency-path: requirements-dev.lock | |
| - name: Install the reviewed development lock | |
| run: python -m pip install --require-hashes -r requirements-dev.lock | |
| - name: Install QuantForge without dependency resolution | |
| run: python -m pip install -e . --no-deps --no-build-isolation | |
| - name: Run the full test suite | |
| run: python -m pytest | |
| - name: Build wheel and source distribution | |
| run: python -m build --no-isolation | |
| - name: Inspect distribution contents | |
| run: python -m scripts.inspect_packages --dist-dir dist | |
| - name: Verify runtime and CLI versions | |
| run: python -c "import quantforge, subprocess, sys; assert quantforge.__version__ == '0.1.0'; subprocess.run([sys.executable, '-m', 'quantforge', '--version'], check=True)" | |
| cpp-v1-adapter: | |
| name: C++ v1.0.0 adapter / ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-14] | |
| steps: | |
| - name: Check out exact QuantForge source | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| path: quantforge-ai | |
| persist-credentials: false | |
| - name: Check out immutable C++ v1.0.0 source | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| repository: MrithunjoyB/cpp-event-driven-backtester | |
| ref: v1.0.0 | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| path: cpp-engine | |
| persist-credentials: false | |
| - name: Set up Python 3.12 with lock-bound cache | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: quantforge-ai/requirements-dev.lock | |
| - name: Install the reviewed QuantForge development lock | |
| working-directory: quantforge-ai | |
| run: python -m pip install --require-hashes -r requirements-dev.lock | |
| - name: Build the immutable C++ release target | |
| working-directory: cpp-engine | |
| run: >- | |
| cmake -S . -B "${{ runner.temp }}/cpp-v1-build" | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DQUANT_ENABLE_STRICT_WARNINGS=ON | |
| && cmake --build "${{ runner.temp }}/cpp-v1-build" --parallel 2 | |
| - name: Exercise the read-only release adapter twice | |
| working-directory: quantforge-ai | |
| run: python -m pytest -q tests/integration/test_cpp_v1_adapter.py | |
| env: | |
| QUANTFORGE_CPP_V1_EXECUTABLE: ${{ runner.temp }}/cpp-v1-build/quant_cli | |
| QUANTFORGE_CPP_V1_REPOSITORY: ${{ github.workspace }}/cpp-engine | |
| QUANTFORGE_CPP_V1_WORK_ROOT: ${{ runner.temp }} | |
| - name: Build and inspect the governed demonstration distributions | |
| working-directory: quantforge-ai | |
| run: >- | |
| python -m build --no-isolation | |
| && python -m scripts.inspect_packages --dist-dir dist | |
| - name: Run the governed tribunal from installed wheel and sdist | |
| working-directory: quantforge-ai | |
| shell: bash | |
| run: | | |
| QF_EXECUTABLE_SHA256="$(python -c 'import hashlib, pathlib; print(hashlib.sha256(pathlib.Path("${{ runner.temp }}/cpp-v1-build/quant_cli").read_bytes()).hexdigest())')" | |
| python -m scripts.demo_package_smoke \ | |
| --wheel dist/quantforge_ai-0.1.0-py3-none-any.whl \ | |
| --sdist dist/quantforge_ai-0.1.0.tar.gz \ | |
| --repository "${{ github.workspace }}/cpp-engine" \ | |
| --executable "${{ runner.temp }}/cpp-v1-build/quant_cli" \ | |
| --expected-executable-sha256 "${QF_EXECUTABLE_SHA256}" \ | |
| --engine-work-root "${{ runner.temp }}" \ | |
| --build-requirements-lock requirements-dev.lock \ | |
| --requirements-lock requirements.lock \ | |
| --work-dir "${{ runner.temp }}/governed-distribution-smoke" |