1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
# The aws-sdk-* deps are pinned to versions whose MSRV is 1.88. Keep CI
# locked to a known-good toolchain so a transitive dep bump doesn't break us.
RUST_TOOLCHAIN: "1.88.0"
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
steps:
- uses: actions/checkout@v4
- name: Install Rust
# Note: previous workflow used `dtolnay/rust-action` which doesn't exist;
# the correct action is `rust-toolchain`. Pinning to v1 for stability.
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: "i-self-${{ matrix.os }}"
# Linux needs X11/XCB headers for device_query (input polling).
- name: Install Linux input-polling deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libxcb1-dev libxcb-randr0-dev libxcb-shape0-dev
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
# Clippy runs as a soft warning gate — pre-existing modules have lots of
# `#[allow(dead_code)]` scaffolding that would block hard `-D warnings`.
- name: Clippy (informational)
run: cargo clippy --all-targets || true