feat: register_external_functions() — set ext funcs without clearing state #40
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: | |
| COLUMNS: 150 | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| prefix-key: "v1-rust" | |
| - name: Check formatting | |
| run: cargo +nightly fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo +nightly clippy --all-targets --all-features -- -D warnings | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - run: rm .cargo/config.toml | |
| - run: pip install typing_extensions | |
| # Core tests (no features) | |
| - name: Test (no features) | |
| run: cargo test -p ouros | |
| # Tests with ref-count panic detection (catches refcount leaks) | |
| - name: Test (ref-count-panic) | |
| run: cargo test -p ouros --features ref-count-panic | |
| # Tests with ref-count return checking | |
| - name: Test (ref-count-return) | |
| run: cargo test -p ouros --features ref-count-return | |
| # Type checking tests | |
| - name: Test type checking | |
| run: cargo test -p ouros_type_checking -p ouros_typeshed | |
| parity: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - run: rm .cargo/config.toml | |
| # Build once, then run parity audit | |
| - name: Build ouros | |
| run: cargo build --quiet | |
| - name: Run parity audit | |
| run: bash playground/deep_parity_audit.sh | |
| bench: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - run: rm .cargo/config.toml | |
| - name: Run benchmarks | |
| run: make dev-bench | |
| # https://github.com/marketplace/actions/alls-green#why used for branch protection checks | |
| check: | |
| if: always() | |
| needs: [lint, test, parity, bench] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |