moomer/.github/workflows/ci.yml
lakshit verma 862a9712c8
Fix CI: rustfmt and keep GUI deps off the Linux lib job
Make xcap/winit/pixels/image optional under the default `gui` feature so
`cargo clippy/test --lib --no-default-features` no longer needs dbus on
Ubuntu. Format main.rs for rustfmt.
2026-07-24 01:22:21 +05:30

37 lines
873 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
# Pure logic only — no GUI / capture deps (feature "gui" off).
lib:
name: clippy + test (lib)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy (lib, no gui)
run: cargo clippy --lib --no-default-features -- -D warnings
- name: Tests (lib, no gui)
run: cargo test --lib --no-default-features