git.lucas.co / cce-status-interface
status bar
git clone https://git.lucas.co/cce-status-interface.git

commitbb5491c79126d891917159c81d05cd93c6d8682e
parentaae86581db
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-08 17:07
ci: build, test and clippy on every push

Ubuntu 24.04 with the Wayland and xkbcommon headers and Liberation fonts
as CCE_FONTS_DIR; warnings are errors. CLAUDE.md says what it runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
 CLAUDE.md                |  6 ++++++
 Cargo.toml               |  9 --------
 3 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..a2d6587
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,53 @@
+name: CI
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+env:
+  CARGO_TERM_COLOR: always
+  # Warnings are errors; the crate is clippy-clean (house-style allowances in
+  # Cargo.toml's [lints.clippy]), so keep it so.
+  RUSTFLAGS: -D warnings
+
+jobs:
+  test:
+    runs-on: ubuntu-24.04
+    timeout-minutes: 30
+    env:
+      # A known face set for anything that shapes text (cce-ui reads it from here).
+      CCE_FONTS_DIR: /usr/share/fonts/truetype/liberation
+    steps:
+      - uses: actions/checkout@v5
+      # libwayland-dev, libxkbcommon-dev: what cce-ui links through pkg-config.
+      - name: Install system packages
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y --no-install-recommends \
+            pkg-config libwayland-dev libxkbcommon-dev fonts-liberation
+      - uses: dtolnay/rust-toolchain@stable
+      - uses: Swatinem/rust-cache@v2
+      - name: Build (all targets)
+        run: cargo build --all-targets
+      - name: Test
+        run: cargo test
+
+  clippy:
+    runs-on: ubuntu-24.04
+    timeout-minutes: 20
+    steps:
+      - uses: actions/checkout@v5
+      - name: Install system packages
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y --no-install-recommends pkg-config libwayland-dev libxkbcommon-dev
+      - uses: dtolnay/rust-toolchain@stable
+        with:
+          components: clippy
+      - uses: Swatinem/rust-cache@v2
+      - run: cargo clippy --all-targets -- -D warnings
diff --git a/CLAUDE.md b/CLAUDE.md
index 163fbe3..041961c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -27,6 +27,12 @@ make install                          # release build, then `ccebuild install --
 Running it requires a live cce compositor session (`$WAYLAND_DISPLAY` plus the cce
 sockets); there is no meaningful headless mode.
 
+CI (`.github/workflows/ci.yml`, since 2026-10-08) builds every target and runs the tests,
+and runs clippy with warnings as errors, on the crate alone (its git pin of cce-ui, not
+the workspace's). The crate allows only cce-ui's two house-style lints (too many
+arguments, complex types, in `Cargo.toml`); anything else clippy reports is fixed —
+locally, `cargo clippy -p cce-status-interface --all-targets -- -D warnings`.
+
 ## `cce-xembed-tray` — legacy X11 tray icons in the bar
 
 A second binary (`src/bin/cce-xembed-tray/`, run by `cce-xembed-tray.service`)
diff --git a/Cargo.toml b/Cargo.toml
index 5737885..4437d60 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,15 +29,6 @@ libc = "0.2"
 # tray selection, the icons' pixels (damage) and their input region (shape).
 x11rb = { version = "0.13", features = ["damage", "shape", "xfixes"] }
 
-
-
-
-
-
-
-
-
-
 [lints.clippy]
 # The toolkit's house style (cce-ui's [lints.clippy]): geometry, colour and paint state
 # taken piecewise, and the legacy tuple views.