From 21d327297d6fb001da39043c64e087f8b50724f1 Mon Sep 17 00:00:00 2001 From: Lorenzo Fiore Date: Fri, 3 Jul 2026 11:38:09 +0200 Subject: [PATCH] ci: add lint gate (rustfmt + clippy) CI built and tested across the platform matrix but never gated formatting or lint. Add a lint job (ubuntu) running cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings. The code is already clean, verified locally (fmt clean, clippy 0 warnings on the CPU build). Also add a CI badge to the README. --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 25 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 680479b..f4e8884 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,29 @@ on: workflow_dispatch: jobs: + lint: + name: lint (rustfmt + clippy) + runs-on: ubuntu-latest + steps: + - name: Checkout (with vendored parakeet.cpp + ggml submodules) + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Ensure rustfmt + clippy components + run: rustup component add rustfmt clippy + + - name: rustfmt + run: cargo fmt --all --check + + # clippy compiles the vendored ggml (CPU-only here; the GPU backends are + # exercised by the build matrix). cmake + a C/C++ toolchain are needed. + - name: Install build deps + run: sudo apt-get update -y && sudo apt-get install -y cmake ninja-build build-essential + + - name: clippy + run: cargo clippy --workspace --all-targets -- -D warnings + build: name: build-${{ matrix.os }}-${{ matrix.kind }} runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 88eb271..8308ed9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # parakeet-cpp +[![ci](https://github.com/fiorelorenzo/parakeet-cpp/actions/workflows/ci.yml/badge.svg)](https://github.com/fiorelorenzo/parakeet-cpp/actions/workflows/ci.yml) + Safe Rust bindings for [mudler/parakeet.cpp](https://github.com/mudler/parakeet.cpp) — a ggml-based C++ port of NVIDIA's Parakeet and Nemotron ASR models. Provides offline one-shot transcription and two streaming modes (real cache-aware streaming and