feat: v2.2 Production Hardening — Phases 26-27 + milestone archive #26
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 | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| fmt: | |
| name: Format Check | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libclang-dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache cargo registry | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "clippy" | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libclang-dev | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install protobuf llvm | |
| echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "test-${{ matrix.os }}" | |
| - name: Run tests | |
| run: cargo test --workspace --all-features --exclude e2e-tests | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libclang-dev | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install protobuf llvm | |
| echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "build-${{ matrix.os }}" | |
| - name: Build release | |
| run: cargo build --release --workspace | |
| doc: | |
| name: Documentation | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libclang-dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "doc" | |
| - name: Build documentation | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| run: cargo doc --no-deps --workspace --all-features | |
| e2e: | |
| name: E2E Tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libclang-dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "e2e" | |
| - name: Run E2E tests | |
| id: e2e_run | |
| continue-on-error: true | |
| run: cargo test -p e2e-tests --all-features -- --show-output 2>&1 | tee e2e-results.txt | |
| - name: Report E2E summary | |
| if: always() | |
| run: | | |
| echo "## E2E Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| grep -E "^test |^running |ok|FAILED|test result:" e2e-results.txt >> $GITHUB_STEP_SUMMARY || true | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| - name: Check E2E test result | |
| if: always() | |
| run: | | |
| if [[ "${{ steps.e2e_run.outcome }}" != "success" ]]; then | |
| echo "E2E tests failed" | |
| exit 1 | |
| fi | |
| echo "E2E tests passed!" | |
| # Summary job that depends on all other jobs | |
| ci-success: | |
| name: CI Success | |
| needs: [fmt, clippy, test, build, doc, e2e] | |
| runs-on: ubuntu-24.04 | |
| if: always() | |
| steps: | |
| - name: Check all jobs passed | |
| run: | | |
| if [[ "${{ needs.fmt.result }}" != "success" ]] || \ | |
| [[ "${{ needs.clippy.result }}" != "success" ]] || \ | |
| [[ "${{ needs.test.result }}" != "success" ]] || \ | |
| [[ "${{ needs.build.result }}" != "success" ]] || \ | |
| [[ "${{ needs.doc.result }}" != "success" ]] || \ | |
| [[ "${{ needs.e2e.result }}" != "success" ]]; then | |
| echo "One or more jobs failed" | |
| exit 1 | |
| fi | |
| echo "All CI jobs passed!" |