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
59
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
# minifb (graphics) needs X11/Wayland headers; cpal (audio) needs ALSA.
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libasound2-dev libudev-dev libxkbcommon-dev libwayland-dev xorg-dev
- name: Build
run: cargo build --workspace --verbose
# ling-kernel's own boot assembly (boot32.rs) calls `kernel_entry`,
# which it never defines itself — that symbol is only ever supplied by
# a generated kernel project's own main.rs (`ling build --platform
# kernel`, see gen_kernel_main_rs in src/main.rs). `cargo build` is
# fine (a lib doesn't need to link), but `cargo test` tries to link a
# standalone test binary for every workspace member and fails with
# "unresolved external symbol kernel_entry" for this one — confirmed
# by reproducing the exact CI failure locally.
- name: Run tests
run: cargo test --workspace --exclude ling-kernel --verbose
lint:
name: Format & Clippy (non-blocking)
runs-on: ubuntu-latest
# Advisory only — does not gate the CI status / test badge.
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace