rework engine to a reactive observer model. SimulationBuilder broadca… #58
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: Tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| # ── Python test matrix ───────────────────────────────────────── | |
| # Builds the unified GenAIRR wheel via maturin (Rust kernel as the | |
| # private GenAIRR._engine submodule + Python wrappers in one wheel) | |
| # and runs the pytest suite. abi3-py39 means one wheel covers every | |
| # Python version we test. | |
| test: | |
| name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| engine_rs/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('engine_rs/Cargo.toml', 'engine_rs/Cargo.lock') }} | |
| - name: Install maturin + test deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install "maturin>=1.5,<2.0" pytest pandas | |
| - name: Build & install GenAIRR wheel | |
| run: maturin build --release --out dist | |
| - name: Install built wheel | |
| shell: bash | |
| run: pip install dist/genairr-*.whl | |
| - name: Run pytest | |
| run: pytest tests/ -x -q | |
| # ── Rust unit + integration tests ────────────────────────────── | |
| # Direct `cargo test` against the engine crate. Cheaper and more | |
| # focused than running the whole pytest suite to validate the | |
| # kernel. | |
| cargo_test: | |
| name: cargo test (engine_rs) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| engine_rs/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('engine_rs/Cargo.toml', 'engine_rs/Cargo.lock') }} | |
| - name: cargo test | |
| working-directory: engine_rs | |
| run: cargo test --all-features |