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
54
55
56
57
58
name: ci
# Build + test on every push and pull request to main. Single Linux job
# kept lean — multi-platform release builds happen in release.yml on
# tag push.
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: cargo build + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
# System libs for bdslib's transitive native deps on Ubuntu.
# See `release.yml` for the rationale; CI mirrors the same set.
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config \
libfontconfig1-dev \
libssl-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libasound2-dev
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: cargo build
run: cargo build --locked
- name: cargo test
run: cargo test --locked -- --nocapture
# Linting is informational — bdslib's vendored sources can drag in
# warnings that aren't actionable here. `-D warnings` would be too
# strict; report-only is enough as a smoke check.
- name: cargo clippy
run: cargo clippy --no-deps -- -A clippy::all
continue-on-error: true