Files
clawsync/.gitea/workflows/ci.yml
T
osobhandClaude Sonnet 4.6 2e423d2682 Fix clippy warnings and add Gitea CI pipeline
Clippy fixes:
- clawhdf5-onion/reader.rs: introduce RawPage type alias to resolve
  type_complexity lint on revision_pages_raw return type
- clawsync-onion/iblt.rs: remove stray #[forbid(unsafe_code)] module
  attribute (crate-level forbid already in lib.rs; the module attr was
  useless and triggered the empty-line-after-attribute lint)
- clawsync-onion/differ.rs: replace ok_or_else(|| …) with ok_or(…)
  for non-lazily-constructed error values
- clawsync-cli/main.rs: accept &Path instead of &PathBuf in
  handle_hdf5_client to avoid unnecessary indirection

CI (.gitea/workflows/ci.yml):
- test job: cargo test --workspace (default + simd-cdc)
- lint job: cargo clippy -D warnings + cargo fmt --check
- msrv job: build + test on Rust 1.85 (workspace rust-version)
- publish-dry-run job: cargo publish --dry-run for clawsync-core

All 573 tests still passing after fixes.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-04 18:59:34 -05:00

133 lines
4.7 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# ──────────────────────────────────────────────────────────────────────────
# Build + test (default features)
# ──────────────────────────────────────────────────────────────────────────
test:
name: Test (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo registry + build artefacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build workspace
run: cargo build --workspace
- name: Run tests (default features)
run: cargo test --workspace
- name: Run tests (simd-cdc feature)
run: cargo test --workspace --features clawsync-core/simd-cdc
# ──────────────────────────────────────────────────────────────────────────
# Clippy + rustfmt
# ──────────────────────────────────────────────────────────────────────────
lint:
name: Clippy + fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-lint-
- name: Clippy (deny warnings)
run: cargo clippy --workspace -- -D warnings
- name: Rustfmt check
run: cargo fmt --all -- --check
# ──────────────────────────────────────────────────────────────────────────
# MSRV check (Rust 1.85 — workspace rust-version)
# ──────────────────────────────────────────────────────────────────────────
msrv:
name: MSRV (1.85)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust 1.85
uses: dtolnay/[email protected]
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-msrv-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-msrv-
- name: Build on MSRV
run: cargo build --workspace
- name: Test on MSRV
run: cargo test --workspace
# ──────────────────────────────────────────────────────────────────────────
# Publish dry-run (verifies crates are publishable once deps are on crates.io)
# ──────────────────────────────────────────────────────────────────────────
publish-dry-run:
name: Publish dry-run (clawsync-core)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-publish-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-publish-
- name: Dry-run publish clawsync-core
run: cargo publish --dry-run -p clawsync-core