chore(deps): bump bitflags from 2.11.1 to 2.13.0 #179
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: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: 1 | |
| CHATIFY_CI: 1 | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| workspace-quality: | |
| name: Workspace quality gates | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends -y pkg-config libasound2-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Pre-fetch dependencies | |
| run: cargo fetch --locked | |
| - name: Validate release target inventory | |
| shell: pwsh | |
| run: ./scripts/assert-release-targets.ps1 | |
| - name: Workspace compile check | |
| run: cargo check --workspace --bins --locked | |
| - name: Format check | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings | |
| - name: Workspace tests | |
| run: cargo test --workspace --all-targets --locked | |
| - name: Dependency audit (advisory) | |
| continue-on-error: true | |
| run: | | |
| if ! command -v cargo-audit &> /dev/null; then | |
| if ! cargo install cargo-audit --locked; then | |
| echo "::warning::cargo-audit installation failed — skipping audit" | |
| exit 0 | |
| fi | |
| fi | |
| cargo audit | |
| protocol-contracts: | |
| name: Protocol contract gates | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
| needs: workspace-quality | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test_name: | |
| - auth_contract_returns_expected_fields | |
| - compatibility_contract_client_bootstrap_flow_stays_stable | |
| - protocol_contract_advertises_backward_compatible_version | |
| - file_contract_relays_media_metadata_and_chunks | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends -y pkg-config libasound2-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Pre-fetch dependencies | |
| run: cargo fetch --locked | |
| - name: Run contract gate | |
| run: cargo test --locked --test message_contracts ${{ matrix.test_name }} | |
| feature-builds: | |
| name: Feature-gated builds | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
| needs: workspace-quality | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - gate_name: Discord bridge compile gate | |
| cargo_command: cargo check --features discord-bridge --bin discord_bot --locked | |
| run_bridge_regressions: true | |
| run_bridge_client_tests: false | |
| - gate_name: Bridge client compile gate | |
| cargo_command: cargo check -p chatify-client --features bridge-client --locked | |
| run_bridge_regressions: false | |
| run_bridge_client_tests: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends -y pkg-config libasound2-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Pre-fetch dependencies | |
| run: cargo fetch --locked | |
| - name: ${{ matrix.gate_name }} | |
| run: ${{ matrix.cargo_command }} | |
| - name: Discord bridge regression tests | |
| if: ${{ matrix.run_bridge_regressions }} | |
| run: | | |
| set -euo pipefail | |
| bridge_tests=( | |
| bridge_supervisor_reconnects_after_disconnect | |
| parse_channel_map_filters_and_normalizes_entries | |
| self_source_filter_matches_only_non_empty_identical_source | |
| self_source_filter_ignores_non_string_src_values | |
| ) | |
| for test_name in "${bridge_tests[@]}"; do | |
| cargo test --features discord-bridge --bin discord_bot --locked "${test_name}" | |
| done | |
| - name: Bridge client feature tests | |
| if: ${{ matrix.run_bridge_client_tests }} | |
| run: cargo test -p chatify-client --features bridge-client --locked | |
| windows-package-smoke: | |
| name: Windows package smoke | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
| needs: | |
| - workspace-quality | |
| runs-on: windows-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Validate release target inventory | |
| shell: pwsh | |
| run: .\scripts\assert-release-targets.ps1 | |
| - name: Build portable Windows package | |
| shell: pwsh | |
| run: .\build-windows-package.ps1 -SkipInstaller | |
| - name: Smoke test packaged executables | |
| shell: pwsh | |
| run: | | |
| $packageDir = "dist/chatify-windows-x64" | |
| $launcherExe = Join-Path $packageDir "chatify.exe" | |
| $serverExe = Join-Path $packageDir "chatify-server.exe" | |
| $clientExe = Join-Path $packageDir "chatify-client.exe" | |
| foreach ($exe in @($launcherExe, $serverExe, $clientExe)) { | |
| if (-not (Test-Path -Path $exe)) { | |
| throw "Missing packaged executable: $exe" | |
| } | |
| } | |
| $serverHelp = (& $serverExe --help 2>&1 | Out-String) | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "chatify-server --help failed with exit code $LASTEXITCODE" | |
| } | |
| if ([string]::IsNullOrWhiteSpace($serverHelp)) { | |
| throw "chatify-server --help returned empty output" | |
| } | |
| $clientHelp = (& $clientExe --help 2>&1 | Out-String) | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "chatify-client --help failed with exit code $LASTEXITCODE" | |
| } | |
| if ([string]::IsNullOrWhiteSpace($clientHelp)) { | |
| throw "chatify-client --help returned empty output" | |
| } | |
| $tmp = Join-Path $env:RUNNER_TEMP ("chatify-launcher-smoke-" + [guid]::NewGuid().ToString("N")) | |
| New-Item -ItemType Directory -Path $tmp | Out-Null | |
| $oldAppData = $env:APPDATA | |
| $oldLocalAppData = $env:LOCALAPPDATA | |
| $oldChatifyConfigDir = $env:CHATIFY_CONFIG_DIR | |
| try { | |
| $env:APPDATA = $tmp | |
| $env:LOCALAPPDATA = $tmp | |
| $env:CHATIFY_CONFIG_DIR = (Join-Path $tmp "config") | |
| $launcherOutput = "1`n`n`nq`n" | & $launcherExe 2>&1 | Out-String | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "chatify.exe first-run smoke failed with exit code $LASTEXITCODE. Output: $launcherOutput" | |
| } | |
| if ($launcherOutput -notmatch "R\) Reconnect") { | |
| throw "chatify.exe first-run smoke did not show saved reconnect mode. Output: $launcherOutput" | |
| } | |
| } | |
| finally { | |
| $env:APPDATA = $oldAppData | |
| $env:LOCALAPPDATA = $oldLocalAppData | |
| $env:CHATIFY_CONFIG_DIR = $oldChatifyConfigDir | |
| if (Test-Path -LiteralPath $tmp) { | |
| Remove-Item -LiteralPath $tmp -Recurse -Force | |
| } | |
| } | |
| - name: Validate package artifacts | |
| shell: pwsh | |
| run: | | |
| $zipPath = "dist/chatify-windows-x64.zip" | |
| $shaPath = "dist/chatify-windows-x64.zip.sha256" | |
| if (-not (Test-Path -Path $zipPath)) { | |
| throw "Missing artifact: $zipPath" | |
| } | |
| if (-not (Test-Path -Path $shaPath)) { | |
| throw "Missing checksum: $shaPath" | |
| } | |
| $expectedHash = (Get-Content -Path $shaPath | Select-Object -First 1).Split(' ')[0].Trim().ToLowerInvariant() | |
| $actualHash = (Get-FileHash -Path $zipPath -Algorithm SHA256).Hash.Trim().ToLowerInvariant() | |
| if ($actualHash -ne $expectedHash) { | |
| throw "Checksum mismatch for $zipPath. Expected $expectedHash but got $actualHash" | |
| } |