fix: cargo fmt + fix pre-existing mlx test for v2.2 cleanup (mlx = []… #352
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, "release/**", "fix/**", "feat/**" ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # PPT Contract Tests — critical quality gate; must run serially | |
| ppt-contracts: | |
| name: PPT Contract Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-ppt-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run PPT Contract Tests | |
| run: | | |
| timeout 600s cargo test --lib --no-default-features ppt -- --test-threads=1 --nocapture | |
| # Unit + Regression Tests | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| needs: ppt-contracts | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-test-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run Unit Tests (no features) | |
| run: timeout 600s cargo test --lib --no-default-features -- --test-threads=1 | |
| - name: Run Regression Tests | |
| run: timeout 900s cargo test --test regression_tests --no-default-features -- --test-threads=1 | |
| # Security Audit | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-security-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Vulnerability audit | |
| run: cargo audit --color always | |
| # Code Quality | |
| lint: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-lint-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Clippy (no features) | |
| run: cargo clippy --no-default-features -- -D warnings | |
| - name: Clippy (airframe) | |
| run: cargo clippy --features airframe -- -D warnings | |
| # Cross-Platform Build Verification | |
| build: | |
| name: Build (${{ matrix.target }}) | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| runs-on: ${{ matrix.os }} | |
| needs: [ppt-contracts, security, lint] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: System dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y build-essential cmake pkg-config | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-${{ matrix.target }}-build-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build (airframe) | |
| run: cargo build --release --target ${{ matrix.target }} --features airframe | |
| - name: Verify binary | |
| shell: bash | |
| run: | | |
| ls -la target/${{ matrix.target }}/release/ | grep -E "shimmy|^total" | |
| # wgpu GPU Pipeline Compatibility (Mesa llvmpipe software Vulkan) | |
| wgpu-compat: | |
| name: wgpu GPU Pipeline (Mesa llvmpipe) | |
| runs-on: ubuntu-latest | |
| needs: [ppt-contracts] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Mesa software Vulkan renderer | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libvulkan1 mesa-vulkan-drivers | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-wgpu-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Airframe compiles against wgpu/Vulkan stack | |
| env: | |
| WGPU_BACKEND: vulkan | |
| VK_ICD_FILENAMES: /usr/share/vulkan/icd.d/lvp_icd.x86_64.json | |
| run: | | |
| cargo check --features airframe | |
| echo "✅ Airframe wgpu integration compiles cleanly" | |
| - name: wgpu pipeline unit tests | |
| env: | |
| WGPU_BACKEND: vulkan | |
| VK_ICD_FILENAMES: /usr/share/vulkan/icd.d/lvp_icd.x86_64.json | |
| RUST_LOG: wgpu_core=warn,wgpu_hal=warn | |
| run: | | |
| cargo test --features airframe --lib -- --test-threads=1 2>&1 \ | |
| | grep -E "(test |FAILED|PASSED|error|ok|ignored)" || true | |
| echo "✅ wgpu compatibility check complete" | |
| # Quality Gate Summary | |
| quality-gate: | |
| name: Quality Gate | |
| runs-on: ubuntu-latest | |
| needs: [ppt-contracts, test, security, lint, build, wgpu-compat] | |
| if: always() | |
| steps: | |
| - name: Summary | |
| run: | | |
| if [[ "${{ needs.ppt-contracts.result }}" == "success" && \ | |
| "${{ needs.test.result }}" == "success" && \ | |
| "${{ needs.security.result }}" == "success" && \ | |
| "${{ needs.lint.result }}" == "success" && \ | |
| "${{ needs.build.result }}" == "success" && \ | |
| "${{ needs.wgpu-compat.result }}" == "success" ]]; then | |
| echo "✅ All quality gates passed" | |
| else | |
| echo "Quality gate FAILURES:" | |
| echo " PPT Contracts : ${{ needs.ppt-contracts.result }}" | |
| echo " Test Suite : ${{ needs.test.result }}" | |
| echo " Security : ${{ needs.security.result }}" | |
| echo " Lint : ${{ needs.lint.result }}" | |
| echo " Build : ${{ needs.build.result }}" | |
| echo " wgpu Compat : ${{ needs.wgpu-compat.result }}" | |
| exit 1 | |
| fi |