style: apply cargo fmt formatting #105
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: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test --all-targets --all-features | |
| fmt: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy Lints | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| miri: | |
| name: Miri (Unsafe Code Verification) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: miri | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run Miri on core crates | |
| run: | | |
| cargo +nightly miri test -p php-rs-types 2>&1 || true | |
| cargo +nightly miri test -p php-rs-gc 2>&1 || true | |
| env: | |
| MIRIFLAGS: "-Zmiri-disable-isolation" | |
| sanitizer: | |
| name: Address Sanitizer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run ASan on php-rs-types (leak detection off — global intern pool is intentional) | |
| run: | | |
| RUSTFLAGS="-Z sanitizer=address" \ | |
| cargo +nightly test --target x86_64-unknown-linux-gnu \ | |
| -p php-rs-types | |
| env: | |
| ASAN_OPTIONS: "detect_leaks=0" | |
| - name: Run ASan on remaining crates (leak detection on) | |
| run: | | |
| RUSTFLAGS="-Z sanitizer=address" \ | |
| cargo +nightly test --target x86_64-unknown-linux-gnu \ | |
| -p php-rs-lexer -p php-rs-parser \ | |
| -p php-rs-compiler -p php-rs-vm -p php-rs-gc | |
| env: | |
| ASAN_OPTIONS: "detect_leaks=1" |