[codex] feat(stim): mirror stim simulator api after crate split #4
Workflow file for this run
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: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-C target-feature=+aes,+sse2" | |
| # The `pre-commit` job runs the full prek hook suite (rustfmt, clippy, | |
| # cargo check, ruff, ty, hawkeye, and the file hygiene hooks). Every other | |
| # job `needs:` it, so if the hooks fail nothing else runs — the lint/format | |
| # gate is a hard prerequisite, which keeps `main` in compliance and avoids | |
| # spending Actions minutes on tests when the cheap checks already fail. | |
| jobs: | |
| pre-commit: | |
| name: pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Toolchain for the cargo-fmt / cargo-check / cargo-clippy hooks. | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| # `uv` backs the `uvx ruff …` and `uvx ty …` hooks. | |
| - uses: astral-sh/setup-uv@v5 | |
| # Installs the mise-managed tools from mise.toml: `prek` (the hook | |
| # runner) and `hawkeye` (used by the license-header hook via | |
| # `mise exec -- hawkeye check`). | |
| - uses: jdx/mise-action@v2 | |
| # `ty` resolves third-party imports (numpy, bloqade, kirin, …) and the | |
| # `ppvm_python_native` extension through the project venv, so it must | |
| # exist before the hooks run. This also builds the native module. | |
| - name: Sync Python environment | |
| run: uv sync --project ppvm-python --group dev | |
| - name: Run all pre-commit hooks | |
| # `no-commit-to-branch` is a local-only guard that fails by design on | |
| # `main`; skip it in CI (prek honours the pre-commit `SKIP` env var). | |
| env: | |
| SKIP: no-commit-to-branch | |
| run: mise exec -- prek run --all-files | |
| rust-tests: | |
| name: Rust tests | |
| needs: pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run workspace tests | |
| run: cargo test --workspace | |
| - name: Run ppvm-stim tests with rayon feature | |
| run: cargo test -p ppvm-stim --features rayon | |
| python-tests: | |
| name: Python tests | |
| needs: pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: astral-sh/setup-uv@v5 | |
| - name: Run Python tests | |
| run: uv run --project ppvm-python --group dev pytest ppvm-python/test/ docs/examples/ |