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/rust-toolchain@1.85 - 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