build(deps): bump rand from 0.8.5 to 0.9.2 #66
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, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| # Format check | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| # Frontend type checking | |
| frontend-typecheck: | |
| name: Frontend Type Check | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Install dependencies | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm install --frozen-lockfile | |
| - name: Type check | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm typecheck | |
| # Lint with clippy | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Initialize submodules | |
| run: git submodule update --init --depth 1 components/prtip components/wraith-protocol components/cyberchef-mcp | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| # Install Tauri dependencies (GTK, WebKit) | |
| - name: Install Tauri dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libpcap-dev | |
| # Setup Node.js and pnpm for frontend | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| # Build frontend (required before Rust build for Tauri) | |
| - name: Build frontend | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v2" | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| # Build and test | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, macos-14, windows-2022] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Initialize submodules | |
| run: git submodule update --init --depth 1 components/prtip components/wraith-protocol components/cyberchef-mcp | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v2" | |
| # Linux dependencies (including Tauri dependencies) | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libpcap-dev | |
| # macOS dependencies | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install libpcap | |
| # Windows dependencies (Npcap SDK) | |
| - name: Install Windows dependencies | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| # Download Npcap SDK | |
| Invoke-WebRequest -Uri "https://npcap.com/dist/npcap-sdk-1.13.zip" -OutFile "npcap-sdk.zip" | |
| Expand-Archive -Path "npcap-sdk.zip" -DestinationPath "npcap-sdk" | |
| echo "LIB=${{ github.workspace }}\npcap-sdk\Lib\x64" >> $env:GITHUB_ENV | |
| # Setup Node.js and pnpm for frontend (all platforms) | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| # Build frontend (required before Rust build for Tauri) | |
| - name: Build frontend | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| - name: Build | |
| run: cargo build --workspace --verbose | |
| - name: Run tests | |
| run: cargo test --workspace --verbose | |
| # Run frontend tests | |
| - name: Run frontend tests | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm test | |
| # Documentation build | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Initialize submodules | |
| run: git submodule update --init --depth 1 components/prtip components/wraith-protocol components/cyberchef-mcp | |
| - uses: dtolnay/rust-toolchain@stable | |
| # Install Tauri dependencies | |
| - name: Install Tauri dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libpcap-dev | |
| # Setup Node.js and pnpm for frontend | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| # Build frontend (required before Rust build for Tauri) | |
| - name: Build frontend | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v2" | |
| - name: Build documentation | |
| run: cargo doc --workspace --no-deps | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| # Security audit | |
| audit: | |
| name: Security Audit | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # Minimum Supported Rust Version | |
| msrv: | |
| name: MSRV (1.92.0) | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Initialize submodules | |
| run: git submodule update --init --depth 1 components/prtip components/wraith-protocol components/cyberchef-mcp | |
| - uses: dtolnay/[email protected] | |
| # Install Tauri dependencies | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libpcap-dev | |
| # Setup Node.js and pnpm for frontend | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| # Build frontend (required before Rust build for Tauri) | |
| - name: Build frontend | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v2" | |
| - name: Check MSRV | |
| run: cargo check --workspace | |
| # Coverage (optional, runs on main only) | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-22.04 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Initialize submodules | |
| run: git submodule update --init --depth 1 components/prtip components/wraith-protocol components/cyberchef-mcp | |
| - uses: dtolnay/rust-toolchain@stable | |
| # Install Tauri dependencies | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libpcap-dev | |
| # Setup Node.js and pnpm for frontend | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| # Build frontend (required before Rust build for Tauri) | |
| - name: Build frontend | |
| run: | | |
| cd crates/spectre-gui/frontend | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v2" | |
| - name: Install cargo-tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - name: Generate coverage | |
| run: cargo tarpaulin --workspace --out Xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./cobertura.xml | |
| fail_ci_if_error: false |