name: doc-engine # CI for the standalone CRDT document engine crate. # # Enforces: # 1. `doc-engine` compiles and its test suite is green (--locked, so the # committed lockfile is the only dependency resolution). # 2. Clippy stays at zero warnings: the warning class fixed when this # workflow was added (`possible_missing_else`) is invisible in review # and each instance is a potential logic slip. # 3. nigig-build still compiles and tests green against the new engine: # the UI consumes the engine through a path dependency, and an engine # change that breaks the consumer must fail here, not downstream. # # `cargo fmt --check` is deliberately not a gate yet: the crate predates # the rustfmt style of the pinned toolchain and reformatting it wholesale # would conflict with open lines of work. Same reasoning as the clippy # note in nigig-build.yml -- a step that cannot fail is worse than no # step, but a step that always fails gets ignored. on: push: paths: - 'crates/apps/doc/**' - 'Cargo.lock' - 'Cargo.toml' - 'rust-toolchain.toml' - '.forgejo/workflows/doc-engine.yml' pull_request: paths: - 'crates/apps/doc/**' - 'Cargo.lock' - 'Cargo.toml' - 'rust-toolchain.toml' - '.forgejo/workflows/doc-engine.yml' jobs: engine: runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@v4 # The engine is UI-free (serde + serde_json only): no system GUI # packages, no Makepad checkout resolution beyond the lockfile. - name: Engine tests run: cargo test --locked -p doc-engine - name: Engine clippy run: cargo clippy --locked -p doc-engine -- -D warnings - name: Reject whitespace errors run: git diff --check consumer: runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 # nigig-build links doc-engine by path; the doc workspace module only # compiles against the engine API it was written for. - name: Install native dependencies run: | sudo apt-get update -qq sudo apt-get install -y -qq \ pkg-config libwayland-dev libxcursor-dev libxrandr-dev \ libxi-dev libx11-dev libgl1-mesa-dev libasound2-dev \ libpolkit-gobject-1-dev libpolkit-agent-1-dev \ libglib2.0-dev libssl-dev libsqlite3-dev libudev-dev \ libpulse-dev libxkbcommon-dev - name: Check nigig-build against the engine run: cargo check --locked -p nigig-build --lib - name: Test nigig-build against the engine run: cargo test --locked -p nigig-build --lib