mirror of
https://github.com/vee1e/moomer.git
synced 2026-09-01 10:18:47 +00:00
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.
37 lines
873 B
YAML
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
|