chore(deps): bump sha2 0.10 → 0.11 (#547) #998
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 | |
| CARGO_TERM_QUIET: "true" # F.I.R.S.T. principle (only print failures, not test names) | |
| RUSTFLAGS: -Dwarnings | |
| BINARY_SIZE_LIMIT_MB: 11 | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - uses: taiki-e/install-action@85b24a67ef0c632dfefad70b9d5ce8fddb040754 # v2.75.10 | |
| with: | |
| tool: nextest | |
| - run: cargo nextest run --lib | |
| - run: cargo nextest run --bin zeptoclaw | |
| - run: cargo nextest run --test cli_smoke | |
| - run: cargo nextest run --test integration | |
| - run: cargo nextest run --test e2e | |
| - run: cargo test --doc | |
| - name: Test with memory-bm25 feature | |
| run: cargo nextest run --lib --features memory-bm25 | |
| - name: Test with hardware features (ESP32) | |
| run: cargo nextest run --lib --features peripheral-esp32 | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - run: cargo clippy -- -D warnings | |
| - name: Clippy with hardware features | |
| run: cargo clippy --features peripheral-esp32 -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --check | |
| audit: | |
| name: Security audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| deny: | |
| name: Cargo deny | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: EmbarkStudios/cargo-deny-action@175dc7fd4fb85ec8f46948fb98f44db001149081 # v2.0.16 | |
| feature-matrix: | |
| name: Feature gates | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| features: | |
| - "--no-default-features" | |
| - "--features panel" | |
| - "--features tool-pdf" | |
| - "--features memory-hnsw" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| key: features-${{ matrix.features }} | |
| - name: Check compilation | |
| run: cargo check ${{ matrix.features }} | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| key: coverage | |
| - uses: taiki-e/install-action@85b24a67ef0c632dfefad70b9d5ce8fddb040754 # v2.75.10 | |
| with: | |
| tool: cargo-llvm-cov,cargo-nextest | |
| - name: Generate code coverage | |
| run: cargo llvm-cov nextest --lib --features memory-bm25 --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| fail_ci_if_error: false | |
| # Heavy checks that only run on main merges | |
| riscv64-smoke: | |
| name: RISC-V smoke test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_raw" | |
| CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_MUSL_LINKER: riscv64-linux-gnu-gcc | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: riscv64gc-unknown-linux-musl | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| key: riscv64 | |
| - name: Install QEMU and cross-linker | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user gcc-riscv64-linux-gnu | |
| - name: Cross-compile smoke test | |
| run: cargo build --release --target riscv64gc-unknown-linux-musl --example riscv_smoke | |
| - name: Run under QEMU | |
| run: | | |
| qemu-riscv64 -L /usr/riscv64-linux-gnu \ | |
| target/riscv64gc-unknown-linux-musl/release/examples/riscv_smoke | |
| echo "### RISC-V smoke test passed (Uuid::new_v4 ok)" >> "$GITHUB_STEP_SUMMARY" | |
| binary-size: | |
| name: Binary size | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| key: binary-size | |
| - run: cargo build --release | |
| - name: Check binary size | |
| run: | | |
| size_bytes=$(stat --format=%s target/release/zeptoclaw) | |
| size_mb=$(awk "BEGIN {printf \"%.1f\", ${size_bytes}/1048576}") | |
| echo "Binary size: ${size_mb} MB (limit: ${BINARY_SIZE_LIMIT_MB} MB)" | |
| echo "### Binary size: ${size_mb} MB" >> "$GITHUB_STEP_SUMMARY" | |
| limit_bytes=$((BINARY_SIZE_LIMIT_MB * 1048576)) | |
| if [ "${size_bytes}" -gt "${limit_bytes}" ]; then | |
| echo "Binary exceeds ${BINARY_SIZE_LIMIT_MB} MB limit!" >&2 | |
| exit 1 | |
| fi |