Add monetization docs, component completion report, next-week plan, and dashboard robustness improvements #144
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: GAMESA CI/CD | |
| on: | |
| push: | |
| branches: [main, develop, claude/*] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| PYTHON_VERSION: "3.11" | |
| jobs: | |
| # ============================================================ | |
| # Lint & Format Check | |
| # ============================================================ | |
| lint: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install Python linters | |
| run: pip install ruff mypy | |
| - name: Lint Python | |
| run: | | |
| ruff check src/python/ --output-format=github | |
| ruff format --check src/python/ | |
| - name: Setup Rust | |
| uses: dtolnay/rust-action@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Lint Rust | |
| working-directory: src/rust-bot | |
| run: | | |
| cargo fmt --check | |
| cargo clippy -- -D warnings | |
| # ============================================================ | |
| # Python Tests | |
| # ============================================================ | |
| test-python: | |
| runs-on: ubuntu-22.04 | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: pip-${{ hashFiles('requirements.txt') }} | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov | |
| - name: Run tests | |
| run: | | |
| python -m pytest tests/ -v --cov=src/python --cov-report=xml --ignore=tests/integration | |
| - name: KrystalSDK smoke test | |
| run: | | |
| python -m src.python.krystal_sdk health --json | |
| python -m src.python.krystal_sdk bench --json | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.xml | |
| fail_ci_if_error: false | |
| # ============================================================ | |
| # Rust Tests | |
| # ============================================================ | |
| test-rust: | |
| runs-on: ubuntu-22.04 | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-action@stable | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| src/rust-bot/target | |
| key: cargo-${{ hashFiles('src/rust-bot/Cargo.lock') }} | |
| - name: Build | |
| working-directory: src/rust-bot | |
| run: cargo build --release | |
| - name: Test | |
| working-directory: src/rust-bot | |
| run: cargo test --release | |
| # ============================================================ | |
| # C Core Build | |
| # ============================================================ | |
| build-c: | |
| runs-on: ubuntu-22.04 | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake ninja-build | |
| - name: Build C core | |
| run: | | |
| mkdir -p src/c/build | |
| cd src/c/build | |
| cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release | |
| ninja | |
| # ============================================================ | |
| # GPU Integration Tests (Self-hosted runner with GPU) | |
| # ============================================================ | |
| test-gpu: | |
| runs-on: [self-hosted, gpu] | |
| needs: [test-python, test-rust] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| run: | | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip install -r requirements.txt | |
| - name: Verify GPU stack | |
| run: | | |
| source venv/bin/activate | |
| python scripts/verify_stack.py | |
| - name: Run GPU tests | |
| run: | | |
| source venv/bin/activate | |
| python -m pytest tests/integration/gpu -v | |
| # ============================================================ | |
| # Package Build | |
| # ============================================================ | |
| package: | |
| runs-on: ubuntu-22.04 | |
| needs: [test-python, test-rust, build-c] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Setup Rust | |
| uses: dtolnay/rust-action@stable | |
| - name: Install build tools | |
| run: | | |
| pip install build wheel | |
| sudo apt-get install -y cmake ninja-build | |
| - name: Build Python wheel | |
| run: python -m build | |
| - name: Build Rust binary | |
| working-directory: src/rust-bot | |
| run: cargo build --release | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p dist/bin | |
| cp src/rust-bot/target/release/gamesa-bot dist/bin/ || true | |
| cp -r dist/*.whl dist/ | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gamesa-packages | |
| path: dist/ | |
| # ============================================================ | |
| # Docker Build | |
| # ============================================================ | |
| docker: | |
| runs-on: ubuntu-22.04 | |
| needs: package | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/Dockerfile | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository }}:latest | |
| ghcr.io/${{ github.repository }}:${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # ============================================================ | |
| # Documentation | |
| # ============================================================ | |
| docs: | |
| runs-on: ubuntu-22.04 | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-action@stable | |
| - name: Generate Rust docs | |
| working-directory: src/rust-bot | |
| run: cargo doc --no-deps | |
| - name: Upload docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs | |
| path: src/rust-bot/target/doc/ |