Fix bugs #24
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: | |
| pull_request: | |
| push: | |
| jobs: | |
| rust: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install stable Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Default tests | |
| run: cargo test | |
| - name: Builtin game tests | |
| run: cargo test --features builtin | |
| - name: Physics tests | |
| run: cargo test --features physics | |
| - name: Parallel tests | |
| run: cargo test --features parallel | |
| - name: Builtin physics tests | |
| run: cargo test --features "builtin physics" | |
| - name: Rendered builtin tests | |
| run: cargo test --features "render builtin physics" | |
| - name: Render framework check | |
| run: cargo check --features render | |
| - name: Rendered builtin check | |
| run: cargo check --features "render builtin" | |
| - name: CLI check | |
| run: cargo check --bin gameengine --features cli | |
| - name: Rendered CLI check | |
| run: cargo check --bin gameengine --features "cli physics render" | |
| - name: WASM check | |
| run: cargo check --target wasm32-unknown-unknown | |
| - name: WASM physics check | |
| run: cargo check --target wasm32-unknown-unknown --features physics | |
| - name: WASM rendered builtin check | |
| run: cargo check --target wasm32-unknown-unknown --features "render builtin physics" | |
| - name: Install nightly Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Rustdoc coverage gate | |
| run: | | |
| cargo +nightly rustdoc --all-features -- -Z unstable-options --show-coverage --output-format json > /tmp/rustdoc_cov.json | |
| python - <<'PY' | |
| import json, sys | |
| files = json.load(open('/tmp/rustdoc_cov.json')) | |
| with_docs = sum(v.get('with_docs', 0) for v in files.values()) | |
| total = sum(v.get('total', 0) for v in files.values()) | |
| pct = 100.0 if total == 0 else (with_docs * 100.0 / total) | |
| print(f"Rustdoc documented items: {with_docs}/{total} ({pct:.2f}%)") | |
| if with_docs != total: | |
| print('Rustdoc coverage gate failed (<100.0%).', file=sys.stderr) | |
| sys.exit(1) | |
| PY | |
| - name: Clippy | |
| run: cargo +stable clippy --all-targets --all-features -- -D warnings | |
| - name: Install pinned Verus release | |
| run: | | |
| curl -fsSL "https://github.com/verus-lang/verus/releases/download/release%2F0.2026.03.28.3390e9a/verus-0.2026.03.28.3390e9a-x86-linux.zip" -o /tmp/verus.zip | |
| unzip -q /tmp/verus.zip -d /tmp | |
| rm -rf ./verus_binary | |
| mv /tmp/verus-x86-linux ./verus_binary | |
| chmod +x ./verus_binary/verus | |
| - name: Install Verus-required Rust toolchain | |
| run: rustup toolchain install 1.94.0-x86_64-unknown-linux-gnu | |
| - name: Verus model checks | |
| run: REQUIRE_VERUS=1 bash scripts/run-verus.sh | |
| - name: Bench compile | |
| run: cargo bench --no-run --features "builtin physics" | |
| kani: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run Kani proof matrix | |
| uses: model-checking/kani-github-action@v1 | |
| with: | |
| kani-version: "0.67.0" | |
| command: bash | |
| args: "-lc 'VERIFICATION_MODE=kani-only scripts/run-verification.sh'" |